addNode command

 

+

Search Tips   |   Advanced Search

 

The addNode command incorporates a WAS installation into a cell. For more information about where to run this command, see the Using command tools article. Depending on the size and location of the new node you incorporate into the cell, this command can take a few minutes to complete.

The node agent server is automatically started as part of the addNode command unless you specify the -noagent option. If you recycle the system that hosts an application server node, and did not set up the node agent to act as an operating system daemon, issue a startNode command to start the node agent before starting any application servers.

The following items are new in V6:

  • Ports generated for the node agent are unique for all the profiles in the installation. For development purposes, one can create multiple profiles on the same installation and add them to one or more cells without worrying about ports conflicts.

  • If you want to specify the ports that the node agent uses, specify it is a file with the file name passed with the -portprops option. The format of the file is key=value pairs, one on each line, with the key being the same as the port name in the serverindex.xml file.

  • If you want to use a number of sequential ports, the -startingport option works the same as it does in V5.x. This means that port conflicts with other profiles will not be detected.

 

Syntax

The command syntax is as follows

addNode  dmgr_host \
        [dmgr_port] \
        [-conntype type] \
        [-includeapps] \
        [-startingport portnumber] \
        [-portprops qualified_filename] 
        [-nodeagentshortname name] \
        [-nodegroupname name] \
        [-includebuses name]
        [-registerservice] \
        [-servicename name] \
        [-servicepassword password]  \
        [-coregroupname name] \
        [-noagent] \
        [-statusport port] \
        [-quiet] \
        [-nowait]  \ 
        [-logfile filename] \
        [-replacelog] \
        [-trace] \
        [-username uid]  \
        [-password pwd] \
        [-help]

The dmgr_host argument is required. All of the other arguments are optional. The default port number is 8879 for the default SOAP port of the deployment manager. SOAP is the default JMX connector type for the command. If you have multiple WAS installations or multiple profiles, the SOAP port may be different than 8879. Examine the deployment manager SystemOut.log to see the current ports in use.

 

Parameters

The following options are available for the addNode command:

-conntype <type>

Specifies the JMX connector type to use for connecting to the deployment manager. Valid types are SOAP or RMI.

-includeapps

By default the addNode command does not carry over applications from the stand-alone servers on the new node to the cell. In general, you should install applications using the deployment manager. The -includeapps option tells the addNode command to carry over the applications from a node. If the application already exists in the cell, a warning is printed and the application does not install in the cell.

The applications will be mapped to the server that you federated using the addNode command. When the addNode command operation completes, the applications will run on that server when the server is started. Since these applications are part of the network deployment cell, one can map them to other servers and clusters in the cell using the administrative console.

By default, during application installation, application binaries are extracted in the install_root/installedApps/cellName directory. After the addNode command, the cell name of the configuration on the node that you added changes from the base cell name to the deployment manager cell name. The application binaries are located where they were before the addNode command ran, for example...

install_root/installedApps/old_cellName

If the application was installed by explicitly specifying the location for binaries as the following example

   ${INSTALL_ROOT}/${CELL}

...where the variable ${CELL}, specifies the current cell name, then when the addNode command runs, the binaries are moved to the following directory

    ${INSTALL_ROOT}/currentCellName

Federating the node to a cell using the addNode command does not merge any cell level configuration, including virtual host information. If the virtual host and aliases for the new cell do not match WebSphere Application Server, we cannot access the applications running on the servers. You have to manually add all the virtual host and host aliases to the new cell, using the administrative console running on the deployment manager.

When the -includeapps parameter is specified, an OutOfMemoryError might occur if the Java Virtual Machine heap size isn't large enough. When this error ocurs, the following error message is issued

ADMU0111E: Program exiting with error: java.lang.OutOfMemoryError

This error can occur when large applications are processed, or when there is a large number of applications in the Base Application Server.

To recover from this error and successfully federate the Base Application Server, :

  1. Issue the cleanupNode.sh command on your deployment manager server. See cleanupNode command for more information about this command.

  2. Increase the JVM heap size for the addNode script. When you issue the addNode.sh command, the JVM heap size is set to...

    -Xms128m -Xmx512m

    To increase these values, edit the JVM_EXTRA_CMD_ARGS variable in...

    config_root/bin/setupCmdLine.sh

    ...of the Base Application Server being federated. For example, you might specify the following (all on one line)

    JVM_EXTRA_CMD_ARGS= -Djava.security.properties=$WAS_HOME/java/jre/lib/security/java.security -Xms256m -Xmx1024m

  3. Reissue the addNode.sh command.

-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.

-user <name> or -username <name>

Specifies the user name for authentication if security is enabled. Acts the same as the -user option. The user name that you choose must be a pre-existing user name.

-nowait

Tells the addNode command not to wait for successful initialization of the launched node agent process.

-quiet

Suppresses the progress information that the addNode command prints in normal mode.

-logfile <filename>

Specifies the location of the log file to which information gets written. By default, the log file is called addNode.log and is created in the logs directory of the profile for the node being added.

-trace

Generates additional trace information in the log file for debugging purposes.

-replacelog

Replaces the log file instead of appending to the current log. By default, the addNode command appends to the existing trace file. This option causes the addNode command to overwrite the trace file.

-noagent

Tells the addNode command not to launch the node agent process for the new node.

-password <password>

Specifies the password for authentication if security is enabled. The password that you choose must be one that is associated with a pre-existing user name.

-startingport <portNumber>

Supports the specification of a port number to use as the base port number for all node agent ports created during the addNode command. With this support one can control which ports are defined for these servers, rather than using the default port values. The starting port number is incremented to calculate the port number for every node agent port configured during the addNode command.

-registerservice

(Windows only) Registers the node agent as a Windows service.

-servicename <user>

(Windows only) Use the given user name as the Windows service user.

-servicepassword <password>

(Windows password) Use the given password as the Windows service password.

-portprops <filename>

Passes the name of the file that contains key-value pairs of explicit ports that you want the new node agent to use. For example, to set your SOAP and RMI ports to 3000 and 3001, create a file with the following two lines and pass it as the parameter

SOAP_CONNECTOR_ADDRESS=3000
BOOTSTRAP_ADDRESS=3001

-coregroupname <name>

The name of the core group in which to add this node. If you do not specify this option, the node will be added to the DefaultCoreGroup.

-nodegroupname <name>

The name of the node group in which to add this node. If you do not specify, the node is added to the DefaultNodeGroup.

-includebuses

Copies the buses from the node to be federated to the cell.

-nodeagentshortname <name>

The shortname to use for the new node agent.

-help

Prints a usage statement.

-?

Prints a usage statement.

 

Usage scenario

The following examples demonstrate

correct syntax

addNode testhost 8879 (adds an Application Server to the deployment manager)

addNode deploymgr 8879 -trace (produces the addNode.log file)

addNode host25 8879 -nowait (does not wait for a node agent process)
where 8879 is the default port.

 

See also


Best practices for adding nodes using command line tools

 

See Also


Port number settings in WAS versions
removeNode command