gpssh-exkeys -f 执行报错:error 256 obtaining RSA host key(s) for local host

在CentOS 7.8环境下安装Greenplum集群时遇到gpssh-exkeys工具使用默认22端口失败的问题。通过修改gpssh-exkeys脚本,将所有涉及的ssh连接端口改为10022,包括ssh和scp命令的相关参数,成功解决了端口不匹配的错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题:安装greenplum集群,执行gpssh-exkeys -f 报错
环境:CentOS7.8 端口是10022 
问题分析,主要是gpssh-exkeys默认是22端口,将其中的一些命令改加上端口

问题截图:


处理办法:

打开gpssh-exkeys脚本,

修改一:

errfile = os.path.join(tempDir, 'sshcheck.err')
cmd = 'ssh -p 10022 -o "BatchMode=yes" -o "StrictHostKeyChecking=no" %s true 2>%s' % (hostname, errfile)

修改二:

    for remoteHost in GV.allHosts:
         cmd = ['ssh','-p','10022','[email protected]'+ remoteHost.host(), '-o', 'Bat

-- Logs begin at Thu 2023-07-13 00:44:15 CST, end at Thu 2023-07-13 00:53:06 CST. -- Jul 13 00:48:25 pod-64788377f624725f6ea4b9e8-64aed85ec2dbab11bceeb07f systemd[1]: Starting Docker Application Container Engine... Jul 13 00:48:25 pod-64788377f624725f6ea4b9e8-64aed85ec2dbab11bceeb07f dockerd[215]: time="2023-07-13T00:48:25.388440905+08:00" level=info msg="Starting up" Jul 13 00:48:25 pod-64788377f624725f6ea4b9e8-64aed85ec2dbab11bceeb07f dockerd[215]: time="2023-07-13T00:48:25.405370737+08:00" level=error msg="failed to mount overlay: invalid argument" storage-driver=overlay2 Jul 13 00:48:25 pod-64788377f624725f6ea4b9e8-64aed85ec2dbab11bceeb07f dockerd[215]: time="2023-07-13T00:48:25.408339784+08:00" level=info msg="Loading containers: start." Jul 13 00:48:25 pod-64788377f624725f6ea4b9e8-64aed85ec2dbab11bceeb07f dockerd[215]: time="2023-07-13T00:48:25.409506558+08:00" level=warning msg="Running modprobe bridge br_netfilter failed with message: , error: exit status 1" Jul 13 00:48:25 pod-64788377f624725f6ea4b9e8-64aed85ec2dbab11bceeb07f dockerd[215]: time="2023-07-13T00:48:25.411850508+08:00" level=info msg="unable to detect if iptables supports xlock: 'iptables --wait -L -n': `iptables v1.4.21: can't initialize iptables table `filter': Permission denied (you must be root)\nPerhaps iptables or your kernel needs to be upgraded.`" error="exit status 3" Jul 13 00:48:25 pod-64788377f624725f6ea4b9e8-64aed85ec2dbab11bceeb07f dockerd[215]: time="2023-07-13T00:48:25.425371913+08:00" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby Jul 13 00:48:25 pod-64788377f624725f6ea4b9e8-64aed85ec2dbab11bceeb07f dockerd[215]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.4.21: can't initialize iptables table `nat': Permission denied (you must be root)
07-13
根据提供的日志,Docker启动失败并显示以下错误消息: ``` failed to mount overlay: invalid argument Running modprobe bridge br_netfilter failed with message: , error: exit status 1 unable to detect if iptables supports xlock: 'iptables --wait -L -n': `iptables v1.4.21: can't initialize iptables table `filter': Permission denied (you must be root)\nPerhaps iptables or your kernel needs to be upgraded.` failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.4.21: can't initialize iptables table `nat': Permission denied (you must be root) ``` 根据这些错误消息,可能有以下几个问题导致Docker启动失败: 1. "failed to mount overlay: invalid argument":这可能是由于Docker在尝试挂载overlay文件系统时遇到了无效的参数导致的。你可以尝试更新内核或检查overlay模块是否正确加载。 2. "Running modprobe bridge br_netfilter failed":这表示Docker无法加载bridge和br_netfilter内核模块。你可能需要确保这些模块已正确加载,并且你具有足够的权限来加载它们。 3. "unable to detect if iptables supports xlock" 和 "failed to create NAT chain DOCKER":这表明Docker无法正确配置iptables规则。你需要以root用户运行Docker,或者将当前用户添加到docker组中以获取足够的权限。 请尝试以下解决方案: 1. 确保你以root用户身份运行Docker命令,或者将当前用户添加到docker组中: ``` sudo usermod -aG docker your_username ``` 然后注销并重新登录以使更改生效。 2. 检查并确保overlay和相关内核模块已正确加载。你可以运行以下命令来加载这些模块: ``` sudo modprobe overlay sudo modprobe br_netfilter ``` 3. 检查你的iptables配置和权限。确保你具有足够的权限来运行iptables命令,并且iptables配置正确。 如果问题仍然存在,请提供更多详细信息,以便我能够更好地帮助你解决问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值