OEM 管理页面 404解决
关机重启之后OEM出现 404 错误,进入服务器查看oms状态
emctl status oms The following exception occurred: java.net.UnknownHostException: orcl.mydb.cn: orcl.hnemic.cn at java.net.InetAddress.getAllByName0(InetAddress.java:1146) at java.net.InetAddress.getAllByName(InetAddress.java:1073) at java.net.InetAddress.getAllByName(InetAddress.java:1009) at java.net.InetAddress.getByName(InetAddress.java:959) at oracle.sysman.emd.targetIntg.agent.AgentTargetInstaller.getLocalHost(AgentTargetInstaller.java:4289) at oracle.sysman.emd.targetIntg.agent.AgentTargetInstaller.printLocalHost(AgentTargetInstaller.java:4252) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at oracle.sysman.emd.targetIntg.Util$DefaultIntegrationMethod.execute(Util.java:598) at oracle.sysman.emd.targetIntg.TargetInstaller.execute_(TargetInstaller.java:167) at oracle.sysman.emd.targetIntg.TargetInstaller.execute(TargetInstaller.java:155) at oracle.sysman.emSDK.conf.TargetInstaller.printLocalHost(TargetInstaller.java:2364) at oracle.sysman.emSDK.conf.TargetInstaller.main(TargetInstaller.java:3290) Although there was an exception it might be possible for the program to continue. EM Configuration issue. /oracle/app/oracle/11g/orcl.mydb.cn_orcl not found.
从报错来看,是找不到hostname 对应的 IP
修改完 hosts 和 ORACLE_HONAME
再来查看:
emctl status oms
EM Configuration issue. /oracle/app/oracle/11g/orcl.mydb.cn_orcl not found.
这个报错是因为用ORACLE_HOME 下的emctl 引起的,更改为AGENT_HOME 下的emctl
cd $AGENT_HOME
emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. WebTier is Up Oracle Management Server is not functioning because of the following reason: Failed to connect to repository database. OMS will be automatically restarted once it identifies that database and listener are up. Check EM Server log file for details: /oracle/app/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out
继续报错,连接不上数据库,查看监听是否启动:
$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-NOV-2014 13:32:54 Copyright (c) 1991, 2011, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oem.mydb.cn)(PORT=1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused [oracle@oem bin]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-NOV-2014 13:32:59 Copyright (c) 1991, 2011, Oracle. All rights reserved. Starting /oracle/app/oracle/11g/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.3.0 - Production System parameter file is /oracle/app/oracle/11g/network/admin/listener.ora Log messages written to /oracle/app/oracle/diag/tnslsnr/oem/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oem.hnemic.cn)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date 26-NOV-2014 13:33:01 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /oracle/app/oracle/11g/network/admin/listener.ora Listener Log File /oracle/app/oracle/diag/tnslsnr/oem/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oem.mydb.cn)(PORT=1521))) The listener supports no services The command completed successfully