WAS v8.5 > Secure applications > Authenticate users > Select an authentication mechanism > Configure LTPA and work with keys > Step 2. Generate keys manually or automatically, and control the number of active keys. > NodesChange host names
After creating a profile, the host name of the server or its ports might be incorrect. We can follow the examples to change the server host name using command line tools and the wsadmin scripting tool, and the host names of the server ports using the dmgr console and command line tools.
Create a profile. Verify the host name of the server and the server ports are correct.
If the host name of a server or its ports is incorrect, then you might experience problems such as errors when we attempt to stop a server. One example task shows how to correct the server host name through command line tools and the wsadmin scripting tool. The other example task shows how to correct the host name of the server ports using the dmgr console and command line tools.
- Correct the host name for an application server using the wsadmin scripting tool and command line tools.
- Launch wsadmin.
Enter the following command:
wsadmin -lang jython
- List the contents of the server configuration file.
Enter the following line of code:
AdminConfig.list('ServerIndex')
- In the output, find the ServerIndex object for the application server, similar to the following example:
cells/isthmusCell16/nodes/isthmusNode06|serverindex.xml#ServerIndex_1
- Modify the host name for the application server, similar to the following example:
Enter the following line of code:
AdminConfig.modify('(cells/isthmusCell16/nodes/isthmusNode06|serverindex.xml #ServerIndex_1)', "[[hostName new_host_name]]")The command is split on multiple lines for printing purposes.
- Modify the host name for the Daemon instance as it applies to the application server, node agent, and deployment manager.
- Verify the host name is correct, similar to the following example:
Enter the following line of code:
AdminConfig.show('(cells/isthmusCell07/nodes/isthmusCellManager07| serverindex.xml#ServerIndex_1)', 'hostName')The response is:'[hostName isthmus]'
The command is split on multiple lines for printing purposes.
- Save the configuration.
Enter the following line of code:
AdminConfig.save()
- Type exit to end the wsadmin session.
- Update the application server with the changes.
- Stop the application server.
Enter the following command:
stopServer server1 -profileName AppSrv01
- Restart the application server.
Enter the following command:
startServer server1 -profileName AppSrv01
- Correct the host names for the ports that an application server opens.
If we have to correct the host names of the server ports, then we can make the correction using command line tools and either the wsadmin scripting tool or the dmgr console. You might have to correct the host names of multiple ports for a particular server. This example shows you how to correct the host names using the dmgr console and command line tools.
- For the application server, select Servers > Server Types > WebSphere 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.
- Update the application server with the changes.
- Stop the application server.
- Select Servers > Server Types > WebSphere application servers.
- Select the server to stop.
- Click Stop.
- Restart the application server.
Enter the following command:
startServer server1 -profileName AppSrv01
Results
You have changed the host name of the server, the host names of the server ports, or both.
We can continue to administer the product by doing tasks such as deploying the applications to run on this server.
Related
Create application server profiles
manageprofiles command
Introduction: Administrative scripting (wsadmin)
Use command-line tools