Changing node names and host names


Dustin’s note: Seeing as the wsadmin command to rename a cell is not officially documented or supported, I have removed it from this post. I’m sorry, but it is for your own good!!
It seems like I get asked quite a bit about how to change node names and host names for a given WebSphere Application Server environment. It usually starts by someone asking me what configuration files they need to change when they want to update this information, and is followed by their surprise when I tell them none. The reason I say that is because it’s time consuming, hard, and unnecessary for you to figure this out. Instead, you can use two simple wsadmin commands. I’ll give you an example of those here (all written in Jython).
To change the name of a given node, use the following wsadmin command:

AdminTask.renameNode(‘[-nodeName <existing_node_name> -newNodeName <new_node_name>]’)

This updates the name of the node specified by the nodeName parameter to the name specified by the newNodeName parameter.

 

To change the host name for a given node, use the following wsadmin command:

AdminTask.changeHostName(‘[-nodeName <node_name> -hostName <new_host_name>]’)

This updates the host name for the node specified in the nodeName parameter to the value specified in the hostName parameter.

 

These commands update all of the necessary WAS configuration, but do keep in mind they do not update any shell or batch files in the environment. This means you need to update the setupCmdLine script included in your WAS installation, and you obviously need to update any of your custom scripts that have hard coded values for node and host names.
Advertisements

8 Responses to “Changing node names and host names”

  1. Tweets that mention Changing cell names, node names, host names « Dustin's Blog -- Topsy.com Says:

    […] This post was mentioned on Twitter by Dustin Amrhein, Bleddyn Williams and Stephane WACONGNE, Stephane WACONGNE. Stephane WACONGNE said: @WebSphereClouds thanks a lot for the tip on renaming cellName nodeName & hostName in #websphere app server http://bit.ly/9MpAHz […]

  2. Watch out for this restoreConfig gotcha! « Dustin's Blog Says:

    […] cell, node, and host names across the installations (something you can overcome by using the commands I talked about here), the two installations existed at different file path locations on their respective disks. On the […]

  3. Doug Rockney Says:

    Thanks a bunch for this hint – worked like a champ!

    One note, though: if you’re changing an ND environment, you need to run the renameCell on both the Deployment Manager and nodeagent instances, then start the Deployment Manager. Once it’s running, run syncNode before starting the nodeagent.

  4. Les Says:

    Dustin;

    Your post on “Changing cell names, node names, host names” was a great help in transitioning an old Windows 2000 Websphere install to 2003. Had to install on Websphere new server with different host name. Used the instructions to change the Cell/Node/Host name in websphere post install.

  5. Ricardo Says:

    Your post really help me thank you

  6. Pavlos Says:

    Hello there,
    I know it’s been well over than one year, but i’ve got a comment/question. We’ve got an ND environment (WPS 6.2.0.3) – golden topology and we followed Doug’s advice as well (quoting)
    “One note, though: if you’re changing an ND environment, you need to run the renameCell on both the Deployment Manager and nodeagent instances, then start the Deployment Manager. Once it’s running, run syncNode before starting the nodeagent.”
    We’ve observed that the name of the SIBBuses haven’t changed and still contain the old cell name (eg SCA.SYSTEM.uatCELL.Bus – whereas the new cell name is uat-vf-CELL). Do you know how to go about it?Any ideas would be highly appreciated

    Thanks a lot in advance

    Pavlos

  7. mirvpgh Says:

    Reblogged this on Mirv in the 'Burgh and commented:
    Attn: WebSphere users – this is good to know.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: