{"id":2142,"date":"2016-05-16T13:44:40","date_gmt":"2016-05-16T16:44:40","guid":{"rendered":"http:\/\/www.dbarj.com.br\/en\/?p=2142"},"modified":"2016-05-16T14:12:42","modified_gmt":"2016-05-16T17:12:42","slug":"em-agent-start-fails-outofmemoryerror","status":"publish","type":"post","link":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/","title":{"rendered":"EM agent start fails With &#8216;Target Interaction Manager failed at Startup&#8217; and &#8216;java.lang.OutOfMemoryError: Java heap space&#8217; reported on logs"},"content":{"rendered":"<p>In this article, I will show\u00a0how to solve EM Agent failing to startup\u00a0related to java memory problems.<\/p>\n<p>Those days,\u00a0after applying some EM Agent patches and trying to restart them,\u00a0I received the error below:<\/p>\n<pre class=\"lang:ps decode:true \">[emc12@localhost ~]$ emctl start agent\r\nOracle Enterprise Manager Cloud Control 12c Release 5\r\nCopyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.\r\nStarting agent ........................................................................... failed.\r\nFatal agent error: Target Interaction Manager failed at Startup\r\nFatal agent error: Target Interaction Manager failed at Startup\r\nFatal agent error: Target Interaction Manager failed at Startup\r\nEMAgent is Thrashing. Exiting watchdog\r\nConsult emctl.log and emagent.nohup in: \/u01\/app\/emc12\/agent_inst\/sysman\/log\r\n[emc12@localhost ~]$<\/pre>\n<p>When checking the <strong>emagent.nohup<\/strong> file, there was an error related to java memory:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Agent is going down due to an OutOfMemoryError\r\n----- Fri May 13 10:46:21 2016::18719::Checking status of EMAgent : 19177 -----\r\n----- Fri May 13 10:46:21 2016::18719::EMAgent exited at Fri May 13 10:46:21 2016 with return value 57. -----\r\n----- Fri May 13 10:46:21 2016::18719::EMAgent will be restarted because of an Out of Memory Exception. -----\r\n----- Fri May 13 10:46:21 2016::18719::EMAgent is Thrashing. Exiting loop. -----\r\n----- Fri May 13 10:46:21 2016::18719::Commiting Process death. -----\r\n----- Fri May 13 10:46:21 2016::18719::writeAbnormalExitTimestampToAgntStmp: exitCause=OOM : restartRequired=0 -----\r\n----- Fri May 13 10:46:21 2016::18719::Exited due to Thrash. -----<\/pre>\n<p>As the error shows, it was an &#8220;<strong>Out of Memory Exception<\/strong>&#8220;. To solve it, I had to increase the java heap space allocated to emagent.<\/p>\n<p>Edit &#8216;<strong>$AGENT_BASE\/agent_inst\/sysman\/config\/emd.properties&#8217;<\/strong> and increase the memory allocated to <strong>512M<\/strong> (a good and enough value).<\/p>\n<p>Before:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[emc12@localhost config]$ cat emd.properties | grep agentJavaDefines\r\nagentJavaDefines=-Xmx128M -XX:MaxPermSize=96M<\/pre>\n<p>After edited:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[emc12@localhost config]$ cat emd.properties | grep agentJavaDefines\r\nagentJavaDefines=-Xmx512M -XX:MaxPermSize=96M<\/pre>\n<p>Finally,\u00a0try to restart agent running &#8220;<strong>emctl start agent<\/strong>&#8220;:<\/p>\n<pre class=\"lang:ps decode:true\">[emc12@localhost ~]$ emctl start agent\r\nOracle Enterprise Manager Cloud Control 12c Release 5\r\nCopyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.\r\nStarting agent ..................... started.<\/pre>\n<p>Great, agent is back to life. However, if you still face any issues, you will need to clear the agent state and retry.<\/p>\n<p>Do the following:<\/p>\n<ol>\n<li>Stop and kill any remaining process related to EM Agent that is still running (perl or java).<\/li>\n<li>Clean all\u00a0files from &#8216;<strong>$AGENT_BASE\/agent_inst\/sysman\/emd\/state\/*<\/strong>&#8216; folder (or move them to a temporary place).<\/li>\n<li>Clear agent state by running:\u00a0<strong>emctl clearstate agent<\/strong>.<\/li>\n<li>Increase the\u00a0memory allocated editing <strong>emd.properties<\/strong>, as showed before, if not already done.<\/li>\n<li>Try to start the agent again.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>More information can be found at\u00a0the MOS Doc ID\u00a0below:<\/p>\n<ul>\n<li><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?id=1902124.1\" target=\"_blank\">Doc 1902124.1 (Duplicate 1952593.1 &#8211; EM12c: emctl start agent Fails With &#8216; Target Interaction Manager failed at Startup java.lang.OutOfMemoryError: Java heap space&#8217; reported in gcagent_errors.log)<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<b>Have you enjoyed? Please leave a comment or give a \ud83d\udc4d!<\/b>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style2 like-2142 jlk' href='javascript:void(0)' data-task='like' data-post_id='2142' data-nonce='de4404f630' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.dbarj.com.br\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-2142 lc'>+30<\/span><\/a><\/div><\/div> <div class='status-2142 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>In this article, I will show\u00a0how to solve EM Agent failing to startup\u00a0related to java memory problems. Those days,\u00a0after applying some EM Agent patches and trying to restart them,\u00a0I received the error below: [emc12@localhost ~]$ emctl start agent Oracle Enterprise Manager Cloud Control 12c Release 5 Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved. &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-2142","post","type-post","status-publish","format-standard","hentry","category-oem12c-en","item-wrap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>EM agent start fails With &#039;Target Interaction Manager failed at Startup&#039; and &#039;java.lang.OutOfMemoryError: Java heap space&#039; reported on logs - DBA - Rodrigo Jorge - Oracle Tips and Guides<\/title>\n<meta name=\"description\" content=\"In this article, I will show how to solve EM Agent failing to startup related to java memory problems.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DBA RJ\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/\"},\"author\":{\"name\":\"DBA RJ\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"headline\":\"EM agent start fails With &#8216;Target Interaction Manager failed at Startup&#8217; and &#8216;java.lang.OutOfMemoryError: Java heap space&#8217; reported on logs\",\"datePublished\":\"2016-05-16T16:44:40+00:00\",\"dateModified\":\"2016-05-16T17:12:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/\"},\"wordCount\":264,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"articleSection\":[\"Enterprise Manager 12c\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/\",\"name\":\"EM agent start fails With 'Target Interaction Manager failed at Startup' and 'java.lang.OutOfMemoryError: Java heap space' reported on logs - DBA - Rodrigo Jorge - Oracle Tips and Guides\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#website\"},\"datePublished\":\"2016-05-16T16:44:40+00:00\",\"dateModified\":\"2016-05-16T17:12:42+00:00\",\"description\":\"In this article, I will show how to solve EM Agent failing to startup related to java memory problems.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/2016\\\/05\\\/em-agent-start-fails-outofmemoryerror\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"EM agent start fails With 'Target Interaction Manager failed at Startup' and 'java.lang.OutOfMemoryError: Java heap space' reported on logs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/\",\"name\":\"DBA - Rodrigo Jorge - Oracle Tips and Guides\",\"description\":\"Blog about Databases, Security and High Availability\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/en\\\/#\\\/schema\\\/person\\\/28a44ca3a6633fe4156ad1ea209d40a9\",\"name\":\"DBA RJ\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"url\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"contentUrl\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\",\"width\":712,\"height\":712,\"caption\":\"DBA RJ\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.dbarj.com.br\\\/wp-content\\\/uploads\\\/2019\\\/09\\\/RodrigoJorgePOUG19.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"EM agent start fails With 'Target Interaction Manager failed at Startup' and 'java.lang.OutOfMemoryError: Java heap space' reported on logs - DBA - Rodrigo Jorge - Oracle Tips and Guides","description":"In this article, I will show how to solve EM Agent failing to startup related to java memory problems.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/","twitter_misc":{"Written by":"DBA RJ","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/#article","isPartOf":{"@id":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/"},"author":{"name":"DBA RJ","@id":"https:\/\/www.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"headline":"EM agent start fails With &#8216;Target Interaction Manager failed at Startup&#8217; and &#8216;java.lang.OutOfMemoryError: Java heap space&#8217; reported on logs","datePublished":"2016-05-16T16:44:40+00:00","dateModified":"2016-05-16T17:12:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/"},"wordCount":264,"commentCount":2,"publisher":{"@id":"https:\/\/www.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"articleSection":["Enterprise Manager 12c"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/","url":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/","name":"EM agent start fails With 'Target Interaction Manager failed at Startup' and 'java.lang.OutOfMemoryError: Java heap space' reported on logs - DBA - Rodrigo Jorge - Oracle Tips and Guides","isPartOf":{"@id":"https:\/\/www.dbarj.com.br\/en\/#website"},"datePublished":"2016-05-16T16:44:40+00:00","dateModified":"2016-05-16T17:12:42+00:00","description":"In this article, I will show how to solve EM Agent failing to startup related to java memory problems.","breadcrumb":{"@id":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbarj.com.br\/en\/2016\/05\/em-agent-start-fails-outofmemoryerror\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbarj.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"EM agent start fails With 'Target Interaction Manager failed at Startup' and 'java.lang.OutOfMemoryError: Java heap space' reported on logs"}]},{"@type":"WebSite","@id":"https:\/\/www.dbarj.com.br\/en\/#website","url":"https:\/\/www.dbarj.com.br\/en\/","name":"DBA - Rodrigo Jorge - Oracle Tips and Guides","description":"Blog about Databases, Security and High Availability","publisher":{"@id":"https:\/\/www.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbarj.com.br\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.dbarj.com.br\/en\/#\/schema\/person\/28a44ca3a6633fe4156ad1ea209d40a9","name":"DBA RJ","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","url":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","contentUrl":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png","width":712,"height":712,"caption":"DBA RJ"},"logo":{"@id":"https:\/\/www.dbarj.com.br\/wp-content\/uploads\/2019\/09\/RodrigoJorgePOUG19.png"}}]}},"_links":{"self":[{"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts\/2142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/comments?post=2142"}],"version-history":[{"count":0,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/posts\/2142\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/media?parent=2142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/categories?post=2142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbarj.com.br\/en\/wp-json\/wp\/v2\/tags?post=2142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}