Tuesday, June 30, 2015

Changing the host name of WebSphere

Below operations should be performed after stopping the servers (nodeagent , dmgr , servers).
If you are planning to change the host name in a network deployment installation . Then you have to change the host name for  the nodes on all the hosts , starting from dmgr node to other nodes one by one . Start the dmgr , synchronize the nodes   and then start the nodeagents and servers.
 Please note that dmgr also has one node associated with it . Though we usually call it as dmgr only .

At the dmgr host , you have to change the host name  for dmgr node and other nodes.

At other nodes , you have to just change the host name for that particular node.



You can change the language to jython if it is not updated in wsadmin.properties.
Default language setup in wsadmin.properties is jacl.

Run the below commands
wsadmin -conntype none

AdminTask.changeHostName ('[-interactive]')
It will ask for the node name

The syntax for jacl is
$AdminTask changeHostName {-interactive}

Enter the node name which can be directly read from the WAS_ROOT/profiles/profile name/config/cell/cell name/nodes/node name  directory.


It will ask for the host name

Enter the desired host name


It will ask for the system name

Leave it Blank .

It will ask whether you want to generate default certificates
Enter true or false

true is the only valid value , rest of the values are taken as false only .

It will ask for whether to finish or cancel
Enter F for Finish


Enter the command
AdminConfig.save()

The syntax for jacl is
$AdminConfig save

exit


Start the dmgr , synchronize  the nodes and then start the nodeagents and servers.