InfoCenter Home >
6: Administer applications >
6.6a: Starting and stopping servers

6.6a: Starting and stopping servers

Starting the server. Use one of these methods. See below for details:

  • By typing "startServer" at a system command prompt
  • Using the Services window  Applies to Windows NT and 2000
  • By selecting IBM WebSphere -> Application Server V4.0 -> Start Application Server from the Start menu  Applies to Windows NT and 2000
  • From the product First Steps dialog, which is displayed at the end of the product installation
  • From the Servers page of the administrative console
  • By generating a startup script, possibly modifying its parameters, and running the script
  • By running the basic startup script, provided for backward compatability

Stopping the server. Use one of these methods. See below for details:

  • By typing "stopServer" at a system command prompt
  • Using the Services window  Applies to Windows NT and 2000
  • From the product First Steps dialog, which is displayed at the end of the product installation
  • From the Servers page of the administrative console
  • Using the "DrAdmin" script

Starting and stopping the administrative console

Starting and stopping servers from the Servers page of the administrative console

  1. Open the administrative console.
  2. Access the Servers page by...
  3. Click the Start or Stop button, depending on whether you want to start or stop the server.

The Servers page supports one server at a time. It can be used to start multiple servers; however, to do so the appropriate server configurations must be individually loaded and individually launched.

The Servers page cannot be used to launch the server configuration containing the administrative application. (See the article about server configuration files for details about that configuration.)

Starting and stopping servers as services from the Windows NT Services window

You can use the Services window of your Windows NT or 2000 operating system to start and stop the IBM WebSphere Application Server service. Note, you can also use the command line options or Servers page of the administrative console to stop a server that you started as a service.

Starting and stopping servers from the First Steps dialog

The First Steps dialog uses the startServer and stopServer script (see the description of those scripts). It keeps the system command window open so that you can view the server launch output until you close the window. Closing the window will not terminate the server process.

Starting and stopping servers from the command line

There are a few ways to start the server from the command line:

... and a couple of ways to stop the server from the command line:

startServer script

The recommended way to start the Advanced Single Server Edition from a command line is to run the script:

product_installation_root/bin/startServer.bat|sh
from a system command prompt.

When you use startServer, the server obtains its process definition from a server configuration file. The logs are written as defined in the ioRedirect element of the server configuration file.

The startServer script waits for the server that it launched to report status back to it. Therefore, the script might take several minutes to complete.

Stopping the startServer script will not necessarily cause the server process to be terminated. See below to learn how to stop the server.

startServer -script option

Add the -script option to the startServer command to generate a startup script file. You can view and edit the startup parameters, then launch the startup script.

  Note that on UNIX operating systems, the generated script will not be marked as an executable switch. You must correct this manually.

Stopping the generated script will stop the server.

startServerBasic option

You can also start the server by running the script:

product_installation_root/bin/startServerBasic.bat|sh

The script is provided for backward compatibility, and is not the recommended means of launching the server.

Stopping the startServerBasic script will cause the server process to be terminated (unlike with the startServer script).

  The basic startup script does not pick up any of the process definition settings, which include the JVM settings. For example, if you set the classpath in the JVM settings, it will be disregarded.

It also does not make use of the configured log files. Server output is written to the command prompt from which the server was started.

Stopping the server using stopServer

The recommended way to stop the Advanced Single Server Edition from a command line is to run the script:

product_installation_root/bin/stopServer.bat|sh
from a system command prompt.

Note, the stopServer script submits a request to stop the server, but does not tell if the server was completely stopped. Examine the server process to tell whether the server has been stopped successfully.

Stopping the server using DrAdmin

The DrAdmin script can be stopped from the command line using the DrAdmin script. As with the stopServer script, an alternate configuration file can be specified. The DrAdmin script provides additional options that are beyond the scope of this article.

Like the stopServer script, the DrAdmin script does not provide complete shutdown information. Examine the server process to tell if the server has been successfully stopped.

Both DrAdmin and the stopServer script operate by accessing server runtime functions through a runtime utility port configured as the 'diagThreadPort' and 'diagThreadHostname'. These values can be specified directly to DrAdmin to avoid reading the configuration file.

Advanced tasks pertaining to starting and stopping the server

The remainder of this article provides instructions for tasks closely related to starting the server.

Specifying a different configuration file

By default, the startServer script starts an application server, using configuration file:

product_installation_root/config/server-cfg.xml

You can override the default configuration by specifying your own configuration file, using the -configFile <full path to XML configuration file> parameter.

See the server configuration file topic for information about alternative configuration files.

On Windows-based systems, a start Application Server entry is added to the program folder for WebSphere Application Server. If you want to run with a server configuration other than server-cfg.xml, update the program folder entry to specify the desired configuration file.

Obtaining feedback from the server

The start process launches the application server as a background process. All application server output (stdout and stderr) is routed to files as configured in the server configuration file (such as product_installation_root/logs/default_server_stdout.txt.

The startServer process will monitor the progress of the startup of the server and log messages to the command shell window indicating the progress. It will output the message:

WSPL0057I: the server is open for e-business
when the started application server is ready for requests.
Enabling the server to be started directly from the command shell

The characteristics of the application server process are defined under the Process Definition object in the server configuration. In the case that you wish to have more control over how the application server is launched, you can specify the -script parameter with the startServer command. This will generate a script that can be used to start the application server directly from the command shell.

Finding usage information for the startup script

To see the complete command line usage for startServer, enter:

startServer -usage

Additional information is available by entering:

startServer -help
Ability to start and stop a remote server

The script must be run on the same machine on which you want to start the server. Launching a remote application server is not supported.

Stopping a server remotely is only supported if the runtime utility port is configured to allow remote access. You can perform a remote shutdown of a server using the DrAdmin command with diagThreadHostname configured to contain a hostname other than localhost.

Go to previous article: Running the product servers and consoles as non-root Go to next article: Tutorials

 

 
Go to previous article: Running the product servers and consoles as non-root Go to next article: Tutorials