Change the node host names


 

+

Search Tips   |   Advanced Search

 

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 the wsadmin scripting tool, 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 the wsadmin scripting tool. The other example task shows how to correct the host name of the server ports using the admin console and command line tools.

 

Correct the host name for an appserver node, a node agent, or a dmgr node

  1. Launch wsadmin...

    wsadmin -lang jython

  2. List the contents of the server configuration file...

    AdminConfig.list('ServerIndex')

  3. In the output, find the ServerIndex object for the appserver node, the node agent, or the dmgr,

    Application server and node agent:

    cells/isthmusCell16/nodes/isthmusNode06|serverindex.xml#ServerIndex_1

    Deployment manager:

    cells/isthmusCell16/nodes/isthmusCellManager06|serverindex.xml#ServerIndex_1

  4. Modify the host name for the appserver node, the node agent, or the dmgr...

    Application Server and node agent:

    AdminConfig.modify('(cells/isthmusCell16/nodes/isthmusNode06|serverindex.xml#ServerIndex_1)', "[[hostName new_host_name]]")

    Deployment manager:

    AdminConfig.modify('(cells/isthmusCell16/nodes/isthmusCellManager06|serverindex.xml#ServerIndex_1)', "[[hostName new_host_name]]")

  5. Verify that the host names are correct...

    Application Server and node agent:

    AdminConfig.show('(cells/isthmusCell07/nodes/isthmusCellManager07| serverindex.xml#ServerIndex_1)', 'hostName')

    The response is:

    '[hostName isthmus]'

    Deployment manager:

    AdminConfig.show('(cells/isthmusCell07/nodes/isthmusNode04| serverindex.xml#ServerIndex_1)', 'hostName')

    The response is:

    '[hostName isthmus]'

  6. Save the configuration...

    AdminConfig.save()

  7. Type exit to end the wsadmin session.

  8. If we changed the host names for the appserver and node agent, update the node with the changes.

    1. Stop the node agent....

      stopNode -profileName AppSrv01

    2. Stop the appserver...

      stopServer server1 -profileName AppSrv01

    3. Synchronize the nodes...

      syncNode deployment_manager_host deployment_manager_port

    4. Restart the node agent...

      startNode -profileName AppSrv01

    5. Restart the appserver...

      startServer server1 -profileName AppSrv01

  9. If we changed the host name for the dmgr, restart the dmgr to apply the changes.

    1. Stop the dmgr...

      stopManager -profileName DMgr01

    2. Start the dmgr...

      startManager -profileName DMgr01

 

Correct the host names for the ports that an appserver, node agent, or dmgr 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 admin console. We 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.

  1. For the appserver, select...

    Servers | Application servers | appserver | Ports

    For the node agent, select...

    System administration | Node agents | node_agent | Ports

    For the dmgr, select...

    System administration | Deployment manager | Ports

  2. Select a port whose host name needs changing.

  3. Change the host name in the Host field; Click OK.

  4. Continue selecting ports and changing host names until you correct each of the host names for the server ports.

  5. Save the changes to the master configuration.

  6. If we changed the host names for the appserver and node agent, update the node with the changes.

    1. Stop the node agent.

    2. Stop the appserver.

      • Select...

        Servers | Application servers

      • Select the server to stop.

      • Click Stop.

    3. Synchronize the nodes...

      syncNode deployment_manager_host deployment_manager_port

    4. Restart the node agent.

    5. Restart the appserver.

      • Select...

        Servers | Application servers

      • Select the server to restart.

      • Click Start.

  7. If we changed the host name for the dmgr, restart the dmgr to apply the changes.

    1. Stop the dmgr.

    2. Start the dmgr....

      startManager -profileName DMgr01

 

Related tasks

Manage nodes
Create an appserver profile
Create a custom profile
Create a management profile with a dmgr
Introduction: Administrative scripting (wsadmin)
Use command line tools