+

Search Tips   |   Advanced Search

stopNode command

The stopNode command reads the configuration file for the node agent process and sends a JMX (JMX) command telling the node agent to shut down.

By default, the stopNode command waits for the node agent to complete shutdown before it returns control to the command line. There is a -nowait option to return immediately, as well as other options to control the behavior of the stopNode command. For more information about where to run this command, see Using command-line tools.

For a Windows operating system and the node agent runs as a Windows service, the stopNode command uses the associated Windows service to stop the node agent.

(dist)(zos) If we stop the server before stopping the node agent using the stopServer -servers command, the server will not restart when you issue a startServer command.

(iseries) Although the stopServer command returns control when the server completes shut down, it can return before the IBM i process has terminated. Depending upon the amount of memory which the Java Virtual Machine must return to the memory pool, the process may take several seconds or minutes to completely end. You should not attempt to start the server again until the process has terminated. Use the WRKACTJOB SBS(subsystem) CL command to determine if the process has terminated completely. By default, subsystem is QWAS85.

For transitioning users: In Version 6.1 and earlier, user ID and password information was obtained by this command from the profile_root/properties/soap.client.props file. In this version of the product, the same information is obtained from the profile_root/properties/ipc.client.props file. To avoid user ID and password prompts when you use this command, add the user ID and password information to the ipc.client.props file.trns


Syntax

The command syntax is as follows:


Parameters

The following options are available for the stopNode command:

-nowait

Tells the stopNode command not to wait for successful shutdown of the node agent process.

-quiet

Suppress the progress information that the stopNode command prints in normal mode.

-logfile <fileName>

Location of the log file to which trace information is written. By default, the log file is named stopServer.log and is created in the logs directory of the profile for the node being stopped.

(dist)(iseries) -profileName

Defines the profile of the Application 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.

-replacelog

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

-trace

Generates trace information into a file for debugging purposes. The trace output is written to the was_jobname-jobuser-jobnum.log file which is located in the profile_root/logs directory.

-timeout <seconds>

Specifies the waiting time for the agent to shut down before timing out and returning an error.

Supported configurations: The timeout parameter is used to stop one server at a time. If we use the timeout parameter with the stopservers parameter, the timeout parameter value is ignored.

-statusport <portNumber>

An optional parameter that allows an administrator to set the port number for node agent status callback. The tool opens this port and waits for status callback from the node agent just before the node agent has completely stopped. If the parameter is not set, an unused port is automatically allocated.

-stopservers [-saveNodeState]

Stops all application servers on the node before stopping the node agent.

Use the -saveNodeState option to save the server restart state so that we can start the application servers based on the previous state using the startNode command.

-conntype <type>

Specifies the JMX (JMX) connector type to use for connecting to the deployment manager. Valid types are SOAP or Remote Method Invocation (RMI).

-port <portNumber>

Node agent JMX port to use explicitly, so that we can avoid reading configuration files to obtain the information.

-username <name>

User name for authentication if security is enabled in the node agent. Acts the same as the -user option.

-user <name>

User name for authentication if security is enabled in the node agent. Acts the same as the -username option.

-password <password>

Password for authentication if security is enabled in the node agent.

If we are running in a secure environment but have not provided a user ID and password, you receive the following error message:

    ADMN0022E: Access denied for the stop operation on Server MBean due to insufficient or empty credentials.

To solve this problem, provide the user ID and password information.

-help

Prints a usage statement.

When requesting help for the usage statement for the stopNode command, a reference to the stopServer command displays. All of the options displayed for this usage statement apply to the stopNode command.

-?

Prints a usage statement.

When requesting help for the usage statement for the stopNode command, a reference to the stopServer command displays. All of the options displayed for this usage statement apply to the stopNode command.


Usage scenario

The following examples demonstrate correct syntax:

(dist)(zos)

stopNode
 stopNode -nowait   stopNode -trace (produces the stopnode.log file)

(iseries)

stopNode
 stopNode -profileName mynode   stopNode -nowait    stopNode -trace (produces trace files under  the profile_root/logs directory.)


Related tasks

  • Use command-line tools
  • Adding, managing, and removing nodes