EM12c OMS端在部署新的agent的时候 agent端无法upload文件到oms端

[oracle@yhdem logs]$ netstat |grep 4900 (EM_UPLOAD_PORT=4900)
[oracle@yhdem logs]$

[oracle@yhdem logs]$ vi /u01/middleware_12c/oms/sysman/prov/agentpush/logs/EMAgentPushLogger2012-07-02_10-55-00-AM.log.0

2012-07-16_09-45-10:INFO:Current OMS Host yhdem.yihaodian.com
2012-07-16_09-45-10:INFO:refreshPage called
2012-07-16_09-45-10:INFO:====================PRINTING REFRESH FREQUENCY15000
2012-07-16_09-45-10:INFO:====================PRINTING REFRESH FREQUENCY15000
2012-07-16_09-45-11:INFO:isSSH2 result:false output : SSH-2.0-OpenSSH_4.3

2012-07-16_09-45-11:INFO:Using JSCH PLUGIN
2012-07-16_09-45-21:INFO:Pattern ERROR: found in file /u01/middleware_12c/oms/sysman/prov/agentpush/2012-07-16_09-32-56-AM/logs/10.0.2.15_install.log Line ERROR: 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.
2012-07-16_09-45-24:INFO:Retrieved path /tmp for property SCRATCHPATH

重新启动oms之后hang死 日志如下:

[oracle@yhdem ~]$ tail -f /u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/logs/EMGC_ADMINSERVER.out


Java(TM) SE Runtime Environment (build 1.6.0_24-b50)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
Starting WLS with line:
/u01/middleware_12c/jdk16/jdk/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=512m -Dweblogic.Name=EMGC_ADMINSERVER -Djava.security.policy=/u01/middleware_12c/wlserver_10.3/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Dweblogic.system.BootIdentityFile=/u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/security/boot.properties -Dweblogic.nodemanager.ServiceEnabled=true
-Djava.security.egd=file:///dev/./urandom -Dweblogic.debug.DebugSecurityAtn=true -Dweblogic.debug.DebugWebAppSecurity=true -Dweblogic.SSL.LoginTimeoutMillis=300000 -Djps.auth.debug=true -Djps.authz=ACC -Djps.combiner.optimize.lazyeval=true -Djps.combiner.optimize=true -Djps.policystore.hybrid.mode=false -Djps.subject.cache.key=5 -Djps.subject.cache.ttl=600000 -Xbootclasspath/p:/u01/middleware_12c/oms/sysman/jlib/diagpatch_bug11725986.jar
-Djdkpatchlog=/u01/middleware_12c/oms/sysman/log/diagpatch_bug11725986.log -Doracle.apm.home=/u01/middleware_12c/oms/apm/ -DAPM_HELP_FILENAME=oesohwconfig.xml -da -Dplatform.home=/u01/middleware_12c/wlserver_10.3 -Dwls.home=/u01/middleware_12c/wlserver_10.3/server -Dweblogic.home=/u01/middleware_12c/wlserver_10.3/server -Dcommon.components.home=/u01/middleware_12c/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
-Ddomain.home=/u01/middleware_12c/gc_inst/user_projects/domains/GCDomain -Djrockit.optfile=/u01/middleware_12c/oracle_common/modules/oracle.jrf_11.1.1/jrocket_optfile.txt -Doracle.server.config.dir=/u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/config/fmwconfig/servers/EMGC_ADMINSERVER -Doracle.domain.config.dir=/u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/config/fmwconfig -Digf.arisidbeans.carmlloc=/u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/config/fmwconfig/carml
-Digf.arisidstack.home=/u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/u01/middleware_12c/oracle_common/modules/oracle.ossoiap_11.1.1,/u01/middleware_12c/oracle_common/modules/oracle.oamprovider_11.1.1
-Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Doracle.apm.home=/u01/middleware_12c/oms/apm/ -DAPM_HELP_FILENAME=oesohwconfig.xml -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/u01/middleware_12c/patch_wls1035/profiles/default/sysext_manifest_classpath weblogic.Server

