Monday, January 26, 2009

How to change websphere app. server name from server1 to something usefull

If you are running WSAS as a standalone server (no deployment manager or cluster) you probably created a profile with a default server called server1. This is ok unless you have 2 profiles with 2 servers both called server1! Due to a bug in WSAS this will prevent EJB communication between them in some cases so you need to rename one of them!

This is not a simple task without deployment manager. You have to do it via scripts. IBM provides this scripts for free but they are not easy to find :-)

URL is:
http://www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html


and you are looking for ConfigScripts.zip

To rename it:
/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/ws_ant.sh -profileName AppSrv01 -buildfile exportImport.xml -logfile rename.log -DoldServerName=server1 -DnewServerName=server2 -DnodeName=yourNode01 changeServerName


I would expect this to be a much easier process but IBM obviously doesn't share my ideas...

11 comments:

  1. hi there, thanks for this tip
    it seems like the command worked but i cannot start the server with the new name.
    any clue?

    ReplyDelete
  2. It seems like, I'm able to start the app with new name. However it doesn't get reflected in the deployment Manager. Is there some additional steps to get there?

    ReplyDelete
  3. I'm good nw - thanks

    ReplyDelete
  4. I'm good nw - thanks

    ReplyDelete
  5. I have no words for this great post such a awe-some information i got gathered. Thanks to Author.
    Avatar Html5 Player

    ReplyDelete
  6. getting error as exportImport.xml does not exist. Please help

    ReplyDelete
  7. exportImport.xml is present in ConfigScripts.zip (see above for download link from IBM )

    ReplyDelete
  8. Hello All,

    Could someone please Confirm if I can rename the Web server in WebSphere 8.5 through this script.

    ReplyDelete
  9. I'm running WAS 8.5, and I'm getting an "unsupported environment" exception. Any ideas of how to re-name my Server1 managed web application instance? My instances are not clustered, so I can't use that trick. Thanks for your help!


    [wsadmin] You run the script on unsupported release environment
    [wsadmin] This script only work on release 5.1.1 or later version 5.x
    [wsadmin] WASX7309W: No "save" was performed before the script "ValidateRelease.jacl" exited; configuration changes will not be saved.

    BUILD FAILED
    /app/IBM/WAS85/profiles/AppSrv01/bin/exportimport/exportImport.xml:35: Your try to run the script on WebSphere Version 6 which is not a supported environment.

    ReplyDelete