我直接在OEMCC上手动添加目标:
起初在被监控的主机上部署agent时,碰到报错,如下:
报错信息文字:
在主机 192.168.1.61 上执行命令 cd /opt/app/scratch/agentHome/ADATMP_2018-01-23_13-38-45-PM;/opt/app/scratch/agentHome/ADATMP_2018-01-23_13-38-45-PM/agentDeploy.sh -ignorePrereqs ORACLE_HOSTNAME=192.168.1.61 AGENT_BASE_DIR=/opt/app/scratch/agentHome OMS_HOST=OMS EM_UPLOAD_PORT=4903 AGENT_INSTANCE_HOME=/opt/app/scratch/agentHome/agent_inst b_doDiscovery=false START_AGENT=false b_forceInstCheck=true -force AGENT_PORT=3872 失败
错误消息: The Oracle Management Server (OMS) host and port specified via OMS_HOST and EM_UPLOAD_PORT is not available. Pass in a valid hostname and port number for the OMS to successfully deploy the agent.
退出代码 :1
开始认为是主机间可能有防火墙没关闭,或者是端口配置不对,进一步根据MOS的一些文档说明:
EM 12C: Enterprise Manager 12c Cloud Control Agent Silent Installation Fails while Validating OMS Host and Port (文档 ID 1368010.1)
EM 12c Agent Install fails with ERROR: The Oracle Management Server (OMS) host and port specified via OMS_HOST and EM_UPLOAD_PORT is not available (文档 ID 1524756.1)
首先确认OMS的端口配置正确:
[oracle@OMS ~]$ /u01/app/oracle/product/oem13.2/middleware/bin/emctl status oms -details
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host : OMS
HTTP Console Port : 7788
HTTPS Console Port : 7802
HTTP Upload Port : 4889
HTTPS Upload Port : 4903 <<<===== ======== OMS Upload Port is same the port configured at the agent
EM Instance Home : /u01/app/oracle/product/oem13.2/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/product/oem13.2/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://OMS:7802/em
Upload URL: https://OMS:4903/empbs/upload
WLS Domain Information
Domain Name : GCDomain
Admin Server Host : OMS
Admin Server HTTPS Port: 7102
Admin Server is RUNNING
Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: OMS
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up
BI Publisher Server Information
BI Publisher Managed Server Name: BIP
BI Publisher Server is Down
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command
[oracle@OMS ~]$
查看日志发现是这一段之后报错:
/opt/app/scratch/agentHome/agent_13.2.0.0.0/jdk/jre/bin/java -classpath /opt/app/scratch/agentHome/agent_13.2.0.0.0/jlib/agentInstaller.jar:/opt/app/scratch/agentHome/agent_13.2.0.0.0/oui/modules/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /opt/app/scratch/agentHome/agent_13.2.0.0.0 /opt/app/scratch/agentHome/ADATMP_2018-01-23_13-38-45-PM /opt/app/scratch/agentHome $args -prereq
Validating the OMS_HOST & EM_UPLOAD_PORT has failed
根据文档1368010.1的思路排查:
1). OMS status
[oracle@OMS ~]$ $OMS_HOME/bin/emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up
BI Publisher Server is Down
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command
OMS is ok.
2). ping OMS
[oracle@jystdrac1 ADATMP_2018-01-23_13-38-45-PM]$ ping OMS
ping: unknown host OMS
[oracle@jystdrac1 ADATMP_2018-01-23_13-38-45-PM]$ ping 192.168.1.88
PING 192.168.1.88 (192.168.1.88) 56(84) bytes of data.
64 bytes from 192.168.1.88: icmp_seq=1 ttl=64 time=1.37 ms
64 bytes from 192.168.1.88: icmp_seq=2 ttl=64 time=0.615 ms
配置/etc/hosts,增加:
#OMS 192.168.1.88 OMS3).
wget :4903/empbs/genwallet
or
wget https://192.168.1.88:4903/empbs/genwallet
wget :4903/empbs/genwallet