重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1773|回复: 2
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
楼主
发表于 2021-12-8 21:25:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
EM 13c: Enterprise Manager Cloud Control Agent Install Fails at Initialization Step With Error: SSH daemon (sshd) is not running on port 22 (Doc ID 1488159.1)

In this Document
Symptoms
Cause
Solution

APPLIES TO:
Enterprise Manager Base Platform - Version 13.1.0.0.0 and later
Information in this document applies to any platform.
SYMPTOMS
Enterprise Manager (EM) Cloud Control  Agent install fails at initialization step with error message "SSH daemon (sshd) is not running on port 22".

+ oms/sysman/prov/agentpush/<TIMESTAMP>/applogs/<hostname>_deploy.log

2012-06-13_13-46-32:INFO: Jsch Valdation Failed Problem :SSH server check failed Recommendation: Verify the value of SSH_PORT in the /oms/oui/prov/resources/Paths.properties file. Ensure that it is the same as the port on which the sshd is running on the remote host.
2012-06-13_13-46-32:INFO:Updating Action SSHValidationswith Status FAILED and error Message :SSH daemon (sshd) is not running on port "22" and problem SSH server check failed and recommendation Verify the value of SSH_PORT in the /var/app/oracle/em/oms/oui/prov/resources/Paths.properties file. Ensure that it is the same as the port on which the sshd is running on the remote host.


CAUSE
This error can occur due to one of the following reasons:

SSH port 22 is blocked by proxy / firewall on the Target machine
SSH is not running on the Target machine
SSH daemon is running on non-default port (other than 22)
Note: This error is also commonly encountered on Windows target host when Cygwin is not installed.
SOLUTION
1. Verify that the SSH port 22 is not blocked from the OMS host using the following command (a blocked port will be indicated, a free port will result in no response):

telnet <target host> 22


2. Verify that SSH is running on the target host using

ps -ef | grep ssh
netstat -anp | grep 22
The Prerequisites for 12c Agent installation using Push Method clearly states that the SSH daemon should be running on the default port (that is, 22) on all the destination hosts.

Enterprise Manager Cloud Control Basic Installation Guide
Release 13.5
Chapter 6 Installing Oracle Management Agents 13c Release 5
6.2 Installing Management Agents Using Agent Gold Images
6.2.2 Installing a Standalone Oracle Management Agent 13c Release 1 Using Add Host Targets Wizard or EM CLI
6.2.2.3 Meeting the Generic Prerequisites for Installing Standalone Management Agents Using Add Host Targets Wizard or EM CLI
Table 6-1 General Prerequisites for Installing Standalone Oracle Management Agent



3. If SSH on the target host is running on a non-default port, then update the SSH_PORT property in $<OMS_HOME>/oui/prov/resources/Paths.properties as below:

SSH_PORT=<port number>
If you are installing on target A where SSH is running on port 99; then you would need to make the above change. If the next Agent Deployment is on target B where SSH is running on default port 22; then you will need to revert the changes to set SSH_PORT= or SSH_PORT=22 in $<OMS_HOME>/oui/prov/resources/Paths.properties file.
You cannot install Agents on target X and target Y at the same time, if they have SSH running on different ports.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

推荐
 楼主| 发表于 2021-12-8 21:37:35 | 只看该作者
正好一用户现场交换机上对 22端口做了限制,修改为其他端口,部署好后,再修改回22 端口即可。
回复 支持 1 反对 0

使用道具 举报

沙发
 楼主| 发表于 2021-12-8 21:35:45 | 只看该作者
说明
默认情况下,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参数值。


回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-28 18:14 , Processed in 0.096106 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表