+

Search Tips   |   Advanced Search

Unregister nodes of the administrative agent

We can unregister application server nodes so that they are no longer registered to an administrative agent. Unregister nodes if we no longer need the node in the administrative agent environment or if we intend to delete the application server node profile. After unregistering a node from an administrative agent, we can use the node stand-alone, register the node with another administrative agent, or delete the application server node profile.

The application server node to remove from the administration agent environment must be registered with the administrative agent. Start the administrative agent if it is not running already.

If the application server node is registered with a job manager, unregister the node from the job manager. Use the administrative agent console or wsadmin commands to unregister the node:

To unregister a node, run the deregisterNode command from the bin directory of the administrative agent. Step 1 describes how to run the deregisterNode command.

When we unregister a node, the node configuration is retained, but is marked as not registered with the administrative agent. If the node that you unregister had the administrative console or management EJB applications installed before registering the node, they are re-enabled.

Running the deregisterNode command might result in a null pointer exception if the application server node profile is corrupted or unusable. If we receive the null pointer exception, the process to unregister the application server from the administrative agent failed. You receive ADMU0116I, ADMU0128I, ADMU0211I, ADMU0113E, and ADMU1211I messages in the error log. Step 2 describes how to remove a node and related end points if there is a null pointer exception.

If the application server node profile is deleted before the node is unregistered, running the deregisterNode command is ineffective. Because the profile no longer exists, the administrative agent does not recognize the profile. Complete Step 2 to remove the node and related end points from the administrative agent environment.


Tasks

  1. Unregister a node using the deregisterNode command.

    If the node to unregister exists, run the deregisterNode command, specifying the profile path of the node to unregister:

      deregisterNode -profilePath profile_root/profile

    For example, to unregister the AppSrv02 profile from the administrative agent environment,:

      deregisterNode -profilePath profile_root/AppSrv02

  2. If a null pointer exception results from running the deregisterNode command or if the node profile has been deleted, run wsadmin commands that remove the registered node and related end points.

    1. On a command line, run a command to start the wsadmin scripting tool from the administrative agent bin directory.

      To use the Jython scripting language, enter:

        wsadmin -lang jython

      To use the Jacl scripting language, enter:

        wsadmin

    2. If we do not know the name of the node to remove, run the AdminConfig list command to list nodes that are registered with the administrative agent and find the node to remove in the list.

      For Jython:

        print AdminConfig.list('ManagedNode')

      For Jacl:

        $AdminConfig list ManagedNode

      The list of registered nodes displayed resembles the following:

        nodeA(cells/myAACell01/managednodes/nodeA|managednode.xml#ManagedNode_1239121412703)
        nodeB(cells/myAACell01/managednodes/nodeB|managednode.xml#ManagedNode_1239121498500)

      This list shows that nodeA and nodeB are registered nodes of the myAACell01 administrative agent.

    3. Issue wsadmin commands that remove the node.

      To remove nodeA and save the changes,s in succession.

      For Jython:

        mn = AdminConfig.getid('/ManagedNode:nodeA/')
        AdminConfig.remove(mn)
        AdminConfig.save()

        For Jacl:

          set mn [$AdminConfig getid /ManagedNode:nodeA/]

          $AdminConfig remove $mn

          $AdminConfig save

      • Run wsadmin commands that remove end points that were generated for the subsystem when the node profile was registered.

        Run the following commands sequentially to remove end points for nodeA. The for command in Jython and the foreach command in Jacl are one-line commands that are shown on multiple lines for publication.

        For Jython:

          import java.lang.System as System
          lineSeparator = System.getProperty("line.separator")
          
          neps = AdminConfig.list("NamedEndPoint").split(lineSeparator)
          
          for nep in neps:
            set name = AdminConfig.showAttribute(nep, "endPointName")
            if (name.endswith("nodeA") == 1):
               AdminConfig.remove(nep)
          
          AdminConfig.save()
          
          quit
          

        For Jacl:

          set neps [$AdminConfig list NamedEndPoint]
          
          foreach nep $neps {set name [$AdminConfig showAttribute $nep endPointName]; 
          if {[string last "nodeA" $name] != -1} {$AdminConfig remove $nep}}
          
          $AdminConfig save
          
          quit
          

      • Restart the administrative agent.

        To restart an administrative agent named adminagent,s from a command prompt at the bin directory of the administrative agent profile:

          stopServer adminagent
          startServer adminagent

      • Verify that the node is no longer registered with the administrative agent.

The application server node is no longer registered with the administrative agent.


What to do next

Use the unregistered node stand-alone or register the node with another administrative agent. Optionally, use the manageprofiles command to delete the application server profile.


Related:

  • Administrative agent
  • Administer stand-alone nodes using the administrative agent
  • Create management profiles with administrative agents
  • manageprofiles command
  • Set up the administrative agent environment
  • ManagedNodeAgent .
  • JobManagerNode .
  • startServer command
  • (ZOS) START command
  • registerNode command
  • deregisterNode command
  • stopServer command
  • (ZOS) STOP command