- Oracle WebLogic Server 12c Advanced Administration Cookbook
- Dalton Iwazaki
- 484字
- 2025-04-04 22:44:31
Defining a Hostname/Alias for the Listen Address value
The WebLogic Managed Server instances of the cluster were created in the previous recipe but a Listen Address value was not assigned to any of it.
The objective of this recipe is to assign a unique hostname or alias as the Listen Address value for each of the Managed Servers instead of assigning the prod01
, prod02
hostnames or the IP address.
Getting ready
For the cluster PROD_Cluster
the FQDNs: prodsrv01.domain.local
, prodsrv02.domain.local
, prodsrv03.domain.local
, and prodsrv04.domain.local
will be used as the listen addresses. For example, PROD_Server01
, PROD_Server02
, PROD_Server03
, and PROD_Server04
, will be used respectively.
From the WebLogic configuration perspective, it doesn't make any difference if the addresses prodsrv01.domain.local
, prodsrv02.domain.local
, prodsrv03.domain.local
, and prodsrv04.domain.local
point to the IP addresses of the machines prod01
and prod02
or to Virtual IP addresses (VIP).
How to do it...
To change and configure the listen addresses of the Managed Servers:
- Access the Administration Console with your web browser at
http://prod01.domain.local:7001/console
. - Click on the Lock & Edit button to start a new edit session.
- Expand the Environment tree on the left and click on Servers.
- Click on the
PROD_Server01
server to navigate to the Configuration | General tab of the first Managed Server. - Type
prodsrv01.domain.local
in the Listen Address field, as shown in the following screenshot. Click on the Save button. - Repeat the previous steps to configure
PROD_Server02
,PROD_Server03
, andPROD_Server04
to useprodsrv02.domain.local
,prodsrv03.domain.local
, andprodsrv04.domain.local
in the Listen Address field. Click on the Save button in each step. - Click on the Activate Changes button.
How it works...
The uniqueness of the Listen Address field is an important configuration as it allows the WebLogic cluster to provide the flexibility needed for high availability, and to use the automatic/manual server and service migration. It also guarantees the independence and decoupling of each of the WebLogic Managed Server configurations.
It's also a good practice to use a different Listen Port for the Managed Servers. Using different hostname:port
combinations should avoid possible port conflicts when two Managed Servers would possibly listen for the same IP address if a migration situation arises.
Tip
As a rule of thumb, use a unique hostname for the Listen Address field and a unique port for the Listen Port field. Also always use a fully qualified domain name.
There's more...
Setting the Listen Address value can also be done using WLST.
Defining the Listen Address value using WLST
Carry out the following steps to change the Listen Address value:
- Log in as a
wls
user to shell and start WLST:[wls@prod01]$ $WL_HOME/common/bin/wlst.sh
- Connect to the Administration Server using
wlsadmin
as the user,<pwd>
as the password andt3://prod01.domain.local:7001
as the server URL:wls:/offline> connect("wlsadmin","<pwd>","t3://prod01.domain.local:7001")
- Run the following WLST commands to create the cluster and the server instances:
edit() startEdit() cd('/Servers/PROD_Server01') cmo.setListenAddress('prodsrv01.domain.local') cd('/Servers/PROD_Server02') cmo.setListenAddress('prodsrv02.domain.local') cd('/Servers/PROD_Server03') cmo.setListenAddress('prodsrv03.domain.local') cd('/Servers/PROD_Server04') cmo.setListenAddress('prodsrv04.domain.local') activate() exit()
See also
- Defining a network channel for cluster communications
- Configuring high availability for Administration Server