Network Deployment (Distributed operating systems), v8.0 > Set up the application serving environment > Administer nodes and resources > Administer stand-alone nodes using the admin agent
Unregistering nodes of the admin agent
We can unregister application server nodes so that they are no longer registered to an admin agent. Unregister nodes if you no longer need the node in the admin agent environment or if you intend to delete the application server node profile. After you unregister a node from an admin agent, you can use the node stand-alone, register the node with another admin 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 admin 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. We can use the admin agent console or wsadmin commands to unregister the node:
- Use the admin agent console to unregister the stand-alone application server node from a job manager.
- Log in to the administrative agent console. The administrative agent name resembles host_nameAANode01.
- Click System administration > Administrative agent.
- On the Configuration tab of the Administrative agent page, click Nodes.
- On the Nodes page, select the node to unregister from the job manager and click Unregister from a Job Manager.
- On the Unregister from a Job Manager page, specify a node name, specify a job manager administrative console port number, optionally specify other parameters such as the job manager user name and password, and click OK.
For Port, if security is not enabled, specify 9960 for an unsecure job manager administrative console port. If no port number is specified, the default secure port number 9943 is used.
- Run the wsadmin unregisterWithJobManager command in the ManagedNodeAgent command group to unregister the stand-alone application server node from a job manager.
When you run the unregisterWithJobManager command, specify the name of the stand-alone application server node that is managed by the job manager for the required -managedNodeName parameter. Other parameters are optional.
AdminTask.unregisterWithJobManager('[-host myJobMgrHostname -port 8989 -managedNodeName myAppServerNodeName]')The default value for the -host parameter is localhost.
The default value for the -port parameter is 9943, the job manager administrative console secure port number. If security is disabled, specify 9960, the default unsecure port number.
For more information about the unregisterWithJobManager command and parameters, see the topic on the ManagedNodeAgent command group .
If the system fails when unregistering a stand-alone application server from a job manager, run the cleanupTarget command in the JobManagerNode group to clean up job manager registration information. See the topic on the JobManagerNode command group for the AdminTask object.
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 you unregister a node, the node configuration is retained, but is marked as not registered with the admin agent. If the node that you unregister had the administrative console or management EJB applications installed before registering the node, they are re-enabled.
Run the deregisterNode command might result in a null pointer exception if the application server node profile is corrupted or unusable. If you receive the null pointer exception, the process to unregister the application server from the admin 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 admin agent environment.
Procedure
- 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_nameFor example, to unregister the AppSrv02 profile from the admin agent environment...
deregisterNode -profilePath PROFILE_ROOT/AppSrv02See the topic on the deregisterNode command for information about command parameters.
- 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.
- On a command line, run a command to start wsadmin.sh from the admin agent bin directory.
To use Jython, enter:
wsadmin -lang jythonTo use the Jacl scripting language, enter:
wsadmin
- If you do not know the name of the node to remove, run the AdminConfig list command to list nodes that are registered with the admin agent and find the node to remove in the list.
For Jython:
print AdminConfig.list('ManagedNode')For Jacl:
$AdminConfig list ManagedNodeThe list of registered nodes that is 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.
- Issue wsadmin commands that remove the node.
To remove nodeA and save the changes, run the following commands 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() quitFor 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 admin agent.
To restart an admin agent named adminagent, run the following commands from a command prompt at the bin directory of the admin agent profile:
stopServer adminagent startServer adminagent
- Verify that the node is no longer registered with the admin agent.
Results
The application server node is no longer registered with the admin agent.
What to do next
We can use the unregistered node stand-alone or register the node with another admin agent. Optionally, use the manageprofiles command to delete the application server profile.
Administrative agent
Administer stand-alone nodes using the admin agent
Create management profiles with admin agents
manageprofiles command
Set up the admin agent environment
Related
ManagedNodeAgent command group using wsadmin.sh
JobManagerNode command group using wsadmin.sh
startServer command
registerNode command
deregisterNode command
stopServer command