12c EM : Starting Agent Fails with "Invalid maximum heap size" in the emagent.nohup File

(Doc ID 2312476.1)

Last updated on OCTOBER 05, 2017

Applies to:

Enterprise Manager Base Platform - Version 12.1.0.5.0 and later
Information in this document applies to any platform.

Symptoms

Attempting to start the 12c Agent fails with:

Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
Starting agent ...........................................................................................................................failed.
Consult emctl.log and emagent.nohup in: /u01/app/oracle/product/emagent12c/agent_inst/sysman/log

-  "emctl status agent" reports:

Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent is Not Running

-  However, there are multiple emwd.pl related perl processes running:

ps -ef | grep <agent_home>
............

/emagent12c/agent_inst/sysman/log/emagent.nohup
oracle 348334 0.5 0.1 449680 326592 ? S Aug29 229:18 /u01/app/oracle/product/emagent12c/core/12.1.0.5.0/perl/bin/perl 
/u01/app/oracle/product/emagent12c/core/12.1.0.5.0/bin/emwd.pl agent /u01/app/oracle/product/emagent12c/agent_inst/sysman/log/emagent.nohup
oracle 367843 0.5 0.1 449680 326568 ? S Aug29 229:33 /u01/app/oracle/product/emagent12c/core/12.1.0.5.0/perl/bin/perl 
/u01/app/oracle/product/emagent12c/core/12.1.0.5.0/bin/emwd.pl agent /u01/app/oracle/product/emagent12c/agent_inst/sysman/log/emagent.nohup
oracle 376231 0.3 0.0 199384 76380 ? S Sep20 26:25 /u01/app/oracle/product/emagent12c/core/12.1.0.5.0/perl/bin/perl 
/u01/app/oracle/product/emagent12c/core/12.1.0.5.0/bin/emwd.pl agent /u01/app/oracle/product/emagent12c/agent_inst/sysman/log/emagent.nohup

-  The <AGENT_INST>/sysman/log/emagent.nohup file shows:

----- Tue Sep 26 14:24:02 2017::191581::Launching the JVM with following options: -Xmx512M:MaxPermSize=96M -Djava.net.preferIPv4Stack=true -server 
-Djava.security.egd=file:///dev/./urandom -Dsun.lang.ClassLoader.allowArraySyntax=true -XX:+UseLinuxPosixThreadCPUClocks -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled 
-XX:+UseCompressedOops -----
----- Tue Sep 26 14:24:02 2017::191581::Agent Launched with PID 242180 at time Tue Sep 26 14:24:02 2017 -----
----- Tue Sep 26 14:24:02 2017::242180::Execing EMAgent process is taking longer than expected 120 secs -----
----- Tue Sep 26 14:24:02 2017::242180::Time elapsed between Launch of Watchdog process and execing EMAgent is 128 secs -----
----- Tue Sep 26 14:24:02 2017::306524::Auto tuning the agent at time Tue Sep 26 14:24:02 2017 -----
Invalid maximum heap size: -Xmx512M:MaxPermSize=96M
Could not create the Java virtual machine.
----- Tue Sep 26 14:24:02 2017::297818::Auto tuning the agent at time Tue Sep 26 14:24:02 2017 -----
----- Tue Sep 26 14:24:02 2017::219540::Checking status of EMAgent : 240506 -----
----- Tue Sep 26 14:24:02 2017::219540::EMAgent exited at Tue Sep 26 14:24:02 2017 with return value 1. -----
----- Tue Sep 26 14:24:02 2017::219540::Restarting EMAgent. -----
----- Tue Sep 26 14:24:02 2017::367843::Auto tuning the agent at time Tue Sep 26 14:24:02 2017 -----
----- Tue Sep 26 14:24:03 2017::219540::Auto tuning the agent at time Tue Sep 26 14:24:03 2017 -----
----- Tue Sep 26 14:24:03 2017::160046::Checking status of EMAgent : 240766 -----
----- Tue Sep 26 14:24:03 2017::160046::EMAgent exited at Tue Sep 26 14:24:03 2017 with return value 1. -----
----- Tue Sep 26 14:24:03 2017::160046::Restarting EMAgent. -----

The agent is being re-started multiple times resulting in many perl processes being created in a loop.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms