+

Search Tips   |   Advanced Search

Recover or move nodes with the addNode -asExistingNode command

Use the -asExistingNode option of the addNode command to...

Other addNode options for node configuration are incompatible with this -asExistingNode option. Do not use -asExistingNode with the following incompatible options:

When the addNode command is run with the -asExistingNode option, the product does not check for or resolve conflicts among ports. We must verify that the ports associated with a node do not conflict with ports already in use on the target host.


Recover an existing managed node of a deployment manager

We can recover an existing damaged node using the -asExistingNode option of the addNode command. For example, if a computer failure results in an unavailable node but node information remains on the deployment manager, we can use the -asExistingNode option to recreate the unavailable node.

  1. Stop the node agent and any application servers that reside on the node.

  2. Either...

    • Remove the original profile, then create a new profile to replace the damaged node.

    • Configure a new computer with the same host name, then create new profile on the new computer.

    Give the new profile the same profile path, profile name, and node name as the unavailable node. For example, suppose the myNode01 node with profile AppSrv01 stops functioning. To replace it with a new node, create an application server profile named AppSrv01 for node myNode01.

  3. Run addNode -asExistingNode from a command line at the bin directory of the damaged application server profile.

      cd profile_root/AppSrv01/bin
      addNode dmgr_host dmgr_port -asExistingNode -username user_name -password password

    The name of the new node must match the name of the node where we run addNode with the -asExistingNode option.

    Restriction: Previously installed JCA adapters are not stored as part of the WebSphere configuration. After replacing a node, reinstall JCA adapters to enable them to work in the new environment.

  4. Synchronize all the other active nodes in the cell.

    • The easiest and most efficient way to synchronize active nodes is to allow automatic synchronization to run. By default, automatic synchronization is enabled and nodes synchronize themselves at their configured interval.

    • If automatic synchronization is not enabled, we can synchronize the nodes explicitly.

        System administration > Nodes

      On the Nodes page, select the unsynchronized nodes and click Synchronize.

      If we have more than five unsynchronized nodes, only synchronize five nodes at a time.

To recover a managed node using a deployment manager administrative console, see Add, manage, and remove nodes.


Move a node to a product installation on a different computer but at the same path

Use the -asExistingNode option to move a node to a different computer, provided the following settings are the same on the different computer:

This procedure involves three different profiles:

  1. Stop the node agent and any application servers that reside on the node.

  2. Change the host name of the node within the master configuration present at the deployment manager.

      cd profile_root/Dmgr01/bin
      wsadmin -lang jython -userName user_name -password password
      AdminTask.changeHostName('[-hostName new_host_name -nodeName node]')
      AdminConfig.save()
      quit

  3. Move the node from the product installation on the source computer to the product installation on the target computer.

    Perform the following steps, which involve the destination profile, on the target computer:

    1. Install WAS in a directory that has the same name as the product installation directory on the source computer.

    2. Create a custom profile that has the same profile name, profile directory, and node name as the profile for the node to move.

      When creating the custom profile, select to federate the node later. Do not select to federate the node during profile creation.

    3. Replace the application server node with the node to move.

        cd profile_root/server/bin
        addNode dmgr_host dmgr_port -asExistingNode -username user_name -password password

    Restriction: Previously installed JCA adapters are not stored as part of the WebSphere configuration. After moving a node, reinstall JCA adapters to enable them to work in the new environment.

  4. Use the administrative console of the target deployment manager or wsadmin to enable servers on the node to run properly.

    1. Start the node. This step involves the destination profile.
    2. Update the virtual hosts (host aliases) to include the target host name of the application server node.

    3. Start the application servers of the node.

  5. If the node uses an SSL certificate, change the default certificate to contain the host name of the node.

    See the topic on creating SSL certificates to replace existing certificates in a node.

  6. Synchronize all the other active nodes in the cell.

We might need to update the configurations of other infrastructure components, such as web servers, that are statically configured to use application servers residing on specific hosts.


Move a node to a product installation on a different operating system or with a different path

Use the -asExistingNode option to move a node to a product installation on a different computer with the same operating system, but different host name and path. We can also use the option to move a node to a product installation on a different computer that has a different operating system but compatible configuration files; for example, from an AIX operating system to a Windows operating system.

Restriction:

This task assumes that the WAS installation directory and profile directory on the computer that has the node we want to move (source computer) is different from the directories on the target computer. However, the node profile name and node name must be the same on both the source and target computers.

To complete this task, perform the steps in the Move a node to a product installation on a different computer but at the same path task, except change the product installation and profile paths of each node in the variable maps on the deployment manager configuration before moving the node to the target computer. For example:

  1. In a deployment manager administrative console, click Environment > WebSphere variables.

  2. On the WebSphere Variables page, select the node scope and then click the WAS_INSTALL_ROOT variable.

  3. On the settings page for the WAS_INSTALL_ROOT variable, change the Value setting to specify the new product installation path and save the change.

  4. On the WebSphere Variables page, with the node scope selected, click the USER_INSTALL_ROOT variable.

  5. On the settings page for the USER_INSTALL_ROOT variable, change the Value setting to specify the new profile installation path and save the change.

  6. Repeat these steps as needed to change the product installation and profile paths of each node so that the paths are correct for the target computer.

For this task, the product installation and profile directories do not need to be the same on the target computer as on the source computer.


Create a cell from a template cell

We can quickly create a cell from an existing cell using the -asExistingNode option of the addNode command. The new cell must have the same name as the template cell.

Restriction:

If security is enabled, we likely must regenerate new keys and tokens for a new cell.

  1. Create and configure a cell to be the template cell to use for new product installations.

  2. Make a copy of the deployment manager profile configuration using the backupConfig command. We will use this copy of the configuration to restore the deployment manager configuration in the new installation.

  3. Copy the template cell to a new product installation.

    For each new environment to be provisioned:

    1. Install WAS.

    2. Create the deployment manager and application server node profiles. The application server profiles must have the same node name as the template cell.

    3. Restore the deployment manager profile configuration using the restoreConfig command. Update the deployment manager host name using wsadmin in local mode. If the profile path or the product installation path has changed, modify the variables.xml file of the deployment manager node to reflect the new paths. Update additional properties files as needed. Properties files that we might need to update include, for example, wsadmin.properties and soap.client.props.

    4. Customize each node configuration on the deployment manager profile. For example, change the following settings:

      • Host name
      • Ports
      • Product installation directory
      • Profile directories
      • Security configuration

    5. Run addNode -asExistingNode for each node. We can run the command concurrently from each node.

      1. Open a command prompt and change to the application server profile bin directory. For example, if the application server profile is named AppSrv01, go to the profile_root/AppSrv01/bin directory.

      2. Run the addNode command with the -asExistingNode option to replace the application server node with the node on the target cell.

        The following example command assumes that security is enabled and that the product requires us to enter a user name and password. For dmgr_host and dmgr_port, specify the host name and port number of the target deployment manager.

          addNode dmgr_host dmgr_port -asExistingNode -username user_name -password password

  4. Use the administrative console of the new deployment manager or wsadmin to enable servers for each node to run properly.

    1. Start the node. Run the startNode command from the node profile.
    2. Update the virtual hosts (host aliases) to include the host name of the application server node.

    3. Start the application servers of the node.

  5. If the cell uses an SSL certificate, replace the self-signed root certificate in the root keystore, DmgrDefaultRootStore.

    See the topic on creating SSL certificates to replace existing certificates in a cell.

  6. Synchronize all the other active nodes in the cell.


Related:

  • Managed and unmanaged nodes
  • Add, manage, and remove nodes
  • Get started with wsadmin scripting
  • Create a new SSL certificate to replace an existing one in a node
  • Create new SSL certificates to replace existing ones in a cell
  • addNode command
  • Recover managed node settings
  • Node collection
  • Add managed node settings