Enterprise Manager

Silent Deploy of EM12c Agent on HPUX

Any of us in the DBA world know that HPUX doesn’t get a “lot of love” from Oracle. It’s one of those Operating Systems that due to the time and resource restraints on Oracle to provide the level of support for their core OS platforms and products, demands that it is “supported” but will not receive the first line of development that Linux or Solaris will.

With that said, I have a clients who do prefer HPUX with Oracle products with Windows a close second. They have numerous Windows VM environments for test and non-VM for production which serves them well.   All of these HPUX environments have full Enterprise Edition 11.2.0.3.0 installations on them, so all of these companies are serious about having supported, full featured environments, plain and simple.

With one new build of an EM12c, which happens to be running on Windows, came the requirement to deploy to HPUX targets. These servers  had no other EM agent deployed to them, so they were “clean deployments” but due to being deployed from Windows, this does require not only the Software library configured on the EM, download of the proper agent files to the EM12c and the full installation of Cygwin to support the agent communication from Windows to Unix/Linux/HPUX.

If everything is just not “so” with the HPUX environment, there can be some issues requiring you to perform a silent deploy on the target server.  This is a quite simple process, which I will now go over.  Keep in mind for this demonstration that I will be switching from Windows Command Prompt to Cygwin and then to HPUX, so the commands and slashes can get a bit whacky… 🙂

From the EM Server, log into the Enterprise Manager client and synchronize the software library :

cd $OMS_HOME\bin
$OMS_HOME\oms\BIN>emcli login -username=sysman
Enter password :

 

You will be asked for the EM12c sysman password, enter this to be logged into the EMCLI utility.

emcli sync
Synchronized successfully

Verify that the platform you require for the deploy is listed:

E:\oracle\product\12.1.0\em12c\oms\BIN>emcli get_supported_platforms
 Getting list of platforms ...
 Check the logs at E:\oracle\product\12.1.0\em12c\oms\BIN/agent.log
 About to access self-update code path to retrieve the platforms list..
 Getting Platforms list  ...
 -----------------------------------------------
 Version = 12.1.0.1.0
 Platform = HP-UX Itanium
 -----------------------------------------------
 Version = 12.1.0.1.0
 Platform = Microsoft Windows x64 (64-bit)
 -----------------------------------------------
Platforms list displayed successfully.

 

As we perform first, the software extract from the library and then the deploy, not the syntax from the above list.  It will come in handy…

I’ve created a special folder off the E:\ drive to extract the software in preparation to FTP/SCP to the HPUX target, (E:\hpux_i)

To extract the software, simply type in the following command at the command prompt:

emcli get_agentimage -destination=E:\hpux_i -platform="HP-UX Itanium" -version=12.1.0.1.0

Now FTP or SCP the file over to your HPUX Itanium target.

Once over there,  log into your target HPUX server, unzip the file to the directory you wish to deploy from.

Decide where you wish to deploy the agent to.  I prefer to deploy to $ORACLE_BASE/product/agent12c, as I like to have all my installation off of the same base.  Keep in mind that under the agent12c directory, there will be a core/12.1.0.1.0 subdirectory built.

Once you unzip the files, the $ORACLE_BASE/product/agent12c will contain a number of files.  You have the choice to execute the parameters from the command line or use the response file, I prefer this, as it deters from human error.

There are only a few entries that need to be updated in the response file agent.rsp:

OMS_HOST=<OMS Server Name>
 EM_UPLOAD_PORT=<Upload port>
 AGENT_REGISTRATION_PASSWORD=g<password if you want one>
 AGENT_INSTANCE_HOME=<$ORACLE_BASE/product/agent12c>
 AGENT_PORT=3872  <--or open port that you plan on using....
 b_startAgent=true
 ORACLE_HOSTNAME=<target server name>

Save the file and exit.

Now you are ready to run the command to deploy the agent silently, utilizing the agentDeploy.sh from the same directory:

./agentDeploy.sh AGENT_BASE_DIR=<full path to your deployment directory> 
-ignorePreReqs RESPONSE_FILE=<full path to file>

