Friday 21 March 2014

Move the DMGR from one box to another box

 We have one DMGR and Two appserver nodes. We have configured 1 clusters in this DMGR with two nodes and two applications are running. Now we are moving DMGR from old box to new box.

Steps

  • Install base product on new box
  • Backup source environment DMGR/NODES
  • Create DMGR profile with exact same name, same node and cell name
  • Remove nodes from the DMGR
  • Take profile backup in old environment with backupconfig
  • Restore it in new DMGR profile and change server name in serverindex.xml for the nodes after restoring
  • Start the DMGR
  • Federate the nodes to new DMGR wirh new server name and soap
  • start the node agent and application servers


Procedure

1.Backup source Environment
a. Backup Dmgr

[oracle@bharath dmgr]$ cd bin/

[oracle@bharath bin]$ ./backupConfig.sh /u03/local/opt/was/backup/dmgr1-backup.zip

ADMU0116I: Tool information is being logged in file
          /u03/local/opt/was/was70/profiles/dmgr/logs/backupConfig.log
ADMU0128I: Starting tool with the dmgr profile
ADMU5001I: Backing up config directory
           /u03/local/opt/was/was70/profiles/dmgr/config to file
           /u03/local/opt/was/backup/dmgr1-backup.zip
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: dmgr
ADMU2010I: Stopping all server processes for node Manager01
ADMU0510I: Server dmgr is now STOPPED
................................................................................
ADMU5002I: 962 files successfully backed up
[oracle@bharath bin]$ cd ..
[oracle@bharath dmgr]$ cd bin/

