Thursday 27 March 2014

Remove custom profile from dmgr

You must have Administrator privileges to use the removeNode function.
If global security is enabled you have to use username and password for removing node from dmgr

./removeNode.sh -help
Usage: removeNode [-force] [-quiet] [-nowait] [-logfile <filename>]
[-replacelog] [-trace] [-username <username>] [-password <password>]

[-profileName <profile>] [-help]

If global security is enabled you have to pass username and password while removing node from dmgr
[oracle@websphe bin]$ ./removeNode.sh 

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node01/logs/removeNode.log
ADMU0128I: Starting tool with the node01 profile
ADMU2001I: Begin removal of node: Node01
ADMU0006E: Exception creating Deployment Manager connection:
           com.ibm.websphere.management.exception.ConnectorException:
           ADMC0016E: The system cannot create a SOAP connector to connect to
           host websphe.tech.com at port 8879.
ADMU2015I: This exception can be ignored by specifying -force.
ADMU0113E: Program exiting with error:
           com.ibm.websphere.management.exception.ConnectorException:
           ADMC0016E: The system cannot create a SOAP connector to connect to
           host websphe.tech.com at port 8879., resulting from:
           java.net.ConnectException: Connection refused
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:213)
        at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:93)
        at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:74)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
        at org.eclipse.core.launcher.Main.run(Main.java:981)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:330)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:108)
Caused by: java.lang.NullPointerException
        at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:317)
        at com.ibm.ws.management.tools.NodeRemovalUtility.main(NodeRemovalUtility.java:97)   ... 21 more

So you must be start dmgr profiles 

[oracle@websphe bin]$ ./startManager.sh 

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/dmgr/logs/dmgr/startServer.log
ADMU0128I: Starting tool with the dmgr profile
ADMU3100I: Reading configuration for server: dmgr
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server dmgr open for e-business; process id is 5658


Issue the removeNode.sh

[oracle@websphe bin]$ ./removeNode.sh 

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node01/logs/removeNode.log
ADMU0128I: Starting tool with the node01 profile
ADMU2001I: Begin removal of node: Node01
ADMU0009I: Successfully connected to Deployment Manager Server:
           websphe.tech.com:8879
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: nodeagent
ADMU2010I: Stopping all server processes for node Node01
ADMU0510I: Server nodeagent is now STOPPED
ADMU2021I: Removing all servers on this node from all clusters in the cell.
ADMU2014I: Restoring original configuration.
ADMU2017I: The local original configuration has been restored.
ADMU0306I: Note:
ADMU2031I: Any applications that were uploaded to the PRODUSG cell
           configuration during addNode using the -includeapps option are not
           uninstalled by removeNode.
ADMU0307I: You might want to:
ADMU2032I: Use wsadmin or the Administrative Console to uninstall any such
           applications from the Deployment Manager.
ADMU0306I: Note:
ADMU2033I: Any buses that were uploaded to the PRODUSG cell configuration
           during addNode using the -includebuses option are not uninstalled by
           removeNode.
ADMU0307I: You might want to:
ADMU2034I: Use wsadmin or the Administrative Console to uninstall any such
           buses from the Deployment Manager.
ADMU2024I: Removal of node Node01 is complete.


No comments: