Wednesday, April 22, 2020

EM agent start fails With 'java.lang.OutOfMemoryError'

I will show how to solve EM Agent failing to startup related to java memory problems.

Suddenly i found my agent is not starting with error Failed. So now its time to find issue and need to fix.

I have checked multiple logfiles but found this error in emagent.nohup, there was an error related to java memory:

It was an "Out of Memory Exception". To solve it, I had to increase the java heap space allocated to emagent.

(Reference Oracle Doc Id- 1399201.1)

Edit '$AGENT_BASE/agent_inst/sysman/config/' and increase the memory allocated to 512M.


cat | grep agentJavaDefines

agentJavaDefines=-Xmx128M -XX:MaxPermSize=96M


cat | grep agentJavaDefines
agentJavaDefines=-Xmx512M -XX:MaxPermSize=96M

Now Try to restart agent using "emctl start agent".

emctl start agent
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Starting agent ..................... started.

 if you still face any issues, you will need to clear the agent state and retry.
Do the following:
  1. Stop and kill any remaining process related to EM Agent that is still running (perl or java).
  2. Clean all files from '$AGENT_BASE/agent_inst/sysman/emd/state/*' folder (or move them to a temporary place).
  3. Clear agent state by running: emctl clearstate agent.
  4. Increase the memory allocated editing, as showed before, if not already done.
  5. Try to start the agent again.

No comments:

Post a Comment