Network Deployment (Distributed operating systems), v8.0 > Secure applications and their environment > Authenticate users > Select an authentication mechanism > Configure LTPA and working with keys > 2. Generate keys manually or automatically, and control the number of active keys. > Work with nodes - groups of managed servers
Change the node host names
After creating a profile or adding a node, 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 wsadmin.sh, and the host name of the server ports using the admin console and command line tools. Create a profile or add a node to a cell. Verify that 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 you attempt to stop a server. One example task shows how to correct the server host name through command line tools and wsadmin.sh. The other example task shows how to correct the host name of the server ports using the admin console and command line tools.
Procedure
- Correct the host name for an application server node, a node agent, or a dmgr node using wsadmin.sh and command line tools.
- Launch wsadmin.sh.
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 node, the node agent, or the dmgr, similar to the following examples:
Application server and node agent:
cells/isthmusCell16/nodes/isthmusNode06|serverindex.xml#ServerIndex_1Deployment manager:cells/isthmusCell16/nodes/isthmusCellManager06|serverindex.xml#ServerIndex_1- Modify the host name for the application server node, the node agent, or the dmgr, similar to the following examples:
Application server and node agent:
Enter the following line of code:
AdminConfig.modify('(cells/isthmusCell16/nodes/isthmusNode06|serverindex.xml #ServerIndex_1)', "[[hostName new_host_name]]")Deployment manager:
Enter the following line of code:
AdminConfig.modify('(cells/isthmusCell16/nodes/isthmusCellManager06| serverindex.xml#ServerIndex_1)', "[[hostName new_host_name]]")The commands are split on multiple lines for printing purposes.
- Modify the host name for the Daemon instance, similar to the following examples:
Application server and node agent:
Enter the following line of code:
AdminTask.modifyNodeGroupProperty('DefaultNodeGroup', '[ -name was.WAS_DAEMON_protocol_iiop_daemon_listenIPAddress -value newHostname]')Deployment manager:
Enter the following line of code:
AdminTask.modifyNodeGroupProperty('DefaultNodeGroup', '[ -name was.WAS_DAEMON_protocol_iiop_daemon_listenIPAddress -value newHostname]')
- Verify that the host names are correct, similar to the following examples:
Application server and node agent:
Enter the following line of code:
AdminConfig.show('(cells/isthmusCell07/nodes/isthmusCellManager07| serverindex.xml#ServerIndex_1)', 'hostName')The response is:'[hostName isthmus]'Deployment manager:
Enter the following line of code:
AdminConfig.show('(cells/isthmusCell07/nodes/isthmusNode04| serverindex.xml#ServerIndex_1)', 'hostName')The response is:'[hostName isthmus]'The commands are 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.
- If you changed the host names for the application server and node agent, update the node with the changes.
- Stop the node agent.
Enter the following command:
stopNode -profileName AppSrv01- Stop the application server.
Enter the following command:
stopServer server1 -profileName AppSrv01- Use the syncNode script found in each federated node's /bin directory to synchronize the changes from the master configuration in the node
Deployment manager:
Enter the following command:
syncNode <DMGR_HOST> <SOAP_PORT>
- Restart the node agent.
Enter the following command:
startNode -profileName AppSrv01
- Restart the application server.
Enter the following command:
startServer server1 -profileName AppSrv01
- If you changed the host name for the dmgr, restart the dmgr to apply the changes.
- Stop the dmgr(from the dmgr's /bin directory)..
Enter the following command:
stopManager -profileName DMgr01- Start the dmgr.
Enter the following command:
startManager -profileName DMgr01
- Correct the host names for the ports that an application server, node agent, or dmgr opens.
If we have to correct the host names of the server ports, then you can make the correction using command line tools and either the wsadmin scripting tool or the admin 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 admin console and command line tools.
- For the application server, select Servers > Server Types > WebSphere application servers > application_server > Ports. For the node agent, select System administration > Node agents > node_agent > Ports. For the dmgr, select System administration > Deployment manager > 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.
- If you changed the host names for the application server and node agent, update the node with the changes.
- Stop the node agent.
- Select System administration > Node agents.
- Select the node agent to stop.
- Click Stop.
- Stop the application server.
- Select Servers > Server Types > WebSphere application servers .
- Select the server to stop.
- Click Stop.
- Synchronize the nodes.
Enter the following command:
syncNode deployment_manager_host deployment_manager_port
- Restart the node agent.
- Select System administration > Node agents.
- Select the node agent to restart.
- Click Restart.
- Restart the application server.
- Select Servers > Server Types > WebSphere application servers .
- Select the server to restart.
- Click Start.
- If you changed the host name for the dmgr, restart the dmgr to apply the changes.
- Stop the dmgr.
- Select System administration > Deployment manager.
- Click Stop.
- Start the dmgr.
Enter the following command:
startManager -profileName DMgr01
Results
You have changed the host name of the server, the host names of the server ports, or both.
What to do next
We can continue to administer the product by doing such tasks as managing nodes, node agents, and node groups.
Manage nodes
Create application server profiles
Create cell profiles
Create custom profiles
Create management profiles with dmgrs
manageprofiles command
Introduction: Administrative scripting (wsadmin)
Use command-line tools