b. startDmgr
[oracle@bharath 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 8110

c. Backup Node01

[oracle@bharath bin]$ ./backupConfig.sh /u03/local/opt/was/backup/node01-backup.zip

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node01/logs/backupConfig.log
ADMU0128I: Starting tool with the node01 profile
ADMU5001I: Backing up config directory
           /u03/local/opt/was/was70/profiles/node01/config to file
           /u03/local/opt/was/backup/node01-backup.zip
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: nodeagent
ADMU0506I: Server name: node01
ADMU2010I: Stopping all server processes for node Node01
ADMU0512I: Server node01 cannot be reached. It appears to be stopped.
ADMU0510I: Server nodeagent is now STOPPED
...........................................................................
ADMU5002I: 1,053 files successfully backed up

d. Backup Node02

[oracle@bharath bin]$ ./backupConfig.sh /u03/local/opt/was/backup/node02_backup.zip

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node02/logs/backupConfig.log
ADMU0128I: Starting tool with the node02 profile
ADMU5001I: Backing up config directory
           /u03/local/opt/was/was70/profiles/node02/config to file
           /u03/local/opt/was/backup/node02_backup.zip
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: nodeagent
ADMU0506I: Server name: node02
ADMU2010I: Stopping all server processes for node Node02
ADMU0512I: Server node02 cannot be reached. It appears to be stopped.
ADMU0510I: Server nodeagent is now STOPPED
.....................................................................................
ADMU5002I: 1,051 files successfully backed up

2. Create DMGR profile on new Node  with exact same name, same node and cell name

[websphe@websphe bin]$ ./manageprofiles.sh -create -profileName dmgr -profilePath /u03/local/opt/was/was70/profiles/dmgr -templatePath /u03/local/opt/was/was70/profileTemplates/dmgr -cellName KUMAR -hostName websphe.tech.com -nodeName Manager01

CWMBU0002I: The deployment manager profile template has been deprecated and replaced by the management profile template with a deployment manager server.
INSTCONFSUCCESS: Success: Profile dmgr now exists. Please consult /u03/local/opt/was/was70/profiles/dmgr/logs/AboutThisProfile.txt for more information about this profile.

3. Remove nodes from the DMGR in old box

[oracle@bharath 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:
           bharath.tech.com:8879
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: nodeagent
ADMU0506I: Server name: node01
ADMU2010I: Stopping all server processes for node Node01
ADMU0512I: Server node01 cannot be reached. It appears to be stopped.
ADMU0512I: Server nodeagent cannot be reached. It appears to be 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 KUMAR 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 KUMAR 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.

Remove node02 from DMGR
[oracle@bharath bin]$ ./removeNode.sh

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node02/logs/removeNode.log
ADMU0128I: Starting tool with the node02 profile
ADMU2001I: Begin removal of node: Node02
ADMU0009I: Successfully connected to Deployment Manager Server:
           bharath.tech.com:8879
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: nodeagent
ADMU0506I: Server name: node02
ADMU2010I: Stopping all server processes for node Node02
ADMU0512I: Server node02 cannot be reached. It appears to be stopped.
ADMU0512I: Server nodeagent cannot be reached. It appears to be 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 KUMAR 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 KUMAR 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 Node02 is complete.

4. Take dmgr backup in old environment

[oracle@bharath bin]$ pwd
/u03/local/opt/was/was70/profiles/dmgr/bin

[oracle@bharath bin]$ ./backupConfig.sh /u03/local/opt/was/backup/dmgr2_backup.zip

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/dmgr/logs/backupConfig.log
ADMU0128I: Starting tool with the dmgr profile
ADMU5001I: Backing up config directory
           /u03/local/opt/was/was70/profiles/dmgr/config to file
           /u03/local/opt/was/backup/dmgr2_backup.zip
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: dmgr
ADMU2010I: Stopping all server processes for node Manager01
ADMU0510I: Server dmgr is now STOPPED
..........................................................................
ADMU5002I: 831 files successfully backed up
[oracle@bharath bin]$

5. Restore dmgr2_backup.zip in new DMGR profile and change server name in serverindex.xml

[websphe@websphe bin]$ ./restoreConfig.sh /u03/local/opt/was/backup/dmgr2-backup.zip

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/dmgr/logs/restoreConfig.log
ADMU0128I: Starting tool with the dmgr profile
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: dmgr
ADMU2010I: Stopping all server processes for node Manager01
ADMU0512I: Server dmgr cannot be reached. It appears to be stopped.
ADMU5502I: The directory /u03/local/opt/was/was70/profiles/dmgr/config already
           exists; renaming to
           /u03/local/opt/was/was70/profiles/dmgr/config.old
ADMU5504I: Restore location successfully renamed
ADMU5505I: Restoring file /u03/local/opt/was/backup/dmgr2-backup.zip to
           location /u03/local/opt/was/was70/profiles/dmgr/config
................................................................
ADMU5506I: 858 files successfully restored
ADMU6001I: Begin App Preparation -
ADMU6009I: Processing complete.
ADMU6002I: Begin Asset Preparation -
ADMU6009I: Processing complete.
[websphe@websphe bin]$

Change Host name bharath.tech.com to websphe.tech.com in below file

/u03/local/opt/was/was70/profiles/dmgr/config/cells/<CELLNAME>/nodes/<NODE NAME>/serverindex.xml

Start Dmgr

[websphe@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 5115

6. Federate exiting nodes with new dmgr

[websphe@websphe profiles]$ cd node01
[websphe@websphe node01]$ cd bin/

[websphe@websphe bin]$ ./addNode.sh websphe.tech.com 8879

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node01/logs/addNode.log
ADMU0128I: Starting tool with the node01 profile
CWPKI0308I: Adding signer alias "default_1" to local keystore
           "ClientDefaultTrustStore" with the following SHA digest:
           9E:7B:A0:2A:B2:47:CB:FA:1E:7C:C8:B9:33:33:7A:CB:2B:F8:87:2D
CWPKI0308I: Adding signer alias "default_2" to local keystore
           "ClientDefaultTrustStore" with the following SHA digest:
           59:A4:37:0F:2C:7D:C1:11:EB:13:B3:19:82:EB:00:14:31:8D:AC:8A
ADMU0001I: Begin federation of node Node01 with Deployment Manager at
           websphe.tech.com:8879.
ADMU0009I: Successfully connected to Deployment Manager Server:
           websphe.tech.com:8879
ADMU0507I: No servers found in configuration under:
           /u03/local/opt/was/was70/profiles/node01/config/cells/bharathNode01Cell/nodes/Node01/servers
ADMU2010I: Stopping all server processes for node Node01
ADMU0024I: Deleting the old backup directory.
ADMU0015I: Backing up the original cell repository.
ADMU0012I: Creating Node Agent configuration for node: Node01
ADMU0027E: An error occurred during federation bharath.tech.com; rolling back
           to original configuration.
ADMU0211I: Error details may be seen in the file:
           /u03/local/opt/was/was70/profiles/node01/logs/addNode.log
ADMU0026I: An error occurred during federation; rolling back to original
           configuration.
ADMU0113E: Program exiting with error:
           com.ibm.websphere.management.exception.AdminException:
           java.net.UnknownHostException: bharath.tech.com, resulting from:
           java.net.UnknownHostException: bharath.tech.com
ADMU1211I: To obtain a full trace of the failure, use the -trace option.
ADMU0211I: Error details may be seen in the file:
           /u03/local/opt/was/was70/profiles/node01/logs/addNode.log
[oracle@websphe bin]$ ./addNode.sh websphe.tech.com 8879
ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node01/logs/addNode.log
ADMU0128I: Starting tool with the node01 profile
CWPKI0309I: All signers from remote keystore already exist in local keystore.
ADMU0001I: Begin federation of node Node01 with Deployment Manager at
           websphe.tech.com:8879.
ADMU0009I: Successfully connected to Deployment Manager Server:
           websphe.tech.com:8879
ADMU0507I: No servers found in configuration under:
      /u03/local/opt/was/was70/profiles/node01/config/cells/bharathNode01Cell/nodes/Node01/servers
ADMU2010I: Stopping all server processes for node Node01
ADMU0024I: Deleting the old backup directory.
ADMU0015I: Backing up the original cell repository.
ADMU0012I: Creating Node Agent configuration for node: Node01
ADMU0014I: Adding node Node01 configuration to cell: KUMAR
ADMU0016I: Synchronizing configuration between node and cell.
ADMU0018I: Launching Node Agent process for node: Node01
ADMU0020I: Reading configuration for Node Agent process: nodeagent
ADMU0022I: Node Agent launched. Waiting for initialization status.
ADMU0030I: Node Agent initialization completed successfully. Process id is:        5441
ADMU0300I: The node Node01 was successfully added to the KUMAR cell.
ADMU0306I: Note:
ADMU0302I: Any cell-level documents from the standalone KUMAR configuration
           have not been migrated to the new cell.
ADMU0307I: You might want to:
ADMU0303I: Update the configuration on the KUMAR Deployment Manager with values
           from the old cell-level documents.

ADMU0306I: Note:
ADMU0304I: Because -includeapps was not specified, applications installed on
           the standalone node were not installed on the new cell.
ADMU0307I: You might want to:
ADMU0305I: Install applications onto the KUMAR cell using wsadmin $AdminApp or
           the Administrative Console.

ADMU0003I: Node Node01 has been successfully federated.
[websphe@websphe bin]$

--------------------------------------------------------------------------------
[websphe@websphe profiles]$ cd node02/
[websphe@websphe node02]$ cd bin/

[webspe@websphe bin]$ ./addNode.sh websphe.tech.com 8879

ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/node02/logs/addNode.log
ADMU0128I: Starting tool with the node02 profile
CWPKI0308I: Adding signer alias "default_2" to local keystore
           "ClientDefaultTrustStore" with the following SHA digest:
           59:A4:37:0F:2C:7D:C1:11:EB:13:B3:19:82:EB:00:14:31:8D:AC:8A
ADMU0001I: Begin federation of node Node02 with Deployment Manager at
           websphe.tech.com:8879.
ADMU0009I: Successfully connected to Deployment Manager Server:
           websphe.tech.com:8879
ADMU0507I: No servers found in configuration under:
          /u03/local/opt/was/was70/profiles/node02/config/cells/bharathNode02Cell/nodes/Node02/servers
ADMU2010I: Stopping all server processes for node Node02
ADMU0024I: Deleting the old backup directory.
ADMU0015I: Backing up the original cell repository.
ADMU0012I: Creating Node Agent configuration for node: Node02
ADMU0014I: Adding node Node02 configuration to cell: KUMAR
ADMU0016I: Synchronizing configuration between node and cell.
ADMU0018I: Launching Node Agent process for node: Node02
ADMU0020I: Reading configuration for Node Agent process: nodeagent
ADMU0022I: Node Agent launched. Waiting for initialization status.
ADMU0030I: Node Agent initialization completed successfully. Process id is:         5722

ADMU0300I: The node Node02 was successfully added to the KUMAR cell.
ADMU0306I: Note:
ADMU0302I: Any cell-level documents from the standalone KUMAR configuration
           have not been migrated to the new cell.
ADMU0307I: You might want to:
ADMU0303I: Update the configuration on the KUMAR Deployment Manager with values
           from the old cell-level documents.

ADMU0306I: Note:
ADMU0304I: Because -includeapps was not specified, applications installed on
           the standalone node were not installed on the new cell.
ADMU0307I: You might want to:
ADMU0305I: Install applications onto the KUMAR cell using wsadmin $AdminApp or
           the Administrative Console.
ADMU0003I: Node Node02 has been successfully federated.
[websphe@websphe bin]$

Restore dmgr1-backup.zip in new dmgr
[websphe@websphe was]$ cd was70/profiles/dmgr/bin/
[websphe@websphe bin]$ ./restoreConfig.sh /u03/local/opt/was/backup/dmgr1-backup.zip
ADMU0116I: Tool information is being logged in file
           /u03/local/opt/was/was70/profiles/dmgr/logs/restoreConfig.log
ADMU0128I: Starting tool with the dmgr profile
ADMU0505I: Servers found in configuration:
ADMU0506I: Server name: dmgr
ADMU2010I: Stopping all server processes for node Manager01
ADMU0510I: Server dmgr is now STOPPED
ADMU5502I: The directory /u03/local/opt/was/was70/profiles/dmgr/config already
           exists; renaming to
           /u03/local/opt/was/was70/profiles/dmgr/config.old_1
ADMU5504I: Restore location successfully renamed
ADMU5505I: Restoring file /u03/local/opt/was/backup/dmgr1-backup.zip to
           location /u03/local/opt/was/was70/profiles/dmgr/config
........................................................................
962 files successfully restored
ADMU6001I: Begin App Preparation -
ADMU6009I: Processing complete.
ADMU6002I: Begin Asset Preparation -
ADMU6009I: Processing complete.
[websphe@websphe bin]$

if you start dmgr below error will be occur.

[websphe@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.
ADMU3011E: Server launched but failed initialization. startServer.log,
           SystemOut.log(or job log in zOS) and other log files under
           /u03/local/opt/was/was70/profiles/dmgr/logs/dmgr should contain
           failure information.

Check below error in SysyemOut.log file 

HMGR0024W: An error was encountered while looking up the IP address for the host name of a core group member.

So change hostname bharath.tech.com to websphe.tech.com in below files
/u03/local/opt/was/was70/profiles/dmgr/config/cells/KUMAR/nodes/Node01/serverindex.xml
/u03/local/opt/was/was70/profiles/dmgr/config/cells/KUMAR/nodes/Node02/serverindex.xml
/u03/local/opt/was/was70/profiles/dmgr/config/cells/KUMAR/nodes/Manager01/serverindex.xml

Then you can start dmgr

[websphe@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 6941

now we got our previous servers and cluster and applications on websphere 





1 comment:

Anonymous said...

Instead of patching the xml files to change the hostname you should use the wsadmin command, see
http://www-01.ibm.com/support/knowledgecenter/SSEQTP_7.0.0/com.ibm.websphere.base.iseries.doc/info/iseries/ae/tagt_hostname.html?cp=SSEQTP_7.0.0%2F2-4-0-0-1-2-3&lang=en