Skip to content
May 10, 2016 / Shivananda Rao P

OEM 12c Cloud Control – Agent Silent installation using Response File

We have come across OEM agent installation from the Cloud Control tool. This article demonstrates on how to install 12c cloud control agent uisng “silent” mode which makes use of the “response” file.

 

Environment details is as follows:

 

OMS hostname              : ora1-2
Agent will be deployed on : ora1-1

 

Below is the details of the OMS status. This is checked from the OMS server.

 

[oracle@ora1-2 bin]$ ./emctl status oms -details
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host        : ora1-2.mydomain
HTTP Console Port          : 7788
HTTPS Console Port         : 7802
HTTP Upload Port           : 4889
HTTPS Upload Port          : 4903
EM Instance Home           : /u01/app/oracle/gc_inst1/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/gc_inst1/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://ora1-2.mydomain:7802/em
Upload URL: https://ora1-2.mydomain:4903/empbs/upload

WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      : ora1-2.mydomain
Admin Server HTTPS Port: 7102
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: ora1-2.mydomain
WebTier is Up
Oracle Management Server is Up

BI Publisher is not configured to run on this host.
[oracle@ora1-2 bin]$

 

Login to the “Enterprise Manager Command Line Interface” client from the OMS host with username as SYSMAN and it’s password.

 

[oracle@ora1-2 bin]$ pwd
/u01/app/oracle/oms12c/oms/bin
[oracle@ora1-2 bin]$
[oracle@ora1-2 bin]$ ./emcli login -username=sysman -password=Micromot10n
Login successful

 

Once logged in successfully, synchronize the EMCLI.

 

[oracle@ora1-2 bin]$ ./emcli sync
Synchronized successfully
[oracle@ora1-2 bin]$

 

Identify the list of Operating Systems for which the Agent software is available. This can be obtained by running the “get_supported_platforms” from the EMCLI interface.

 

[oracle@ora1-2 bin]$ ./emcli get_supported_platforms
-----------------------------------------------
Version = 12.1.0.4.0
 Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.

 

Get the Agent software for the required Operating system by specifying the “platform” option and the relevant agent version by passing “version” option.
The image will be saved on to the OMS host at the location specifed under the “destination” option. Here, I’m getting the AgentImage for “Linux x86-64” platform and of version “12.1.0.4.0” as stated above and saving the AgentImage to “/u03/agent_software” location on the OMS host.

 

[oracle@ora1-2 bin]$ ./emcli get_agentimage -destination=/u03/agent_software -platform="Linux x86-64" -version="12.1.0.4.0"
 === Partition Detail ===
Space free : 15 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/gc_inst1/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2016-04-08_18-49-33-PM.log
Downloading /u03/agent_software/12.1.0.4.0_AgentCore_226.zip
File saved as /u03/agent_software/12.1.0.4.0_AgentCore_226.zip
Downloading /u03/agent_software/12.1.0.4.0_PluginsOneoffs_226.zip
File saved as /u03/agent_software/12.1.0.4.0_PluginsOneoffs_226.zip
Downloading /u03/agent_software/unzip
File saved as /u03/agent_software/unzip
Agent Image Download completed successfully.
[oracle@ora1-2 bin]$

 

Copy this downloaded AgentImage on to the target server where the Agent needs to be installed. In my case, it’s host ora1-1 where the agent will be installed.

 

[oracle@ora1-2 bin]$ cd /u03/agent_software
[oracle@ora1-2 agent_software]$ ls -lrt
total 250000
-rw-r--r--. 1 oracle oinstall 255744050 Apr  8 18:52 12.1.0.4.0_AgentCore_226.zip
[oracle@ora1-2 agent_software]$
[oracle@ora1-2 agent_software]$
[oracle@ora1-2 agent_software]$
[oracle@ora1-2 agent_software]$ scp 12.1.0.4.0_AgentCore_226.zip oracle@ora1-1:/u03/
oracle@192.168.56.101's password:
12.1.0.4.0_AgentCore_226.zip                                                                                                         100%  244MB   9.0MB/s   00:27
[oracle@ora1-2 agent_software]$

 

