3 Replies Latest reply: Feb 25, 2013 1:29 PM by Peter.Lorenzen RSS

    WLST startup script

    762955
      Can someone help me with a script that dose the following?
      1. The script would start the node manager first
      2. In the script it would connect to the node manager.
      3 .Start admin server
      4. Then it would start the managed servers.

      From my understanding the script should be able to utilize userConfigFile, userKeyFile options in order to provide credentials to the script without user interaction.

      Below is what I have so far. I would like the script to be flexible so that I can be used on more than one system perhaps using variables.

      #invoke WLST
      Java weblogic.WLST
      
      #set variables 
      Hostname1=managed1
      Hostname2=managed2
      
      #connect to NodeManager
      startNodeManager(verbose='true', NodeManagerHome='/pathtoNodeMNHOME/nodemanager', ListenPort='6666', ListenAddress='myhost'))
      nmConnect(userConfigFile='/myfiles/myuserconfigfile.secure', userKeyFile='/myfiles/myuserkeyfile.secure', host='hostname', port=6666, domainName='mydomain', domainDir='/pathToDomainHome/mydomain', mType='ssl')
      
      #start servers
      mnStart(“AdminServer”)
      mnStart(“hostname1”)
      mnStart(“hostname2”)
        • 1. Re: WLST startup script
          Peter.Lorenzen
          Hi user9311551,

          Is this as script you want to use when the server boots? If so you only need to start the Node Manager. If the Node Manager is properly configured it will start the Admin Server and all the Managed Servers.

          Here are some scripts to start the Node Manager at boot:
          http://theheat.dk/blog/?p=422#auto

          Yes you can use userConfigFile and userKeyFile so you do not have to provide passwords:
          http://theheat.dk/blog/?p=157

          Regards Peter
          • 2. Re: WLST startup script
            762955
            The script will be manually ran when required to start or stop managed servers, Admin server, and node manager.
            • 3. Re: WLST startup script
              Peter.Lorenzen
              OK. I have never tired to start the Node Manager like that I always use the MW_HOME/wlserver_12.1/server/bin/startNodeManager.sh.

              But try having a look at this:
              http://middlewaremagic.com/weblogic/?p=6580

              Regards Peter