If you are moving your IBM WebSphere Application Server configuration or migrating your environment, you might have to change host names or migrate profiles from one machine to another.
For example, the old hostname is example.com
, we want to change to test317.java.boot.by
If the host name of a server or its ports is incorrect, then you might experience problems such as errors when you attempt to stop a server.
First, correct the host name for an application server using the wsadmin.sh
scripting tool and command line tools.
test317:/opt/IBM/WebSphere/AppServer/bin # ./wsadmin.sh -conntype NONE -lang jython WASX7357I: By request, this scripting client is not connected to any server process. Certain configuration and application operations will be available in local mode. WASX7031I: For help, enter: "print Help.help()"
wsadmin>AdminConfig.list('ServerIndex') '(cells/exampleNode01Cell/nodes/exampleNode01|serverindex.xml#ServerIndex_1)'
wsadmin>AdminConfig.modify('(cells/exampleNode01Cell/nodes/exampleNode01|serverindex.xml#ServerIndex_1)', "[[hostName test317.java.boot.by]]") ''
wsadmin>AdminConfig.show('(cells/exampleNode01Cell/nodes/exampleNode01|serverindex.xml#ServerIndex_1)', 'hostName') '[hostName test317.java.boot.by]'
wsadmin>AdminConfig.save() ''
wsadmin>exit
test317:/opt/IBM/WebSphere/AppServer/bin # ./stopServer.sh server1 -profileName AppSrv01 ADMU0116I: Tool information is being logged in file /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/stopServer.log ADMU0128I: Starting tool with the AppSrv01 profile ADMU3100I: Reading configuration for server: server1 ADMU3201I: Server stop request issued. Waiting for stop status. ADMU4000I: Server server1 stop completed.
test317:/opt/IBM/WebSphere/AppServer/bin # ./startServer.sh server1 -profileName AppSrv01 ADMU0116I: Tool information is being logged in file /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/startServer.log ADMU0128I: Starting tool with the AppSrv01 profile ADMU3100I: Reading configuration for server: server1 ADMU3200I: Server launched. Waiting for initialization status. ADMU3000I: Server server1 open for e-business; process id is 52604 test317:/opt/IBM/WebSphere/AppServer/bin #
Now, the hostname looks as follows:
Second, you need to correct the host names for the ports that an application server opens.
For the application server, select Servers > Application servers > application server > Ports.
Select a port whose host name needs changing.
Change the host name in the Host field; Click OK.
Continue selecting ports and changing host names until you correct each of the host names for the server ports.
Save the changes to the master configuration.
Restart the server.
![]() ![]() ![]() |