[oracle@ora1-1 ~]$ cd /u03
[oracle@ora1-1 u03]$ ls -lrt
total 1196388
drwx------. 2 oracle oinstall     16384 Jan  1 17:25 lost+found
-rw-r--r--. 1 oracle oinstall 915338678 Mar 27 11:25 p19954978_121020_Linux-x86-64.zip
drwxr-xr-x. 3 oracle oinstall      4096 Mar 27 11:43 121022_gi_psu
-rw-r--r--. 1 oracle oinstall  52774823 Mar 27 13:38 p6880880_121010_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall 255744050 Apr  8 19:11 12.1.0.4.0_AgentCore_226.zip
[oracle@ora1-1 u03]$

 

On the target server, unzip the AgentImage software received from the OMS host.

 

[oracle@ora1-1 u03]$
[oracle@ora1-1 u03]$ mkdir 12104_agent
[oracle@ora1-1 u03]$
[oracle@ora1-1 u03]$ unzip -d 12104_agent 12.1.0.4.0_AgentCore_226.zip
Archive:  12.1.0.4.0_AgentCore_226.zip
  inflating: 12104_agent/unzip
  inflating: 12104_agent/agentDeploy.sh
  inflating: 12104_agent/agentimage.properties
  inflating: 12104_agent/agent.rsp
 extracting: 12104_agent/agentcoreimage.zip
 extracting: 12104_agent/12.1.0.4.0_PluginsOneoffs_226.zip
[oracle@ora1-1 u03]$

 

