6 Replies Latest reply on Jul 24, 2012 2:55 PM by mscongdon

    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