Ноя 142013
Обнаружил, что по какой-то причине агент Enterprise Manager Cloud Control 12c
на одном из серверов БД не запускается. При попытке запуска командой
emctl start agent
в логе видим такие строки (выделил красным интересное):
--- EMState agent ----- Wed Nov 13 13:27:29 2013::32047346::Mismatch detected between timezone in env (UTC) and in /ora/app/agent12c/agent_inst/sysman/config/emd.properties (GMT). Forcing value to latter.. ----- ----- Wed Nov 13 09:27:30 2013::32047346::Auto tuning the agent at time Wed Nov 13 09:27:30 2013 ----- agentJavaDefines=-Xmx160M SchedulerRandomSpreadMins=0 MaxThreads=10 _SchedulePersistTimer=30 UploadMaxNumberXML=5000 UploadMaxBytesXML=50.0 Auto tuning was successful ----- Wed Nov 13 09:27:40 2013::32047346::Finished auto tuning the agent at time Wed Nov 13 09:27:40 2013 ----- ----- Wed Nov 13 09:27:40 2013::32047346::Launching the JVM with following options: -Xmx160M -server -Djava.security.egd=file:///dev/./urandom -Dsun.lang.ClassLoader.allowArraySyntax=true -Xgcpolicy:gencon ----- ----- Wed Nov 13 09:27:40 2013::32047346::Agent Launched with PID 39649418 at time Wed Nov 13 09:27:40 2013 ----- ----- Wed Nov 13 09:27:40 2013::39649418::Time elapsed between Launch of Watchdog process and execing EMAgent is 13 secs ----- 2013-11-13 09:27:41,134 [1:main] WARN - Missing filename for log handler 'wsm' 2013-11-13 09:27:41,158 [1:main] WARN - Missing filename for log handler 'opss' 2013-11-13 09:27:41,161 [1:main] WARN - Missing filename for log handler 'opsscfg' OMS decided to shutdown the agent because of the following reason sent from OMS: AGENT_TZ_MISMATCH ----- Wed Nov 13 09:28:16 2013::32047346::Checking status of EMAgent : 39649418 ----- ----- Wed Nov 13 09:28:24 2013::32047346::Checking status of EMAgent : 39649418 ----- ----- Wed Nov 13 09:28:24 2013::32047346::EMAgent exited at Wed Nov 13 09:28:24 2013 with return value 0. ----- ----- Wed Nov 13 09:28:24 2013::32047346::EMAgent was shutdown normally. ----- ----- Wed Nov 13 09:28:24 2013::32047346::Exiting watchdog loop -----
Решение нашлось - сброс таймзоны агента. Делается так:
emctl resetTZ agent
Команда отрабатывает за минуту и даёт следующий вывод:
$ emctl resetTZ agent Oracle Enterprise Manager Cloud Control 12c Release 2 Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved. Updating /ora/app/agent12c/agent_inst/sysman/config/emd.properties... Successfully updated /ora/app/agent12c/agent_inst/sysman/config/emd.properties. Login as the em repository user and run the script: exec mgmt_target.set_agent_tzrgn('db_test.kontora.ru:3872','Europe/Moscow') and commit the changes This can be done for example by logging into sqlplus and doing SQL> exec mgmt_target.set_agent_tzrgn('db_test.kontora.ru:3872','Europe/Moscow') SQL> commit
Таким образом, нам рекомендуется зайти в базу репозитория Enterprise Manager Cloud Control 12c
под пользователем em
и запустить процедуру смены таймзоны в репозитории:
EXEC mgmt_target.set_agent_tzrgn('db_test.kontora.ru:3872','Europe/Moscow'); COMMIT;
У меня таймзона точно не менялась, агент просто перестал работать без видимых причин, и поэтому никаких действий в репозитории проводить не понадобилось.
Запускаем агента и через несколько минут Cloud Control его увидит.
emctl start agent