Edit the “agent.rsp” (AgentResponseFile) to add the details such as OMS Hostname, EM Upload Port (the HTTPS port number of OMS), Agent Registration Password (used to secure the agent), Agent Instance Home location, Agent Port number (port where Agent process will be started),b_startAgent (True if the agent needs to be started automatically after installed and configured, ORACLE_HOSTNAME (host name of the target server where the agent will be installed), s_agentHomeName (name for the Agent Home).

 

Below are the details suiting my environment.

 

OMS_HOST=ora1-2.mydomain
EM_UPLOAD_PORT=4903
AGENT_REGISTRATION_PASSWORD=oracle123
AGENT_INSTANCE_HOME=
AGENT_PORT=3873
b_startAgent=true
ORACLE_HOSTNAME=ora1-1.mydomain
s_agentHomeName=agent12cr1

 

[oracle@ora1-1 12104_agent]$ cat agent.rsp
<output trimmed>

OMS_HOST=ora1-2.mydomain
EM_UPLOAD_PORT=4903
AGENT_REGISTRATION_PASSWORD=oracle123
AGENT_INSTANCE_HOME=
AGENT_PORT=3873
b_startAgent=true
ORACLE_HOSTNAME=ora1-1.mydomain
s_agentHomeName=agent12cr1


<output trimmed>

 

[oracle@ora1-1 oracle]$ cd /u03/12104_agent/
[oracle@ora1-1 12104_agent]$ ls -lrt
total 250112
-rw-rw-r--. 1 oracle oinstall       178 May 24  2014 agentimage.properties
-rwxr-xr-x. 1 oracle oinstall    145976 May 24  2014 unzip
-rwxrwxr-x. 1 oracle oinstall     27905 May 24  2014 agentDeploy.sh
-rw-rw-r--. 1 oracle oinstall 248704435 May 24  2014 agentcoreimage.zip
-rw-r--r--. 1 oracle oinstall   6958959 Apr  8 18:52 12.1.0.4.0_PluginsOneoffs_226.zip
-rwxrwxr-x. 1 oracle oinstall      3726 Apr  8 19:26 agent.rsp

 

[oracle@ora1-1 12104_agent]$ ./agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/agent12c RESPONSE_FILE=/u03/12104_agent/agent.rsp

Validating the OMS_HOST & EM_UPLOAD_PORT
Executing command : /u01/app/oracle/agent12c/core/12.1.0.4.0/jdk/bin/java -classpath /u01/app/oracle/agent12c/core/12.1.0.4.0/jlib/agentInstaller.jar:/u01/app/oracle/agent12c/core/12.1.0.4.0/oui/jlib/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/agent12c/core/12.1.0.4.0 /u03/12104_agent /u01/app/oracle/agent12c -prereq

Validating oms host & port with url: http://ora1-2.mydomain:4903/empbs/genwallet
Validating oms host & port with url: https://ora1-2.mydomain:4903/empbs/genwallet
Return status:3-oms https port is passed
Unzipping the agentcoreimage.zip to /u01/app/oracle/agent12c ....
12.1.0.4.0_PluginsOneoffs_226.zip
Executing command : /u03/12104_agent/unzip -o /u03/12104_agent/12.1.0.4.0_PluginsOneoffs_226.zip -d /u01/app/oracle/agent12c
Executing command : /u01/app/oracle/agent12c/core/12.1.0.4.0/jdk/bin/java -classpath /u01/app/oracle/agent12c/core/12.1.0.4.0/oui/jlib/OraInstaller.jar:/u01/app/oracle/agent12c/core/12.1.0.4.0/oui/jlib/xmlparserv2.jar:/u01/app/oracle/agent12c/core/12.1.0.4.0/oui/jlib/srvm.jar:/u01/app/oracle/agent12c/core/12.1.0.4.0/oui/jlib/emCfg.jar:/u01/app/oracle/agent12c/core/12.1.0.4.0/jlib/agentInstaller.jar:/u01/app/oracle/agent12c/core/12.1.0.4.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/agent12c/core/12.1.0.4.0 /u03/12104_agent /u01/app/oracle/agent12c /u01/app/oracle/agent12c/agent_inst AGENT_BASE_DIR=/u01/app/oracle/agent12c


Executing agent install prereqs...
Executing command: /u01/app/oracle/agent12c/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion  -prereqlogloc /u01/app/oracle/agent12c/core/12.1.0.4.0/cfgtoollogs/agentDeploy -entryPoint oracle.sysman.top.agent_Complete -detailedExitCodes PREREQ_CONFIG_LOCATION=/u01/app/oracle/agent12c/core/12.1.0.4.0/prereqs  -J-DORACLE_HOSTNAME=ora1-1.mydomain -J-DAGENT_PORT=3873 -J-DAGENT_BASE_DIR=/u01/app/oracle/agent12c

Agent install prereqs completed successfully

Cloning the agent home...
Executing command: /u01/app/oracle/agent12c/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/agent12c/core/12.1.0.4.0 -responseFile /u03/12104_agent/agent.rsp  AGENT_BASE_DIR=/u01/app/oracle/agent12c AGENT_BASE_DIR=/u01/app/oracle/agent12c RESPONSE_FILE=/u03/12104_agent/agent.rsp -noconfig  ORACLE_HOME_NAME=agent12cr1 -force b_noUpgrade=true

Cloning of agent home completed successfully

Attaching sbin home...
Executing command: /u01/app/oracle/agent12c/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -attachHome -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/agent12c/sbin ORACLE_HOME_NAME=sbin12c1 -force

Attach home for sbin home completed successfully.

Updating home dependencies...
Executing command: /u01/app/oracle/agent12c/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={/u01/app/oracle/agent12c/sbin:/u01/app/oracle/agent12c/core/12.1.0.4.0} -invPtrLoc /u01/app/oracle/agent12c/core/12.1.0.4.0/oraInst.loc -force

Update home dependency completed successfully.
Executing command: /u01/app/oracle/agent12c/core/12.1.0.4.0/oui/bin/runConfig.sh ORACLE_HOME=/u01/app/oracle/agent12c/core/12.1.0.4.0 RESPONSE_FILE=/u01/app/oracle/agent12c/core/12.1.0.4.0/agent.rsp ACTION=configure MODE=perform COMPONENT_XML={oracle.sysman.top.agent.11_1_0_1_0.xml} RERUN=true

ERROR: Agent Configuration Failed SEVERE:emctl secure agent command has failed with status=1SEVERE:emctl secure agent command has failed with status=1SEVERE:emctl secure agent command has failed with status=1

Agent Deploy Log Location:/u01/app/oracle/agent12c/core/12.1.0.4.0/cfgtoollogs/agentDeploy/agentDeploy_2016-04-09_12-34-49-PM.log

 

The Agent configuration failed with error “ERROR: Agent Configuration Failed SEVERE:emctl secure agent command has failed with status=1SEVERE:emctl secure agent command has failed with status=1SEVERE:emctl secure agent command has failed with status=1”. This error signifies that the configuration failed while securing the agent.

Does that mean that the agent is not installed ? Let’s check the status and try securing the agent manually.

 

[oracle@ora1-1 12104_agent]$
[oracle@ora1-1 12104_agent]$
[oracle@ora1-1 12104_agent]$
[oracle@ora1-1 12104_agent]$
[oracle@ora1-1 12104_agent]$ /u01/app/oracle/agent12c/core/12.1.0.4.0/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent is Not Running

 

The agent is installed but seems to be not running. Expected.
Not sure why the “agentdeploy” script failed securing the agent even though the Agent_Registration_Password is right. Let me try securing it manually with the same password.

 

[oracle@ora1-1 12104_agent]$
[oracle@ora1-1 12104_agent]$
[oracle@ora1-1 12104_agent]$ /u01/app/oracle/agent12c/core/12.1.0.4.0/bin/emctl secure agent oracle123
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Agent is already stopped...   Done.
Securing agent...   Started.
Securing agent...   Successful.
[oracle@ora1-1 12104_agent]$

 

Ok, good to see that it’s success 🙂
Let me check the status of the agent.

 

[oracle@ora1-1 12104_agent]$ /u01/app/oracle/agent12c/core/12.1.0.4.0/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent is Not Running

 

Agent seems to be not running. Again as expected. Let me start the agent and add the targets manually using the “addinternaltargets” option at the EMCTL prompt.

 

[oracle@ora1-1 12104_agent]$
[oracle@ora1-1 12104_agent]$ /u01/app/oracle/agent12c/core/12.1.0.4.0/bin/emctl start agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Starting agent ........... started.

 

[oracle@ora1-1 12104_agent]$ /u01/app/oracle/agent12c/core/12.1.0.4.0/bin/emctl config agent addinternaltargets
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.

 

Check the status of the agent.

 

[oracle@ora1-1 12104_agent]$ /u01/app/oracle/agent12c/core/12.1.0.4.0/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 12.1.0.4.0
OMS Version            : 12.1.0.4.0
Protocol Version       : 12.1.0.1.0
Agent Home             : /u01/app/oracle/agent12c/
Agent Log Directory    : /u01/app/oracle/agent12c//sysman/log
Agent Binaries         : /u01/app/oracle/agent12c/core/12.1.0.4.0
Agent Process ID       : 6703
Parent Process ID      : 6610
Agent URL              : https://ora1-1.mydomain:3873/emd/main/
Local Agent URL in NAT : https://ora1-1.mydomain:3873/emd/main/
Repository URL         : https://ora1-2.mydomain:4903/empbs/upload
Started at             : 2016-04-09 12:42:25
Started by user        : oracle
Operating System       : Linux version 2.6.32-71.el6.x86_64 (amd64)
Last Reload            : (none)
Last successful upload                       : 2016-04-09 12:56:26
Last attempted upload                        : 2016-04-09 12:56:26
Total Megabytes of XML files uploaded so far : 0
Number of XML files pending upload           : 33
Size of XML files pending upload(MB)         : 0.02
Available disk space on upload filesystem    : 41.15%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2016-04-09 12:55:47
Last successful heartbeat to OMS             : 2016-04-09 12:55:47
Next scheduled heartbeat to OMS              : 2016-04-09 12:56:47

---------------------------------------------------------------
Agent is Running and Ready
[oracle@ora1-1 12104_agent]$

 

 

COPYRIGHT

© Shivananda Rao P, 2012 to 2018. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Shivananda Rao and http://www.shivanandarao-oracle.com with appropriate and specific direction to the original content.

 

 

DISCLAIMER

The views expressed here are my own and do not necessarily reflect the views of any other individual, business entity, or organization. The views expressed by visitors on this blog are theirs solely and may not reflect mine

Leave a comment