I have a tendency to ignore the prerequisites as many of my clients do not give privileges to Oracle to run root.sh and this WILL fail the deployment without it.  I simply have them run the root.sh after the successful deployment.

The following is a [non-client identifying] output from the silent deploy.  I thought it was interesting to view HOW much is performed as part of this deployment and know that this close to what is run through the auto deploy from the EM12c:

$ ./agentDeploy.sh AGENT_BASE_DIR=/$ORA_HOME/agent12c -ignorePreReq AGENT_BASE_DIR=$AGENT_HOME
-e Validating the OMS_HOST & EM_UPLOAD_PORT
 Executing command : $AGENT_HOME/core/12.1.0.1.0/jdk/bin/java -classpath 
$AGENT_HOME/core/12.1.0.1.0/jlib/agentInstaller.jar:
$AGENT_HOME/core/12.1.0.1.0/oui/jlib/OraInstaller.jar 
oracle.sysman.agent.installer.AgentInstaller 
$AGENT_HOME/core/12.1.0.1.0 $AGENT_HOME/agent12c 
$AGENT_HOME/agent12c -prereq
Validating oms host & port with url: http://$HOST:4899/empbs/genwallet
 Validating oms host & port with url: https://$HOST:4899/empbs/genwallet
 Return status:3
 Unzipping the agentcoreimage.zip to $AGENT_HOME/agent12c ....
 12.1.0.1.0_PluginsOneoffs_197.zip -e
 Checking the ownership of agent base directory:$AGENT_HOME/agent12c
 Checking for proper ownership on the agent base directory.
 Checks whether the agent base directory is owned by the agent user oracle  
 and that its parent directory is owned by either the agent user or root.
 ....
 Login name is : oracle & file owner is : oracle
 ................
 Agent Base directory verification completed Successfully.
 -e
 Ownership check completed.
 Executing command : $AGENT_HOME/core/12.1.0.1.0/jdk/bin/java  
-d64 -classpath $AGENT_HOME/core/12.1.0.1.0/oui/jlib/OraInstaller.jar:
$AGENT_HOME/core/12.1.0.1.0/oui/jlib/xmlparserv2.jar:
$AGENT_HOME/core/12.1.0.1.0/oui/jlib/srvm.jar:
$AGENT_HOME/core/12.1.0.1.0/oui/jlib/emCfg.jar:
$AGENT_HOME/core/12.1.0.1.0/jlib/agentInstaller.jar:
$AGENT_HOME/core/12.1.0.1.0/oui/jlib/share.jar 
oracle.sysman.agent.installer.AgentInstaller 
$AGENT_HOME/core/12.1.0.1.0 $AGENT_HOME/agent12c $AGENT_HOME/agent12c 
AGENT_BASE_DIR=$AGENT_HOME/agent12c AGENT_BASE_DIR=$AGENT_HOME/agent12c 
-ignorePrereqs RESPONSE_FILE=$AGENT_HOME/agent.rsp
Cloning the agent home...
 Executing command: $AGENT_HOME/core/12.1.0.1.0/oui/bin/runInstaller 
-ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait 
ORACLE_HOME=$AGENT_HOME/core/12.1.0.1.0 -responseFile 
$AGENT_HOME/agent.rsp  AGENT_BASE_DIR=$AGENT_HOME/agent12c 
AGENT_BASE_DIR=$AGENT_HOME/agent12c RESPONSE_FILE=$AGENT_HOME/agent.rsp -noconfig  
ORACLE_HOME_NAME=agent12g1 -force
 Clone Action Logs Location:/$ORACLE_BASE/oraInventory/logs/cloneActions<timestamp>.log
 Cloning of agent home completed successfully
Attaching sbin home...
 Executing command: $AGENT_HOME/core/12.1.0.1.0/oui/bin/runInstaller 
 -ignoreSysPrereqs -attachHome -waitForCompletion -nowait 
 ORACLE_HOME=$AGENT_HOME/sbin ORACLE_HOME_NAME=sbin12g1 -force
 Attach Home Logs Location:$AGENT_HOME/core/12.1.0.1.0/cfgtoollogs/agentDeploy/
 AttachHome<timestamp>.log
 Attach home for sbin home completed successfully.
