Start servers
We can use scripting and wsadmin.sh to start servers.
Before starting this task, wsadmin.sh must be running. See the topic about starting the wsadmin scripting client using wsadmin scripting Start the wsadmin scripting client article for more information.
Use the startServer command to start the server. This command has several syntax options. For example:
- To start a server on a WAS single server edition, choose one of the following options:
- The following examples specify the server name only:
Jacl:
$AdminControl startServer serverName
Using Jython:
AdminControl.startServer('serverName')
- The following example starts an application server with the node specified:
Jacl:
$AdminControl startServer server1 mynode
Jython:
print AdminControl.startServer('server1', 'mynode')
Example output:
WASX7319I: The serverStartupSyncEnabled attribute is set to false. A start will be attempted for server "server1" but the configuration information for node "mynode" may not be current. WASX7262I: Start completed for server "server1" on node "mynode"
- The following example specify the server name and wait time:
Jacl:
$AdminControl startServer serverName 10
Jython:
AdminControl.startServer('serverName', 10)
where 10 is the maximum number of seconds waiting for the server to start.
- To start a server on a WAS network deployment edition, choose one of the following options:
- The following example specifies the server name and the node name:
Jacl:
$AdminControl startServer serverName nodeName
Jython:
AdminControl.startServer('serverName', 'nodeName')
- The following example specifies the server name, the node name, and the wait time:
Jacl:
$AdminControl startServer serverName nodeName 10
Jython:
AdminControl.startServer('serverName', 'nodeName', 10)
where 10 is the number of seconds that the process should wait before starting the server.
Related tasks
Use the wsadmin scripting AdminControl object for scripted administration
Start the wsadmin scripting client
Related reference
Commands for the AdminControl object
startServer command