Managing Oracle Weblogic with WLST - Controlling Servers through WLST


Controlling Servers through WLST

WLST can be used as well to manage server life cycle and can be pretty useful, for example, if you have to start/stop a domain consisting in lots of servers. There are basically two modes to manage your servers:

  • Using the Node Manager interface
  • Without Node Manager (via the Admin Server).

Let’s shortly illustrate both approaches

Controlling servers using Node Manager

WLST can connect to a Node Manager that is running on any machine and start one or more WebLogic Server instances on the machine.

A WebLogic domain's Administration Server does not need to be running in order to start servers using this technique.

Start by launching WLST at first:

java weblogic.WLST

In case the Node Manager process is not already running, you can log on to the host computer and use WLST to start it:

wls:/offline> startNodeManager()

Next, connect WLST to a Node Manager by entering the nmConnect command:


You can now use the nmStart command to start a server:


Monitor the status of Managed server by entering the nmServerStatus command:


Finally, you can stop the server by entering the nmKill command:


Controlling servers without Node Manager

In the latter option, we will use the WLST startServer command to start the Administration Server. Here’s an example:


After WLST starts a server instance, the server runs in a separate process from WLST; exiting WLST does not shut down the server. So, once you have started the administration server, you can simply connect to it and issue commands to control life cycle of servers:


# First enable the Administration Port. This is not a requirement.

# After you enable the Administration Port in a domain, WebLogic Server

# persists the setting in its configuration files. You do not need to repeat

# the process in future WLST sessions.





# check the state of the server


# now move the server from RUNNING state to ADMIN

suspend("myserver", block="true")

# check the state


# now resume the server to RUNNING state



Francesco Google+