Updating home dependencies...
 Executing command:$AGENT_HOME/core/12.1.0.1.0/oui/bin/runInstaller 
-ignoreSysPrereqs -updateHomeDeps -waitForCompletion
HOME_DEPENDENCY_LIST="$AGENT_HOME/sbin:$AGENT_HOME/core/12.1.0.1.0" 
-invPtrLoc $AGENT_HOME/core/12.1.0.1.0/oraInst.loc -force
 Update Home Dependencies 
Location:$AGENT_HOME/core/12.1.0.1.0/cfgtoollogs/agentDeploy/UpdateHomeDeps<timestamp>.log
 Update home dependency completed successfully.
Performing the agent configuration...
 Executing command: $AGENT_HOME/core/12.1.0.1.0/oui/bin/runConfig.sh 
ORACLE_HOME=$AGENT_HOME/core/12.1.0.1.0 
RESPONSE_FILE=$AGENT_HOME/agent12c/core/12.1.0.1.0/agent.rsp 
ACTION=configure MODE=perform COMPONENT_XML={oracle.sysman.top.agent.11_1_0_1_0.xml} 
RERUN=true
 Configuration Log Location:$AGENT_HOME/core/12.1.0.1.0/cfgtoollogs/
cfgfw/CfmLogger<timestamp>.log
 Agent Configuration completed successfully
The following configuration scripts need to be executed as the "root" user.
 #!/bin/sh
 #Root script to run
 $AGENT_HOME/core/12.1.0.1.0/root.sh
 To execute the configuration scripts:
 1. Open a terminal window
 2. Log in as "root"
 3. Run the scripts
 Agent Deployment Successful.
 Agent deployment log location:
 $AGENT_HOME/core/12.1.0.1.0/cfgtoollogs/agentDeploy/agentDeploy_<timestamp>.log
 Agent deployment completed successfully.

 

Once you have successfully deployed the agent, have the root.sh run as root or as user with sudo privileges, then, check the status and upload the agent:

./emctl status agent
.....
 Last successful upload                       : 2012-07-12 18:12:39
 Last attempted upload                        : 2012-07-12 18:12:39
 Total Megabytes of XML files uploaded so far : 1.49
 Number of XML files pending upload           : 0
 Size of XML files pending upload(MB)         : 0
 Available disk space on upload filesystem    : 86.20%
 Collection Status                            : Collections enabled
 Last attempted heartbeat to OMS              : 2012-07-12 18:16:15
 Last successful heartbeat to OMS             : 2012-07-12 18:16:15
---------------------------------------------------------------
 Agent is Running and Ready
./emctl upload agent
 Oracle Enterprise Manager 12c Cloud Control 12.1.0.1.0
 Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
 ---------------------------------------------------------------
 EMD upload completed successfully

You will now see the host in the list of EM12c hosts in the console:


Now click on “Targets” and “Databases”.

Click on “Add”, go through the standard steps to add the host’s targets to be monitored by the EM12c to the environment, setting the password for the EM12c, (if the database was not prepped, you may have to unlock and reset the DBSNMP dbuser on the target database before you are able to complete the configuration…)

Once finished, you may need to upload the target or just be patient and wait for the green arrow to appear for all targets added:

In your summary page, you should have verify that all targets are up and in a green status:

 

The process of adding the HPUX targets through a silent deploy is complete!

 

 

 

 

 

 

Kellyn

http://about.me/dbakevlar

