11 Managing Listeners

Connections between the clients and Oracle Traffic Director instances are created through HTTP and TCP listeners. Each listener is a unique combination of an IP address (or host name) and a port number.

This chapter describes how to create, view, modify, and delete listeners. It contains the following topics:

Creating a Listener

You can create listeners to bind them to a virtual server and configure them to forward requests to different origin-server pools. To create a HTTP listener, run the otd_createHttpListener command, and to create a TCP listener, run the otd_createTcpListener command.

Before You Begin

Before you begin creating an listener, decide the following:

  • A unique name for the listener. Choose the name carefully. After creating a listener, you cannot change its name.

  • A unique IP address (or host name) and port number combinations for the listener.

    You can define multiple listeners with the same IP address combined with different port numbers, or with a single port number combined with different IP addresses. So each of the following IP address and port number combinations would be considered a unique listener:

    10.10.10.1:80
    10.10.10.1:81
    10.10.10.2:80
    10.10.10.2:81
    
  • For HTTP listeners:

    • The default virtual server for the listener.

      Oracle Traffic Director routes requests to the default virtual server if it cannot match the Host value in the request header with the host patterns specified for any of the virtual servers bound to the listener. For information about specifying the host patterns for virtual servers, see Creating Virtual Servers.

    • The server name to be included in any URLs that are generated automatically by the server and sent to the client. This server name should be the virtual host name, or the alias name if your server uses an alias. If a colon and port number are appended to the server name then that port number is used in the autogenerated URLs.

  • For TCP listeners: TCP proxy for the listener.

    A TCP proxy handles TCP requests through TCP listeners for traffic tunnelling. A TCP proxy can have several TCP listeners associated with it. You can associate TCP listeners and configure TCP proxy settings from this page. See Creating a TCP Proxy.

Topics

You can create listeners by using either Fusion Middleware Control or WLST as described in the following topics:

Creating a Listener Using Fusion Middleware Control

To create an HTTP listener by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control, as described in Graphical User Interface-Fusion Middleware Control.

  2. Click the WebLogic Domain button at the upper left corner of the page.

  3. Select Administration > OTD Configurations.

    A list of the available configurations is displayed.

  4. Select the configuration for which you want to create a HTTP Listener.

  5. Click the Traffic Director Configuration In the Common Tasks pane.

  6. Select Administration > Listener.

  7. In the Common Tasks pane, click Create under HTTP Listener.

    The New HTTP Listener wizard appears.

  8. Follow the on-screen prompts to complete creation of the HTTP listener by using the details—listener name, IP address, port, and so on—that you decided earlier.

    Note:

    If certificates are available in the configuration, in the second screen of the wizard, an SSL/TLS check box will be available. If you want the new listener to receive HTTPS requests, click the check box to enable SSL/TLS and then select the appropriate certificate from the drop-down list.

    After the HTTP listener is created, the Results screen of the New HTTP Listener wizard displays a message confirming successful creation of the listener.

  9. Click OK on the Results screen.

    • The details of the listener that you just created are displayed on the Listeners page.

Creating a TCP Listener Using Fusion Middleware Control

To create a TCP listener by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control, as described in Graphical User Interface-Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to create a TCP Listener.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Listener.
  7. In the Common Tasks pane, click Create TCP Listener.

    The New TCP Listener wizard appears.

  8. Follow the on-screen prompts to complete creation of the TCP listener by using the details—listener name, IP address, port, and so on—that you decided earlier.

    Note:

    If certificates are available in the configuration, in the second screen of the wizard, an SSL/TLS check box will be available. If you want the new listener to receive T3S requests, click the check box to enable SSL/TLS and then select the appropriate certificate from the drop-down list.

    After the TCP listener is created, the Results screen of the New TCP Listener wizard displays a message confirming successful creation of the listener.

  9. Click OK on the Results screen.
    The details of the listener that you just created are displayed on the Listeners page.

Creating a Listener Using WLST

  • To create an HTTP listener, run the otd_createHttpListener command.

    For example, the following command creates an HTTP listener named http-listener-1 for the configuration foo with the port as 23456 and the default virtual server as bar.

    props = {}
    props['configuration'] = 'foo'
    props['http-listener'] = 'http-listener-1'
    props['port'] = '23456'
    props['server-name'] = 'example.com'
    props['default-virtual-server-name'] = 'bar'
    otd_createHttpListener(props)
    
  • To create a TCP listener, run the otd_createTcpListener command.

    For example, the following command creates a TCP listener named tcp_listener_1 for the configuration foo with the port as 34567 and the TCP proxy as tcp_proxy-1.

    props = {}
    props['configuration'] = 'foo'
    props['tcp-listener'] = 'tcp-listener-1'
    props['port'] = '34567'
    props['tcp-proxy-name'] = 'tcp-proxy-1'
    otd_createTcpListener(props)
    

Viewing a List of Listeners

After creating listeners, you can view the current list of listeners. To view the list of listeners, run the otd_listHttpListeners or the otd_listTcpListeners commands.

Topics

You can view the list of listeners by using either Fusion Middleware Control or WLST as described in the following topics:

Viewing a List of Listeners Using Fusion Middleware Control

To view a list of HTTP or TCP listeners by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control, as described in Displaying Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to view a HTTP or TCP Listener.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Listener.

    The Listeners page is displayed. It shows a list of the listeners defined for the configuration.

    Note:

    HTTP and TCP listeners can also be identified by their icons.

You can view the properties of a listener in detail by clicking on its name.

Viewing a List of Listeners Using WLST

  • To view a list of HTTP listeners, run the otd_listHttpListeners command, as shown in the following example:

    props = {}
    props['configuration'] = 'foo'
    otd_listHttpListeners(props)
    
    listener-1 
    listener-2 
    

    You can view the properties of an HTTP listener in detail by running the otd_getHttpListenerProperties command.

  • To view a list of TCP listeners, run the otd_listTcpListeners command, as shown in the following example:

    props = {}
    props['configuration'] = 'foo'
    otd_listTcpListeners(props)
    
    listener-1 
    listener-2 
    

    You can view the properties of a TCP listener in detail by running the otd_getTcpListenerProperties command.

Modifying a Listener

After you create a listener, you may need to modify some of the settings such as, listener port number, IP address, protocol family, and so on.

Topics

You can modify the listener settings by using either Fusion Middleware Control or WLST as described in the following topics:

Modifying a Listener Using Fusion Middleware Control

To modify an HTTP or TCP listener by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control, as described in Displaying Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to modify a HTTP or TCP Listener.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Listener.
    The Listeners page is displayed. It shows a list of the HTTP or TCP listeners defined for the configuration.
  7. Click the name of the listener that you want to modify.

    The Listener Settings page is displayed. On this page, you can do the following:

    • Enable and disable the listener.

    • Change the listener port number and IP address.

    • For HTTP listeners: Change the server name and the default virtual server.

    • For TCP listeners: Change the TCP proxy.

    • If server certificates have been created for the configuration, you can enable SSL/TLS and configure SSL/TLS settings for the listener. See Configuring SSL on a HTTP/TCP Listener.

    • Change the protocol family—IPv4, IPv6, or SDP—for which the listener should accept requests.

    • For HTTP listeners: Configure parameters to tune the performance of the virtual server—the number of acceptor threads, the listen queue size, receive buffer size, and so on. See Tuning HTTP Listener Settings.

  8. Specify the parameters that you want to change.

    On-screen help and prompts are provided for all of the parameters.

    When you change the value in a field or tab out of a text field that you changed, the Save button near the upper right corner of the page is enabled.

    At any time, you can discard the changes by clicking the Reset button.

  9. After making the required changes, click Save.
    • A message, confirming that the updated listener was saved, is displayed in the Console Messages pane.

    • In addition, the Deployment Pending message is displayed at the top of the main pane. You can either deploy the updated configuration immediately by clicking Deploy Changes, or you can do so later after making further changes as described in Activating Configuration Changes.

Modifying a Listener Using WLST

  • To change the properties of an HTTP listener, run the otd_setHttpListenerProperties command. For example, the following command changes the maximum requests per connection of the listener http-listener-1 in the configuration foo to 1024.

    props = {}
    props['configuration'] = 'foo'
    props['http-listener'] = 'http-listener-1'
    props['max-requests-per-connection'] = '1024'
    otd_setHttpListenerProperties(props)
    

    To change the SSL/TLS settings of an HTTP listener, run the otd_setHttpListenerSslProperties command. For example, the following command disables TLS 1.0 support for the listener http-listener-1 in the configuration foo.

  • props = {}
    props['configuration'] = 'foo'
    props['http-listener'] = 'http-listener-1'
    props['tls10'] = 'false'
    otd_setHttpListenerSslProperties(props)
    

    To change the properties of a TCP listener, run the otd_setTcpListenerProperties command. For example, the following command changes the maximum requests per connection of the listener tcp-listener-1 in the configuration foo to 1024.

  • props = {}
    props['configuration'] = 'foo'
    props['tcp-listener'] = 'tcp-listener-1'
    props['max-requests-per-connection'] = '1024'
    otd_setTcpListenerProperties(props)
    

    To change the SSL/TLS settings of an TCP listener, run the otd_setTcpListenerSslProperties command. For example, the following command disables TLS 1.0 support for the listener tcp-listener-1 in the configuration foo.

  • props = {}
    props['configuration'] = 'foo'
    props['tcp-listener'] = 'tcp-listener-1'
    props['tls10'] = 'false'
    otd_setTcpListenerSslProperties(props)
    

Deleting a Listener

You can delete listeners that are no longer required. To delete listeners, run the otd_deleteHttpListener or the otd_deleteTcpListener command.

Topics

You can delete listeners by using either Fusion Middleware Control or WLST as described in the following topics:

Deleting a Listener Using Fusion Middleware Control

To delete an HTTP or TCP listener by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control, as described in Displaying Fusion Middleware Control.
  2. Click the WebLogic Domain button at the upper left corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to delete an HTTP or TCP Listener.
  5. Click the Traffic Director Configuration In the Common Tasks pane.
  6. Select Administration > Listener.
    The Listeners page is displayed. It shows a list of the HTTP/TCP listeners defined for the configuration.
  7. Click the Delete icon for the listener that you want to delete.

    A prompt to confirm deletion of the listener is displayed.

    Note:

    If the HTTP listener is associated with virtual servers, the prompt shows the names of those virtual servers.

  8. Click Yes to proceed with the deletion.
    A message is displayed in the Console Message pane confirming that the HTTP/TCP listener was deleted.

Deleting a Listener Using WLST

  • To delete an HTTP listener, run the otd_deleteHttpListener command, as shown in the following example:

    props = {}
    props['configuration'] = 'foo'
    props['http-listener'] = 'http-listener-1'
    otd_deleteHttpListener(props)
    
  • To delete an TCP listener, run the otd_deleteTcpListener command, as shown in the following example:

    props = {}
    props['configuration'] = 'foo'
    props['tcp-listener'] = 'tcp-listener-1'
    otd_deleteTcpListener(props)
    

Configuring Status Listener

You can now configure dedicated status listeners to check the status of Oracle Traffic Director instances. Using a dedicated port to serve Oracle Traffic Director status ensures that Oracle Traffic Director is available to service status requests even when it is loaded.

In addition, you can secure the status listener by configuring SSL settings for the port.

You can configure listeners by using either Fusion Middleware Control or the WLST.

Configuring Status Listener using Fusion Middleware Control

To configure status listener by using the Fusion Middleware Control, do the following:

  1. Log in to Fusion Middleware Control, as described in Graphical User Interface-Fusion Middleware Control.
  2. If Certificates are not present, this section will ask you to generate certificates. Click the Weblogic Domain button at the upper right corner of the page.
  3. Select Administration > OTD Configurations.
    A list of the available configurations is displayed.
  4. Select the configuration for which you want to configure a status listener.
  5. Click the Traffic Director Configuration in the Common Tasks pane.
  6. Select Advanced Configuration > Status Listener.
  7. In the General Settings section, enable status listener by checking the Enabled check box and specify the details like port, IP address, and so on - that you decided earlier.
  8. Click Apply.
    • The details of the status listener that you just configured are displayed on the Status Listener page.

    • The SSL/TLS Settings and Advanced Settings sections are displayed.

  9. In the SSL/TLS Settings section, enable SSL for the listener.

    If certificates are present, this section will allow you to select a certificate and enable SSL for the listener. To generate a certificate, click Manage Certificates.

    • Select the SSL/TLS check box to enable certificates

    • In the RSA Certificate and ECC Certificate fields, select the certificates that you want to use to authenticate the server.

  10. The Advanced Settings pane displays the SSL/TLS advanced settings. SSL/TLS Settings are available if the configuration has certificates.

    In the SSL/TLS Settings section, specify settings for the SSL or TLS security protocols- that you decided earlier.

  11. After entering the details, click Apply.

    A message confirming that a status listener was configured, is displayed in the Console Messages pane.

    When you change the value in a field or tab out of a text field that you changed, the Apply button near the upper right corner of the page is enabled.

    At any time, you can discard the changes by clicking the Revert button.

  12. Restart the instances of the configuration by clicking Start Instances/Restart Instances in the Oracle Traffic Director Configuration pane.

Configuring Status Listener Using WLST

  • Enabling/changing properties of a status listener

    To enable a status listener or to change the non-SSL properties of a status listener, run the otd_enableStatusListener command, as shown in the example:

    • To enable a status listener

      props = {}
      props['configuration'] = 'foo'
      props['port'] = '12345'
      otd_enableStatusListener(props)
      
    • To change the non-SSL properties of a status listener

      Consider a status listener which was enabled as shown in the previous example. This means that the ip and family values are * and default respectively. To re-configure the IP address and port for this status listener, run the otd_enableStatusListener command, as shown in the example:

      props = {}
      props['configuration'] = 'foo'
      props['ip'] = '127.0.0.1'
      props['port'] = '2016'
      otd_enableStatusListener(props)
      
  • Disabling a status listener

    To disable a status listener, run the otd_disableStatusListener command, as shown in the example:

    props = {}
    props['configuration'] = 'foo'
    otd_disableStatusListener(props)
    
  • Viewing properties of status listener properties

    To view the status listener properties, run the otd_getStatusListenerProperties command, as shown in the example:

    props = {}
    props['configuration'] = 'foo'
    otd_getStatusListenerProperties(props)
    
  • Changing the SSL properties of status listener

    To change the SSL properties of status listener, run the otd_setStatusListenerSslProperties command, as shown in the example:

    To disable SSL on a status listener, set the enabled property to false.

    props = {}
    props['configuration'] = 'foo'
    props['enabled'] = 'false'
    otd_setStatusListenerSslProperties(props)
    
  • Viewing the status listener SSL properties

    To view the SSL properties of a status listener, run the otd_getStatusListenerSslProperties command, as shown in the example:

    props = {}
    props['configuration'] = 'foo'
    otd_getStatusListenerSslProperties(props)