6 Replies Latest reply: Jul 24, 2012 9:55 AM by mscongdon RSS

    shutdown(block='false') only works via Admin Server, not managed servers

    mscongdon
      Hello,

      We want to shut down all 10 managed servers in our domain gracefully, and in parallel. 5 of those managed servers are on the same OS/host as the AdminServer, the other 5 are on a separate OS/host (i.e. we have 5 x 2-node clusters).

      I'm writing scripts to gracefully shut down all of our servers upon an OS reboot command. On the OS with the AdminServer (and 5 managed servers), I can simply do this:

      connect(user, pwd, http://localhost:7001)
      shutdown('myserver1', 'Server', block='false')
      shutdown('myserver3', 'Server', block='false')
      shutdown('myserver5', 'Server', block='false')
      shutdown('myserver7', 'Server', block='false')
      shutdown('myserver9', 'Server', block='false')

      All 5 servers will be shutting down at the same time. If they each took 2 minutes to shut down, the whole shutdown process would take 2 minutes.

      However, on the OS running the other managed servers, I cannot assume that the AdminServer [on the other OS] will be online. Hence, I would like to gracefully shut down each server locally like this:

      connect(user, pwd, url='t3://localhost:8001')
      shutdown(block='false')
      disconnect()
      connect(user, pwd, url='t3://localhost:9001')
      shutdown(block='false')
      disconnect()
      connect(user, pwd, url='t3://localhost:10001')
      shutdown(block='false')
      disconnect()
      connect(user, pwd, url='t3://localhost:11001')
      shutdown(block='false')
      disconnect()
      connect(user, pwd, url='t3://localhost:12001')
      shutdown(block='false')
      disconnect()

      NOTE that the ports are different (i.e. I connect via WLST to the managed servers themselves rather than to the AdminServer).

      Unfortunately, in this scenario, the block='false' does not work. WLST waits until the managed server is shut down before proceeding to the next connect() command. So if each server took 2 minutes to shut down, the whole shutdown process now takes 10 minutes.

      We don't want to use the nmKill() command on the local Node Manager because we want a graceful shutdown.

      What options do we have to issue a graceful shutdown command either to a local Node Manager or to the managed servers themselves (since we can't expect the AdminServer to be online when our script runs)?

      Best regards,
      Michael
        • 1. Re: shutdown(block='false') only works via Admin Server, not managed servers
          Kalyan Pasupuleti-Oracle
          Hi Mike,

          WLST will create it temp directory with /var/tmp/wlstTemp which is shared by all users. Since we cannot differentiated by different users which cause block on particular user at that time.

          One solution is to grant write access to all users to the directory where the WLST temporary directory is created (e.g. on Solaris /var/tmp; you can verify the default on your system by executing java utils.getProperty and search for java.io.tmpdir).

          If for whatever reason you cannot grant these access modes on the temporary directory, then you can create a directory somewhere on the file system where every user has the correct permissions.

          Start the scripting tool with one the following options to redirect the cache files to the specified directory. Dependent on your environment one or the other will apply.


          java -Djava.io.tmpdir=<path-to-tmpDir> weblogic.WLST

          or

          java -Dpython.cachedir=<path-to-tmpDir> weblogic.WLST


          This will be useful to make shutdown of servers without any problem.


          Note: block=false will always works it should not be the problem.

          Regards,
          Kal
          • 2. Re: shutdown(block='false') only works via Admin Server, not managed servers
            mscongdon
            Hi Kal,

            Thank you for responding. I'm failing to understand what the TMP directory has to do with the blocking/non-blocking of the WLST calls. Are you saying that, if I overwrite the TMP directory or providide all users with the proper permissions on the TMP directory, then non-blocking will work? If that's the case, then why does non-blocking work while connected to the Admin Server and not the managed servers? I assume they're all using the same TMP directory anyway.

            Please clarify.

            Michael
            • 3. Re: shutdown(block='false') only works via Admin Server, not managed servers
              Kalyan Pasupuleti-Oracle
              Hi,

              I totally agree with you but I dont see any issues with block=false option.

              It should work.

              you can try once to change the tmp folder and let me know.

              Regards,
              Kal
              • 4. Re: shutdown(block='false') only works via Admin Server, not managed servers
                mscongdon
                Hello again,

                I edited my wlst.cmd script to include the JVM arg for the temp directory. I also echo the JVM_ARGS after they're set:

                JVM_ARGS=-Dprod.props.file="C:\Oracle\MIDDLE~1\WLSERV~1.3\.product.properties" -Djava.io.tmpdir=C:/Users/Michael/TempWLST -Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning

                I then re-launched WLST, connected to my managed server (not the admin server) and issued this command:

                shutdown(block='false')

                Unfortunately, WLST still blocked user interaction. I could not issue any further WLST commands until my managed server completely shut down.

                FYI, I'm running WebLogic Server 10.3.6 on a Windows 7 Ultimate x64 environment.

                Kal, are you saying you can connect to a managed server (not admin) and issue shutdown commands without blocking? What version of WebLogic and what OS are you running?

                Thanks again,
                Michael
                • 5. Re: shutdown(block='false') only works via Admin Server, not managed servers
                  Kalyan Pasupuleti-Oracle
                  Hi Mike,

                  You can use that option to connecting managed server and go for shutdown call.

                  Regards,
                  Kal
                  • 6. Re: shutdown(block='false') only works via Admin Server, not managed servers
                    mscongdon
                    Hello,

                    Thank you for the hopes that this is supposed to work. So my question is, given the WLST configuration and the commands I'm issuing, why is it not working in our environment? Any other thoughts on why non-blocking is not working for us via our managed servers?

                    Regards,
                    Michael