Hadoop 在启动或者停止的时候需要输入yes确认问题

启动或者停止hadoop的时候,信息如下:

Stopping namenodes on [hadoop1 hadoop2]
The authenticity of host 'hadoop2 (172.17.0.10)' can't be established.
ECDSA key fingerprint is SHA256:2L+Ij0z9q1BkINoGu1JVxIoHKwyeJEZXZIVbll0t9fc.
ECDSA key fingerprint is MD5:9f:32:5f:a6:50:11:c6:42:53:5c:12:48:54:96:ba:0f.
Are you sure you want to continue connecting (yes/no)? hadoop1: stopping namenode
^Chadoop2: Host key verification failed.
The authenticity of host 'hadoop3 (172.17.0.11)' can't be established.
ECDSA key fingerprint is SHA256:b6wioHFMQ/54d1Oc8BLOBnPvT1L5Ss8zp2bbSkvPG7w.
ECDSA key fingerprint is MD5:d6:2a:51:53:e4:ea:5c:40:9b:8f:87:21:1f:d0:f9:f8.
Are you sure you want to continue connecting (yes/no)? The authenticity of host 'hadoop2 (172.17.0.10)' can't be established.
ECDSA key fingerprint is SHA256:2L+Ij0z9q1BkINoGu1JVxIoHKwyeJEZXZIVbll0t9fc.
ECDSA key fingerprint is MD5:9f:32:5f:a6:50:11:c6:42:53:5c:12:48:54:96:ba:0f.
Are you sure you want to continue connecting (yes/no)? hadoop1: no datanode to stop
^Chadoop2: Host key verification failed.
hadoop3: Host key verification failed.
Stopping journal nodes [hadoop1 hadoop2 hadoop3]
The authenticity of host 'hadoop2 (172.17.0.10)' can't be established.
ECDSA key fingerprint is SHA256:2L+Ij0z9q1BkINoGu1JVxIoHKwyeJEZXZIVbll0t9fc.
ECDSA key fingerprint is MD5:9f:32:5f:a6:50:11:c6:42:53:5c:12:48:54:96:ba:0f.
Are you sure you want to continue connecting (yes/no)? The authenticity of host 'hadoop3 (172.17.0.11)' can't be established.
ECDSA key fingerprint is SHA256:b6wioHFMQ/54d1Oc8BLOBnPvT1L5Ss8zp2bbSkvPG7w.
ECDSA key fingerprint is MD5:d6:2a:51:53:e4:ea:5c:40:9b:8f:87:21:1f:d0:f9:f8.
Are you sure you want to continue connecting (yes/no)? hadoop1: stopping journalnode

每次都需要输入yes,对于大集群来说,很尴尬

在hadoop-env.sh添加环境变量,如下:

export  HADOOP_SSH_OPTS= "-o StrictHostKeyChecking=no"

posted @ 2019-08-07 12:24  北漂-boy  阅读(798)  评论(0编辑  收藏  举报