+

Search Tips   |   Advanced Search

startServer command

The startServer command reads the configuration file for the specified server process and starts that server process.

Use the startServer command to:

IBM recommends using the High Performance Extensible Logging (HPEL) log and trace infrastructure . We view HPEL log and trace information using the LogViewer .

(Windows) If we are running the product on a Windows Windows operating system, and you have the server running as a Windows operating system service, the startServer command will start the server and the associated Windows service.

You do not have to use a user name and password with the startServer command because this command launches a server process but does not invoke an MBean method.

We can use the administrative console to change the Java virtual machine Classpath setting or the environment entries settings for a server. However, before making these changes you should understand the following consequences of making these changes:

gotcha

For more information about where to run this command, see the Use command line tool topic.


Syntax

The command syntax is one of the following:

startServer server [options]

where server is the name of the application server or the DMZ Secure Proxy Server for IBM WAS that you want to start.

This argument is required.

(iSeries) This argument is optional. If this argument is not specified, a server is assigned based on your profile name. If we use the profile named default, the <server> argument is set to server1. If the profile name is not default, the <server> argument is set to the profile name.

startServer <adminagent_name>

whereadminagent_name is the name of the administrative agent that you want to start.

startServer <job_manager>

where job_manager is the name of job manager that you want to start.


Parameters

The following options are available for the startServer command:


Usage scenario

The following examples demonstrate correct syntax. The information within the parentheses is a description of the output created if you issue the preceding command.

(Dist)

startServer server1

startServer server1 -script (produces the start_server1.sh or .bat files)

startServer server1 -trace (produces the startserver.log file)

startServer adminagent

startServer.sh server1 -trace -username MyUserName -password MyUserPassword
 -profileName MyProfileName     (starts the server1 server using the 
         MyProfileName profile. The server runs under the user name MyUserName,
         and produces trace files under the profile_root/logs directory)
startServer jobmgr

startServer proxy1 (for the secure proxy profile)

(ZOS)

startServer server1

startServer server1 -script (produces the start_server1.sh file)

startServer server1 -trace (produces the startserver.log file)

startServer adminagent

startServer jobmgr

startServer proxy1 (for the secure proxy profile)

startServer.sh server1 -trace -username MyUserName -password MyUserPassword
 -profileName MyProfileName     (starts the server1 server using the 
         MyProfileName profile. The server runs under the user name MyUserName,
         and produces trace files under the profile_root/logs directory)

(iSeries)

startServer server1 (starts the server1 server for the default profile)

startServer server1 -trace (starts the server1 server for
the default profile and produces trace files under the profile_root/logs directory)

startServer -profileName mytest (starts server mytest 
configured under profile mytest)

startServer AdminAgent01
startServer JobMgr01

startServer proxy1 (default server name for the SecureProxySrv01 profile)
startServer.sh server1 -trace -username MyUserName -password MyUserPassword
 -profileName MyProfileName     (starts the server1 server using the 
         MyProfileName profile. The server runs under the user name MyUserName,
         and produces trace files under the profile_root/logs directory)


Exit codes

How do you capture the startServer and stopServer return code to determine if this was successful or not? This table shows the return codes for a server given a start or stop command.

The following example is a script executing and capturing the return code for server1:

#!/bin/sh
exitCode=`./startServer.sh server1`

The exitCode value can be compared to the following list of return codes to determine the results of the command:

Server state Return code
Server initialization failed -1
Server initialization timed out -2
Server start in progress 1
Server is initializing the applications that are present 2
Server initialization is complete (successful) 0
Server stop failed -10
Server stop timed out -11
Server stop operation started 1000
Server successfully stopped 0

  • Use command-line tools