WebSphere Application Server & Liberty

 View Only
  • 1.  Is there a way to rename server1 to server2 on WAS Base (standalone)

    Posted Mon September 25, 2023 09:05 AM

    Hi everyone,

    I need to rename server name 'server1' to 'server2' on a WAS 9.0.5 Base edition.

    I could not find anything relevant, apart from some >10 years ago posts that suggested getting some WAS scripts (ConfigScrips.zip) from Developer Works and run a command using some exportimport.xml as the config file.

    Although I found on GitHub, an old version of the scripts, it did not work.

    Has anyone managed to do this?

    BR



    ------------------------------
    Christos Chorattides
    Datatech
    ------------------------------


  • 2.  RE: Is there a way to rename server1 to server2 on WAS Base (standalone)

    Posted Tue September 26, 2023 09:12 AM

    Hi, there is no easy way to do this.  The easiest is probably to go to the profile and just use Linux/Unix find and sed commands to change the name of server1 to something else for all files.

    Brian



    ------------------------------
    Brian S Paskin
    Sr. Technology Engineer
    IBM Cloud Engineering
    ------------------------------



  • 3.  RE: Is there a way to rename server1 to server2 on WAS Base (standalone)

    Posted Tue September 26, 2023 09:47 AM

    Thank you Brian,

    WAS is on Windows, so is it safe to search under WAS_HOME in all .xml files and replace server1 or do I have to search all files?

    BR



    ------------------------------
    Christos Chorattides
    Datatech
    ------------------------------



  • 4.  RE: Is there a way to rename server1 to server2 on WAS Base (standalone)

    Posted Tue September 26, 2023 10:53 AM

    Yes, under profile_home/config.  Most are under cells/cellName, but a few are under templates, as well.

    Brian



    ------------------------------
    Brian S Paskin
    Sr. Technology Engineer
    IBM Cloud Engineering
    ------------------------------



  • 5.  RE: Is there a way to rename server1 to server2 on WAS Base (standalone)

    Posted Wed September 27, 2023 03:50 AM

    Ok, findings:

    Search *.xml under profile/config: 20 hits in 17 files
    Search *.xml under profile: 30 hits in 25 files. Some additional hits under InstalledApps from defaultapp.
    Search *.xml under WAS_HOME: 75 hits in 49 files. Mostly under WAS_HOME/profileTemplates and under WAS_HOME/lib/was-isadc/scripts/...
    Search *.* under WAS_HOME: 6718 hits in 220 files. Many hits in .log files. Also hits in .txt, .bat (.sh perhaps in Unix), .jacl and a few directories.

    Perhaps it may be better to just drop and re-create the profile. No apps are deployed yet.

    BR



    ------------------------------
    Christos Chorattides
    Datatech
    ------------------------------



  • 6.  RE: Is there a way to rename server1 to server2 on WAS Base (standalone)

    Posted Thu September 28, 2023 03:24 AM

    Hello, you will find references to server1 in several places like profileTemplates directory, because this is the default name for a server, but one thing you might be sure the ones that you want to change are under your profile directory, all the other ones you shall not change.



    ------------------------------
    JOAO PEDRO ALEXANDRE
    ------------------------------



  • 7.  RE: Is there a way to rename server1 to server2 on WAS Base (standalone)

    Posted Thu September 28, 2023 03:28 AM

    But if you really do not have anything deployed there yet, you are right, it easy better to delete the profile and recreated with the right name.



    ------------------------------
    JOAO PEDRO ALEXANDRE
    ------------------------------



  • 8.  RE: Is there a way to rename server1 to server2 on WAS Base (standalone)

    Posted Thu September 28, 2023 04:35 AM

    Thank you very much for the clarification.



    ------------------------------
    Christos Chorattides
    Datatech
    ------------------------------