WAS v8.5 > Reference > Command-line utilities

startServer command

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

The server process can be an application server or an administrative agent.

IBM recommends using the HPEL log and trace infrastructure. With HPEL, one views logs using the LogViewer command-line tool in PROFILE/bin.

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

We 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 dmgr 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:

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:

where server_name is the name of the application server to start.

This argument is required.

whereadminagent_name is the name of the administrative agent to start.


Parameters

The following options are available for the startServer command:

-?

Prints a usage statement.

-help

Prints a usage statement.

-J <java_option>

Specifies options to pass through to the interpreter.

-logfile <fileName>

Location of the log file to which trace information is written. By default, the log file is named startServer.log and is created in logs directory.

-nowait

Tells the startServer command not to wait for successful initialization of the launched server process.

-profileName

Defines the profile of the server process in a multi-profile installation. The -profileName option is not required for running in a single profile environment. The default for this option is the default profile.

-quiet

Suppresses the progress information the startServer command prints in normal mode.

-replacelog

Replaces the log file instead of appending to the current log.

-recovery

The server will start in recovery mode, perform a transactional recovery, and shut down. The server will not accept any new transactions while it is in recovery mode. When you start the server again, resources that were unavailable due to questionable transactions will be available.

Use this option if a server fails and we do not want to accept new transactions during the recovery process.

transition: If we are migrating from a previous version of the product, verify the ENV parameter included on the JCL procedure statement for the controller includes either the REC=N or the REC=Y element. If the ENV parameter does not include either the REC=N or the REC=Y element, the server will not restart in recovery mode even if we specify the -recovery option.

    //BBO6ACR PROC ENV=,PARMS=' ',REC=N,Z=BBO6ACRZ

-statusport <portNumber>

An optional parameter that allows an administrator to set the port number for server status callback. The tool opens this port and waits for status callback from the server indicating the server has started. If the parameter is not set, an unused port is automatically allocated.

-script [<script fileName>] -background

Generates a launch script with the startServer command instead of launching the server process directly. The launch script name is an optional argument. If we do not supply the launch script name, the default script file name is start_server based on the server name that is passed as the first argument to the startServer command. The -background parameter is an optional parameter that specifies the generated script will run in the background when we run it.

-trace

Generates trace information to the log file for debugging purposes.

-timeout <seconds>

Specifies the waiting time before server initialization times out and returns an error.


Usage scenario

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

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)


Related


Use command-line tools


+

Search Tips   |   Advanced Search