OMC cloud agent 安裝之后經常停止
使用客戶的測試賬號做一個OMC cloud agent的測試,agent 也安裝好了,日志也自動收集上來了。
第二天發現agent 停止服務了,于是就給啟動了一下,狀態也正常,下午發現又停了。
看來是有問題了:
在路徑 /home/oracle/omcagent/cloudagent/agent_inst/sysman/log/ 下面查看log文件
[oracle@orcl1 log]$ tail -n 50 gcagent.log
at oracle.sysman.gcagent.target.rowsource.Rowsource._fetch(Rowsource.java:210)
at oracle.sysman.gcagent.target.rowsource.ProjectionRowSource._fetch_internal(ProjectionRowSource.java:253)
at oracle.sysman.gcagent.target.rowsource.Rowsource._fetch(Rowsource.java:210)
at oracle.sysman.gcagent.target.rowsource.FilterRowSource._fetch_internal(FilterRowSource.java:97)
at oracle.sysman.gcagent.target.rowsource.Rowsource._fetch(Rowsource.java:210)
at oracle.sysman.gcagent.target.rowsource.ColumnRemap._fetch_internal(ColumnRemap.java:67)
at oracle.sysman.gcagent.target.rowsource.Rowsource._fetch(Rowsource.java:210)
at oracle.sysman.gcagent.target.rowsource.Rowsource.fetch(Rowsource.java:222)
at oracle.sysman.gcagent.target.interaction.execution.ExecuteTask.executeRSTree(ExecuteTask.java:2916)
at oracle.sysman.gcagent.target.interaction.execution.ExecuteTask.executeExecutionDescriptor(ExecuteTask.java:2047)
at oracle.sysman.gcagent.target.interaction.execution.ExecuteTask.runTask(ExecuteTask.java:3225)
at oracle.sysman.gcagent.target.interaction.execution.ExecuteTask.call(ExecuteTask.java:4541)
at oracle.sysman.gcagent.metadata.impl.collection.MetricColl$1.call(MetricColl.java:551)
at oracle.sysman.gcagent.metadata.impl.collection.MetricColl$1.call(MetricColl.java:512)
at oracle.sysman.gcagent.task.TaskFutureImpl$WrappedTask.accountedCall(TaskFutureImpl.java:612)
at oracle.sysman.gcagent.task.TaskFutureImpl$WrappedTask.call(TaskFutureImpl.java:656)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
2017-12-20 09:46:08,491 [1:main (@ 2017-12-20 09:38:32 CST)] ERROR - agent main threw an error
java.lang.OutOfMemoryError: Java heap space
at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
at java.nio.ByteBuffer.allocate(ByteBuffer.java:331)
at sun.nio.cs.StreamEncoder.<init>(StreamEncoder.java:195)
at sun.nio.cs.StreamEncoder.<init>(StreamEncoder.java:175)
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:68)
at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:133)
at oracle.sysman.gcagent.common.FileUtils.createWriter(FileUtils.java:1388)
at oracle.sysman.gcagent.common.FileUtils.setContents(FileUtils.java:221)
at oracle.sysman.gcagent.common.FileUtils.setContents(FileUtils.java:137)
at oracle.sysman.gcagent.common.FileUtils.setContents(FileUtils.java:114)
at oracle.sysman.gcagent.common.FileUtils.overwriteContents(FileUtils.java:93)
at oracle.sysman.gcagent.tmmain.AgentStatus.writeStatusMessage(AgentStatus.java:132)
at oracle.sysman.gcagent.tmmain.TMMain.writeCurrentStatus(TMMain.java:844)
at oracle.sysman.gcagent.tmmain.TMMain.waitForSignal(TMMain.java:878)
at oracle.sysman.gcagent.tmmain.TMMain.agentMain(TMMain.java:792)
at oracle.sysman.gcagent.tmmain.TMMain.main(TMMain.java:739)
2017-12-20 09:46:32,125 [36:GC.SysExecutor.0 (Lama:orcl1.jxut.edu.cn:3872:Response) (Lama:orcl1.jxut.edu.cn:3872:Response:Response)] ERROR - Lama:orcl1.jxut.edu.cn:3872:Response:Response
java.lang.OutOfMemoryError: Java heap space
2017-12-20 09:46:32,125 [123:B8A53FBA:GC.SysExecutor.3 (Lama:orcl1.jxut.edu.cn:3872:HT_Memory)] INFO - Handling OOME (FloodControlCounter [count=1, duration=300000, maxInDuration=0, timestamp=1513734391345], 6291195)
2017-12-20 09:46:47,852 [123:B8A53FBA] INFO - agent status is being changed to EXITING
2017-12-20 09:46:48,532 [123:B8A53FBA] INFO - Agent exiting with exit code 57
2017-12-20 09:47:02,328 [114:6EA1EA8F:GC.Executor.5 (omc_oracle_db:jxut01_12c:15SecCollection) (omc_oracle_db:jxut01_12c:15SecCollection:RDB_MonSvcActiveSessionSample)] INFO - Cancelled task omc_oracle_db:jxut01_12c:15SecCollection:RDB_MonSvcActiveSessionSample due to [oracle.sysman.gcagent.task.TaskTimeoutException: task timeout: 30000 MILLISECONDS for omc_oracle_db:jxut01_12c:15SecCollection]
2017-12-20 09:47:06,706 [23:5BB01D54:Thread-7] INFO - *jetty*: Stopped regularConnector@36895c35{SSL-HTTP/1.1}{0.0.0.0:3872}
2017-12-20 09:47:07,486 [23:5BB01D54] INFO - *jetty*: Stopped o.e.j.s.h.ContextHandler@5c974df9{/,null,UNAVAILABLE}
2017-12-20 09:47:07,487 [23:5BB01D54] INFO - *jetty*: Stopped o.e.j.s.h.ContextHandler@3ea75851{/emd/persistence/main,null,UNAVAILABLE}
2017-12-20 09:47:11,258 [23:5BB01D54] INFO - *jetty*: Stopped o.e.j.s.ServletContextHandler@418db5fe{/emd/daemon,null,UNAVAILABLE}
2017-12-20 09:47:12,032 [23:5BB01D54] INFO - *jetty*: Stopped o.e.j.s.ServletContextHandler@333b8e45{/emd/gateway,null,UNAVAILABLE}
2017-12-20 09:47:12,032 [23:5BB01D54] INFO - *jetty*: Stopped o.e.j.s.ServletContextHandler@491b58d6{/emd/browser,null,UNAVAILABLE}
2017-12-20 09:47:12,033 [23:5BB01D54] INFO - *jetty*: Stopped o.e.j.s.ServletContextHandler@401a5c05{/emd/receiver,null,UNAVAILABLE}
2017-12-20 09:47:12,805 [23:5BB01D54] INFO - *jetty*: Stopped o.e.j.s.h.ContextHandler@2de48d50{/emd/main,null,UNAVAILABLE}
2017-12-20 09:47:12,805 [23:5BB01D54] INFO - *jetty*: Stopped o.e.j.s.h.ContextHandler@407a8d92{/emd/lifecycle/main,null,UNAVAILABLE}
初步看是java虛擬機的內存不夠,到metalink上看看,也查到了同樣的問題:
OMC: Oracle Management Cloud Agent Crashes after Upgrade to Version 1.21.0 (文檔 ID 2322444.1)
[oracle@orcl1 config]$ cp emd.properties emd.properties.bak
[oracle@orcl1 config]$ vi emd.properties
[oracle@orcl1 config]$ pwd
/home/oracle/omcagent/cloudagent/agent_inst/sysman/config
[oracle@orcl1 config]$ cat emd.properties| grep Xmx
agentJavaDefines=-Xmx1024M -XX:MaxPermSize=512M
修改之后重新啟動:
[oracle@orcl1 bin]$ ./omcli start agent
Oracle Management Cloud Agent
Copyright (c) 1996, 2017 Oracle Corporation. All rights reserved.
Starting agent ............. started.
[oracle@orcl1 bin]$ ./omcli status agent
Oracle Management Cloud Agent
Copyright (c) 1996, 2017 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Version : 1.24.0
State Home : /home/oracle/omcagent/cloudagent/agent_inst
Log Directory : /home/oracle/omcagent/cloudagent/agent_inst/sysman/log
Binaries Location : /home/oracle/omcagent/cloudagent/LAMA_LINUX.X64_171117.1500/core/1.24.0
Process ID : 88144
Parent Process ID : 87986
URL : https://orcl1.jxut.edu.cn:3872/emd/main/
Started at : 2017-12-20 21:14:31
Started by user : oracle
Operating System : Linux version 2.6.39-400.245.1.el5uek (amd64)
Data Collector enabled : false
Sender Status : FUNCTIONAL
Gateway Upload Status : FUNCTIONAL
Last successful upload : 2017-12-20 21:15:15
Last attempted upload : 2017-12-20 21:15:11
Pending Files (MB) : 0.02
Pending Files : 49
Backoff Expiration : (none)
---------------------------------------------------------------
Agent is Running and Ready
[oracle@orcl1 bin]$
目前看狀態正常,明天再看看,如果還在運行問題就解決了!!!