Thursday, February 17, 2011

EM11g - Steps to Deploy AD4J (JVMD) manager on a Remote Machine

Step 1. Install EM agent on the remote host (host2) and point it to the OMS.

Step 2. Install weblogic server bits on host2 using EM installer. (Software only option).  This is to ensure same version and patch level for weblogic server on host2.
e.g. ./runInstaller -noconfig b_softwareonly=true

Step 3. Create a new server using the weblogic console of the emgc domain, name it as 'AD4JRemoteServer'. Make sure the listen address as the one of the remote host and a port number.

Step 4. Create a new machine from the weblogic console. Associate this machine with the nodemanager on remote host.
Enter the correct listen address ( the remote machine ), and the nodemanager port number( default 5556).
Add the managed server created in step 3 (AD4JRemoteServer) to the machine. ( Select the machine created and click on servers )

Step 5 . Now we will create a weblogic template based on EM GC domain running on local host using pack command. And unpack it on the remote host.
./ -domain=/u01/app/oracle/work/gc_inst/user_projects/domains/GCDomain -template=/u01/app/testing/emgcdomain.jar -template_name="My Weblogic Domain" -managed={true}
Where domain=/u01/app/oracle/work/gc_inst/user_projects/domains/GCDomain is the location of domain on local host. 
And ‘/u01/app/testing/emgcdomain.jar’ is the location where we want to create the template .

Step 6 . Now we will copy emgcdomain.jar to remote host .

Step 7 . Now we will unpack this template on remote host using the unpack command
./ -domain=/u01/app/oracle/work/gc_inst -template=/net/myhost1/u01/app/testing/emgcdomain.jar
Where domain=/u01/app/oracle/work/gc_inst is the domain location of the remote machine and ‘/net/myhost1/u01/app/testing/emgcdomain.jar’ is the location of template where you copied emgcdomain.jar in step 6 on remote host.

Step 8. We need to enroll the weblogic domain with node manager using wlst command nmEnroll().
On the remote host, run
a. <Weblogic home>/common/bin/
b. Connect to the admin url of the weblogic console
    Note: the admin url should be precisely given. No '/' at the end, otherwise it gives weird MbeanServer exceptions
c. Register your domain with the following command
    nmEnroll(<Domain home>) 
    e.g. wls:/GCDomain/serverConfig> nmEnroll('/u01/app/oracle/work/gc_inst')
d. Exit Wlst script using exit()

Step 9. On the remote host, the nodemanager startup file will be located at  <Weblogic Home>server/bin/
Before we run it however, we must set the property startScriptEnabled=true in the file.
This is to work around a weblogic JRF bug.
We can easily set it by running this script
<middleware home>/oracle_common/common/bin/
Now start the nodemanager using
<Weblogic Home>server/bin/
Note down the nodemanager port number and mode. By default, it will run in ssl mode on port 5556

Step 10. Start up the server AD4JRemoteServer from the weblogic console. It will send a request to the nodemanager to start it and in a short while show up as running.
Weblogic server setup is done. Now discover the EM domain in GC. If you have discovered it already do a “Farm Refresh” so that new managed server is discovered in EM.
Following jars are required by AD4J Manager in 11g. Add these in CLASSPATH of AD4JRemoteManager
Save and then restart the server for it to take effect.

Step 11. If you are using EM 11g, proceed to Weblogic Console to deploy AD4J Manager i.e. jammanager.ear
Download jammanager.ear from OMS i.e. Targets->Middleware->JVM Diagnostics->Setup->Download Page and deploy it on target AD4JRemoteManager. You need to ensure that port no. 3600 is available on remote host. This is the listen port that ad4j manager needs.

No comments: