解决:使用ssh-copy-id命令时出现ERROR: ssh: Could not resolve hostname hadoop01:Name or service not known
1、问题描述
搭建rocketmq集群时,使用ssh-copy-id命令拷贝密钥到其他机器,如hadoop01,hadoop02,出现如下错误信息
[root@hadoop03 .ssh]# ssh-copy-id hadoop02
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/usr/bin/ssh-copy-id: ERROR: ssh: Could not resolve hostname hadoop02: Name or service not known
[root@hadoop03 .ssh]# ssh-copy-id hadoop01
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed/usr/bin/ssh-copy-id: ERROR: ssh: Could not resolve hostname hadoop01: Name or service not known
如图:
2、切换root账户执行
su root命令
3、编辑/etc/hosts文件,执行如下命令
vi /etc/hosts
在文件末尾添加以下配置
wq!保存并退出
4、再次执行命令
ssh-copy-id hadoop02
输出信息如下
错误解决
Rocketmq的单机环境搭建
centos7.x搭建rocketmq-4.9.3单机环境_爱编码阿信的博客-CSDN博客
Rocketmq的集群环境搭建
rocketmq集群(一),基于centos7搭建rocketmq集群-2m-2s-async_爱编码阿信的博客-CSDN博客
更多推荐
所有评论(0)