3 thoughts on “Silent Deploy of EM12c Agent on HPUX

  • mazen

    dear,
    i follow your steps as it is (while i have same Enviroment) but i’m getting the below Error from Log file:
    INFO: oracle.sysman.top.agent:Executing the command:/u01/app/oracle/Agent12c_software/bin/emctl start agent
    INFO: oracle.sysman.top.agent:Oracle Enterprise Manager 12c Cloud Control 12.1.0.1.0
    INFO: oracle.sysman.top.agent:Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
    INFO: oracle.sysman.top.agent:Starting agent ……………………………………………………………………………………………………………Consult the log files in: /u0
    1/app/oracle/Agent12c_software/sysman/log
    SEVERE: oracle.sysman.top.agent:emctl start agent command has failed with status1

    could you please advise…
    Thank you

  • If you go to the following directory: /u01/app/oracle/Agent12c_software/sysman/log
    and do an “ls -ltr”, you will see the logs that were the output and where your error has occurred.
    Start by viewing the log with the most recent timestamp, (most likely the emctl.log…) inspecting for more specific information about what caused the agent not to start.
    *************************************
    My first guess is that you need to view and verify that there is not already an agent running in the core directory:
    ps -ef | grep emwd.pl

    You may be surprised to find out you are attempting to start a second agent from the source directory instead of the core one that is
    $AGENT_HOME/core/12.1.0.1.0/bin/emctl <--this one is running and is the one that should be started... $AGENT_HOME/agent_inst/bin/emctl Hope this helps, Kellyn

  • mazen

    Dear Kellyn,
    actually i tried to see if there is any other agent working but there isn’t any, you can check below the last 20 lines from emctl.log file:

    1565 :: Wed Sep 5 17:29:44 2012::AgentStatus.pm:emdctl status agent returned 1
    1565 :: Wed Sep 5 17:29:44 2012::AgentPlugin.pm:istatusCEMD returned 1
    1565 :: Wed Sep 5 17:29:44 2012::AgentPlugin.pm: Agent is not running
    1565 :: Wed Sep 5 17:29:44 2012::AgentPlugin.pm: Wrote UpdateInventory=true in /u01/app/oracle/Agent12c_software/sysman/emd/agntstmp.txt
    1565 :: Wed Sep 5 17:29:44 2012::AgentPlugin.pm:EMD update_inventory plugin succeeded
    1579 :: Wed Sep 5 17:29:46 2012::AgentLifeCycle.pm: Processing start agent
    1579 :: Wed Sep 5 17:29:46 2012::AgentLifeCycle.pm: EMHOME is /u01/app/oracle/Agent12c_software
    1579 :: Wed Sep 5 17:29:46 2012::AgentLifeCycle.pm: service name is
    1579 :: Wed Sep 5 17:29:46 2012::AgentLifeCycle.pm: ParentProcess id=1573
    1579 :: Wed Sep 5 17:29:46 2012::EM_SECURE_HOSTNME: 10.11.88.120
    1579 :: Wed Sep 5 17:29:46 2012::EM_SECURE_PORT: 3872
    1579 :: Wed Sep 5 17:29:46 2012::EM_LISTEN_ON_ALL_NICS: true
    1579 :: Wed Sep 5 17:29:47 2012::AgentLifeCycle.pm:status agent returned with retCode=1
    1590 :: Wed Sep 5 17:29:47 2012::AgentLifeCycle.pm: Launching the watchdog process.
    1579 :: Wed Sep 5 17:29:47 2012::AgentLifeCycle.pm: Launched the watchdog process pid=1590
    1579 :: Wed Sep 5 17:29:47 2012::AgentLifeCycle.pm: StartCEMD start retryCount=120
    1579 :: Wed Sep 5 17:29:49 2012::AgentLifeCycle.pm:Watch dog processs id: 1590 exited with an exit code of 2
    1579 :: Wed Sep 5 17:31:49 2012::AgentLifeCycle.pm: Exited loop retryCount=0 with retCode=1
    1579 :: Wed Sep 5 17:31:49 2012::AgentLifeCycle.pm: StartCEMD Querying for the real status of the agent
    1579 :: Wed Sep 5 17:31:50 2012::AgentLifeCycle.pm: Check agent status retCode=1
    1579 :: Wed Sep 5 17:31:50 2012::TZ: EmctlLogAvailabilityMarker Operation=start Diag=

    i appreciate your help so much, i tried to rerun the process many times and always get same log

    Thank You

Comments are closed.