Advertisement

Showing posts with label 13cR2. Show all posts
Showing posts with label 13cR2. Show all posts

Friday, June 26, 2020

Oracle Enterprise Manager: Silent Installation Fail (SEVERE:emctl secure agent command has failed with status=1)

In this blog I cover what to do when the OEM agent installation fails 


SEVERE:emctl secure agent command has failed with status=1
SEVERE:emctl secure agent command has failed with status=1
SEVERE:emctl secure agent command has failed with status=1
Agent configuration has failed
/u01/app/oracle/product/agent/agent_13.3.0.0.0/cfgtoollogs/agentDeploy/agentDeploy_2020-06-25_23-04-01-PM.log
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Waiting for agent targets to get promoted...
Promoting agent and its related targets to Management Service failed probably due to target type meta version present on the agent is not present on the OMS.Make sure that the plug-in version deployed on agents is the same as that of the version on the OMS. Also, the agent should be on the same bundle patch version as that of the OMS.For more details, check <AGENT_INST>/sysman/log/gcagent.log on agent and emoms_pbs.log on the OMS.
Fix the cause of the error and retry the operation (or) manually run the following commands on the remote host

The fix for this pretty simple follow sequence of commands as given below - 
[As root]
Run root.sh
<AGENT_BASE/AGENT_VERSION/root.sh>
/u01/app/oracle/product/agent/agent_13.3.0.0.0/root.sh

[As oracle]
emctl secure agent
emctl status agent -secure
# Ensure the status is shown as secure
 
emctl start agent
emctl status agent
emctl config agent listtargets
#Ensure there are no targets
 
emctl config agent addInternalTargets
# there can be some warning messages when above command is run
emctl config agent listtargets
# Ensure that there are 2 targets listed - agent and host 

Oracle Enterprise Manager: Un-install OEM Agent (Host and OMS)

This blog discusses on steps to un-install OEM agent from the host and remove from OMS


Step 1: Uninstall OEM Agent
$<AGENT_HOME>/perl/bin/perl <AGENT_HOME>/sysman/install/AgentDeinstall.pl -agentHome <AGENT_HOME>

Example
/u01/app/oracle/product/agent/agent_13.3.0.0.0/perl/bin/perl /u01/app/oracle/product/agent/agent_13.3.0.0.0/sysman/install/AgentDeinstall.pl -agentHome /u01/app/oracle/product/agent/agent_13.3.0.0.0


Step2: Remove OEM from OMS
emcli login -username=sysman
emcli sync
emcli delete_target -name="<target name:port>" -type="oracle_emd" -delete_monitored_targets

And that is it :)

Monday, December 23, 2019

OEM 13cR3: Get List of All Targets (or Hosts)

In this short blog I am going to tell about on how to list all targets monitored by EM or filter specific targets


emcli list -resource=Targets -columns="TARGET_NAME:70,TARGET_TYPE:50"


And if you need to filter filter by type 

emcli list -resource=Targets -columns="TARGET_NAME:70,TARGET_TYPE:50" | grep hosts

Tuesday, August 20, 2019

Oracle Enterprise Manager: How to Supress 'EM Event: Warning: - User SYS logged on '

User Logged on can be really pain as it makes a lot of noise, It is one of the collected metrics without any threshold and will generate a warning or critical message (and probably clear as well) as per your configuration.

so, what do you do about it ? 

There can be many solutions
1. Remove SYS from Auditing 

  • Go to database home page
  • Oracle Database (drop down menu)/Monitoring/Metric and Collection Settings
  • Scroll down to:   User Audit/Audited User
  • make sure that no values are set for the 'warning' and 'critical' boxes apply the changes 
2. Remove this from Template if you want to do it for all Databases

3. The final solution is that the metric is still collected and you see it in the database, however you just remove it from the Incident rules and notification.
For this first, identify the Incident rule which created this, you will find this in the alert email. 
  • Go to Incidents -> incident rules
  • Select your In
  • Edit the incident rule 
  • and then in the filter 'Select a Filter' Event not equals 'UserAudit:username'cident rule



This will stop the notification emails for user log-ons all together.

Oracle Enterprise Manager : Internal error detected: oracle.sysman.gcagent.task.TaskZombieException

I was getting a lot of error messages/incidents and alerts stating 'Internal error detected: oracle.sysman.gcagent.task.TaskZombieException'
in my Enterprise Manager (Release 13cR2)

The right way should be to find out what is causing these (generally failed / timed out responses)
However, they are also caused due to bugs in OEM.

The way to suppress these is as below 

# cd $AGENT_HOME/agent_inst

# bin/emctl stop agent
# cd sysman/config
# cp emd.properties emd.properties.bkp_19Aug2019
# vi emd.properties

Append Below 

_zombieSuspensions=true
_canceledThreadWait=900
_zombieThreadPercentThreshold=0
_zombieCreateIncident=false
_cancelThreadTimeout=300
_traceSeverityForTypes=noTypes

# cp s_jvm_options.opt s_jvm_options.opt.bkp_19Aug2019
# vi s_jvm_options.opt

Append Below at EOF

-XX:+UseMembar


# $AGENT_HOME/agent_inst/bin/emctl start agent

this will stop creating incidents for your zombie processes. 
Reference - MoS - Doc ID 1468586.1