OEM 13C添加非默認SSH端口22

說明

默認情況下,OEM手動添加目標時,默認使用的22 SSH端口,如果不是22端口則需要修改配置文件纔可以。否則會報錯,如下:

2020-01-06_14-28-26:INFO: Jsch Validation Failed Problem :SSH ??????? Recommendation: ?? /home/oracle/middleware/oui/prov/resourcesPaths.properties ??? SSH_PORT ???????????????? sshd ??????
2020-01-06_14-28-26:INFO:Breaking since the jsch validation  has failed
2020-01-06_14-28-26:INFO:InvocationTargetException Exception
2020-01-06_14-28-26:INFO:Printing Exception :java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at oracle.sysman.core.agentpush.ui.deployer.BaseDeployerOps.executeActions(BaseDeployerOps.java:2869)
	at oracle.sysman.core.agentpush.ui.deployer.InitializationDeployer.deploy(InitializationDeployer.java:564)
	at oracle.sysman.core.agentpush.ui.deployfwk.DeploymentWorker.run(DeploymentWorker.java:26)
	at oracle.sysman.util.threadPoolManager.WorkerThread.run(Worker.java:311)
Caused by: oracle.sysman.core.agentpush.ui.exception.JschValidationException
	at oracle.sysman.core.agentpush.ui.deployer.JschValidationOps.doNodesAlive(JschValidationOps.java:250)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at oracle.sysman.core.agentpush.ui.deployer.InitializationDeployer.doSSHValidations(InitializationDeployer.java:137)
	... 8 more

2020-01-06_14-28-26:INFO: Jsch Valdation Failed Problem :SSH ??????? Recommendation: ?? /home/oracle/middleware/oui/prov/resourcesPaths.properties ??? SSH_PORT ???????????????? sshd ??????
2020-01-06_14-28-26:INFO:Updating Action SSHValidationswith Status FAILED and error Message :SSH ???? (sshd) ???? "22" ??? and problem SSH ??????? and recommendation ?? /home/oracle/middleware/oui/prov/resourcesPaths.properties ??? SSH_PORT ???????????????? sshd ??????

注意:在13.3版本OEM中,日誌或者web界面提示的配置文件/home/oracle/middleware/oui/prov/resourcesPaths.properties路徑是錯誤的,實際上是/home/oracle/middleware/oui/prov/resources/Paths.properties

應該也屬於一個bug

修改配置文件中的SSH_PORT

[root@oem applogs]# cat /home/oracle/middleware/oui/prov/resources/Paths.properties
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 

SSH_ARGS=-q -o FallBackToRsh=no  -o PasswordAuthentication=no  -o StrictHostKeyChecking=yes
SCP_ARGS=-p -o FallBackToRsh=no  -o PasswordAuthentication=no  -o StrictHostKeyChecking=yes  
#please provide ssh port in SSH_PORT, don't add it in SSH_ARGS since the port number is required in ssh connectivity and other places where SSH_ARGS is not used. Default port is 22. 
SSH_PORT=6731    --改爲對應主機的SSH端口
SSH_PORT_ARGS=-p
SCP_PORT_ARGS=-P

SSH2_ARGS=-q -B 
SSH2_PORT_ARGS=-p
SCP2_PORT_ARGS=-P

UNZIP_ARGS=-o
ZIP_ARGS=-r
ZIP_EXCLUDE_ARGS=-x
ZIP_INCLUDE_ARGS=-i

#KEY16=$CMDPATH $NODE $CMDARGS
KEY16={6}#{2}#{7}

## Put command specific formats here ##
PING_KEY={6}#{2}#{7}

注意:如果主機使用的非默認22SSH端口,那麼只能一個一個添加,不能同時添加,因爲需要修改SSH_PORT參數值。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章