This chapter describes how to create, view, modify, and delete listeners. It contains the following topics:
You can create listeners by using either Fusion Middleware Control or the WLST.
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.
For HTTP listeners: 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.
For more information about creating TCP proxies, see Creating a TCP Proxy.
Creating an HTTP Listener Using Fusion Middleware Control
To create an HTTP listener by using the Fusion Middleware Control, do the following:
Log in to Fusion Middleware Control, as described in Displaying Fusion Middleware Control.
Click the WebLogic Domain button at the upper left corner of the page.
Select Administration > OTD Configurations.
A list of the available configurations is displayed.
Select the configuration for which you want to create a HTTP Listener.
Click the Traffic Director Configuration In the Common Tasks pane.
Select Administration > Listener.
In the Common Tasks pane, click Create under HTTP Listener.
The New HTTP Listener wizard starts.
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.
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:
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)
For more information, see the otd_createHttpListener
and otd_createTcpListener
commands in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.
You can view a list of HTTP or TCP listeners by using either Fusion Middleware Control or the WLST.
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:
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.
For more information, see otd_listHttpListeners
and otd_getHttpListenerProperties
commands in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.
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 an TCP listener in detail by running the otd_getTcpListenerProperties
command.
For more information about the otd_listTcpListeners
and otd_getTcpListenerProperties
commands in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.
You can modify listeners by using either Fusion Middleware Control or the WLST.
Modifying a Listener Using Fusion Middleware Control
To modify an HTTP or TCP listener by using the Fusion Middleware Control, do the following:
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)
For a list of the properties that you can set or change, see the otd_setTcpListenerProperties
command in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.
You can delete HTTP or TCP listeners by using either Fusion Middleware Control or the WLST.
Deleting a Listener Using Fusion Middleware Control
To delete an HTTP or TCP listener by using the Fusion Middleware Control, do the following:
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)
For more information, see otd_deleteHttpListener
and otd_deleteTcpListener
in the WebLogic Scripting Tool Command Reference for Oracle Traffic Director.
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.
To configure status listener by using the Fusion Middleware Control, do the following:
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 reconfigure 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)
For information about the WLST commands mentioned in this section, see WebLogic Scripting Tool Command Reference for Oracle Traffic Director.