64-Bit Server VM Version 19.1-b02 from Sun Microsystems Inc.>

<.Jul 16, 2012 9:54:30 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:54:40 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:54:50 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:55:00 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:55:10 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:55:20 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:55:30 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:55:40 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:55:50 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:56:00 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:56:10 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:56:20 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:56:30 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 
<.Jul 16, 2012 9:56:40 AM CST> <Info> <Management> <BEA-141281> <unable to get file lock, will retry ...> 

通过mv .lok 文件解决这个问题:

[oracle@yhdem middleware_12c]$ find . -name *.lok
./gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/tmp/EMGC_OMS1.lok
./gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/ldap/ldapfiles/EmbeddedLDAP.lok
./gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/tmp/EMGC_ADMINSERVER.lok
./gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data/ldap/ldapfiles/EmbeddedLDAP.lok
./gc_inst/user_projects/domains/GCDomain/edit.lok
./gc_inst/user_projects/domains/GCDomain/config/config.lok
[oracle@yhdem middleware_12c]$ cd gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/tmp/
[oracle@yhdem tmp]$ ls
EMGC_OMS1.lok WebServiceUtils.ser _WL_internal _WL_user
[oracle@yhdem tmp]$ cp EMGC_OMS1.lok /tmp/
[oracle@yhdem tmp]$ rm EMGC_OMS1.lok
[oracle@yhdem ~]$ cd /u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/ldap/ldapfiles/
[oracle@yhdem ldapfiles]$ ls
EmbeddedLDAP.data EmbeddedLDAP.delete EmbeddedLDAP.index EmbeddedLDAP.lok EmbeddedLDAP.tran EmbeddedLDAP.trpos EmbeddedLDAP.twpos
[oracle@yhdem ldapfiles]$ cp *.lok /tmp/
[oracle@yhdem ldapfiles]$ rm *.lok
[oracle@yhdem ldapfiles]$ ls
EmbeddedLDAP.data EmbeddedLDAP.delete EmbeddedLDAP.index EmbeddedLDAP.tran EmbeddedLDAP.trpos EmbeddedLDAP.twpos
[oracle@yhdem ldapfiles]$ cd /u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/tmp/
[oracle@yhdem tmp]$ ls
EMGC_ADMINSERVER.lok _WL_internal _WL_TEMP_APP_DOWNLOADS _WL_user
[oracle@yhdem tmp]$ cp EMGC_ADMINSERVER.lok /tmp/
[oracle@yhdem tmp]$ rm EMGC_ADMINSERVER.lok
[oracle@yhdem tmp]$ cd /u01/middleware_12c/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data/ldap/ldapfiles/
[oracle@yhdem ldapfiles]$ cp EmbeddedLDAP.lok /tmp
[oracle@yhdem ldapfiles]$ rm EmbeddedLDAP.lok

重新启动oms

[oracle@yhdem bin]$ ./emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.1.0
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
Starting WebTier…
WebTier Successfully Started
Starting Oracle Management Server…
Oracle Management Server Successfully Started
Oracle Management Server is Up

[oracle@yhdem bin]$ ./emctl start agent
Oracle Enterprise Manager 12c Cloud Control 12.1.0.1.0
Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
Starting agent ……………… started.

[oracle@yhdem data]$ netstat |grep 4900
tcp 0 537 yhdem.yihaodian.com:19550 yhdem.yihaodian.com:4900 ESTABLISHED
tcp 0 0 yhdem.yihaodian.com:19549 yhdem.yihaodian.com:4900 ESTABLISHED
tcp 0 0 yhdem.yihaodian.com:4900 yhdem.yihaodian.com:19549 ESTABLISHED
tcp 0 0 yhdem.yihaodian.com:4900 yhdem.yihaodian.com:19550 ESTABLISHED

可以看到 已经成功的添加了主机: