Hadoop:ssh:无法解析主机名:名称或服务未知

Hadoop:ssh:无法解析主机名:名称或服务未知,hadoop,ssh,Hadoop,Ssh,有一些外部JAR路径要添加到hadoop类路径中。在运行start-dfs.sh之后,我发现了这些错误。如果我从Hadoop-env.sh文件中删除类路径,Hadoop将正常运行。我还在HADOOP-env.sh文件中设置了HADOOP\u OPTS=“$HADOOP\u OPTS-Djava.library.path=/usr/local/HADOOP/lib/native”和export HADOOP\u COMMON\u lib\u native\u DIR=“/usr/local/HAD

有一些外部JAR路径要添加到hadoop类路径中。在运行start-dfs.sh之后,我发现了这些错误。如果我从Hadoop-env.sh文件中删除类路径,Hadoop将正常运行。我还在HADOOP-env.sh文件中设置了
HADOOP\u OPTS=“$HADOOP\u OPTS-Djava.library.path=/usr/local/HADOOP/lib/native”
export HADOOP\u COMMON\u lib\u native\u DIR=“/usr/local/HADOOP/lib/native/”

[main]]: ssh: Could not resolve hostname [main]]: Name or service not known
using: ssh: Could not resolve hostname using: Name or service not known
14:48:34.392: ssh: Could not resolve hostname 14:48:34.392: Name or service not known
hadoop: ssh: Could not resolve hostname hadoop: Name or service not known
14:48:34.392: ssh: Could not resolve hostname 14:48:34.392: Name or service not known
UserGroupInformation: ssh: Could not resolve hostname usergroupinformation: Name or service not known
KerberosName: ssh: Could not resolve hostname kerberosname: Name or service not known
hadoop.security.token.service.use_ip: ssh: Could not resolve hostname hadoop.security.token.service.use_ip: Name or service not known
cacheTimeout=300000;: ssh: Could not resolve hostname cachetimeout=300000;: Name or service not known
Group: ssh: Could not resolve hostname group: Name or service not known
[main]]: ssh: Could not resolve hostname [main]]: Name or service not known
[[DEBUG]: ssh: Could not resolve hostname [[debug]: Name or service not known
login: ssh: Could not resolve hostname login: Name or service not known
with: ssh: Could not resolve hostname with: Name or service not known
Using: ssh: Could not resolve hostname using: Name or service not known
[main]]: ssh: Could not resolve hostname [main]]: Name or service not known
warningDeltaMs=5000: ssh: Could not resolve hostname warningdeltams=5000: Name or service not known
UserGroupInformation: ssh: Could not resolve hostname usergroupinformation: Name or service not known
user:UnixPrincipal:: ssh: Could not resolve hostname user:unixprincipal:: Name or service not known
[[DEBUG]: ssh: Could not resolve hostname [[debug]: Name or service not known
UserGroupInformation: ssh: Could not resolve hostname usergroupinformation: Name or service not known
[main]]: ssh: Could not resolve hostname [main]]: Name or service not known
[[DEBUG]: ssh: Could not resolve hostname [[debug]: Name or service not known
UserGroupInformation: ssh: Could not resolve hostname usergroupinformation: Name or service not known
name: ssh: Could not resolve hostname name: Name or service not known
"username": ssh: Could not resolve hostname "username": Name or service not known
entry:: ssh: Could not resolve hostname entry:: Name or service not known
from: ssh: Could not resolve hostname from: Name or service not known
PrivilegedAction: ssh: Could not resolve hostname privilegedaction: Name or service not known
subject.: ssh: Could not resolve hostname subject.: Name or service not known
[[DEBUG]: ssh: Could not resolve hostname [[debug]: Name or service not known
UserGroupInformation: ssh: Could not resolve hostname usergroupinformation: Name or service not known
14:48:34.393: ssh: Could not resolve hostname 14:48:34.393: Name or service not known
[[DEBUG]: ssh: Could not resolve hostname [[debug]: Name or service not known
user:: ssh: Could not resolve hostname user:: Name or service not known
externally: ssh: Could not resolve hostname externally: Name or service not known
UserGroupInformation: ssh: Could not resolve hostname usergroupinformation: Name or service not known
is: ssh: Could not resolve hostname is: Name or service not known
UGI: ssh: Could not resolve hostname ugi: Name or service not known
managed: ssh: Could not resolve hostname managed: Name or service not known
UserGroupInformation: ssh: Could not resolve hostname usergroupinformation: Name or service not known
[main]]: ssh: Could not resolve hostname [main]]: Name or service not known
loginUser:username: ssh: Could not resolve hostname loginuser:username: Name or service not known
[main]]: ssh: Could not resolve hostname [main]]: Name or service not known
[[DEBUG]: ssh: Could not resolve hostname [[debug]: Name or service not known
from:org.apache.hadoop.hdfs.tools.GetConf.run(GetConf.java:315): ssh: Could not resolve hostname from:org.apache.hadoop.hdfs.tools.getconf.run(getconf.java:315): Name or service not known
[[DEBUG]: ssh: Could not resolve hostname [[debug]: Name or service not known
login: ssh: Could not resolve hostname login: Name or service not known
[[DEBUG]: ssh: Could not resolve hostname [[debug]: Name or service not known
commit: ssh: Could not resolve hostname commit: Name or service not known
keytab: ssh: Could not resolve hostname keytab: Name or service not known
logged: ssh: Could not resolve hostname logged: Name or service not known
(auth:SIMPLE): ssh: Could not resolve hostname (auth:simple): Name or service not known
in: ssh: Could not resolve hostname in: Name or service not known
Assuming: ssh: Could not resolve hostname assuming: Name or service not known
User: ssh: Could not resolve hostname user: Name or service not known

有人能帮上忙吗?

我建议你从头开始解释到底是什么步骤让你走到了这一步。hadoop类路径中添加了外部JAR路径。添加so之后,当我运行start-dfs.sh时发现了错误。在添加任何JAR之前,集群是否启动了<代码>启动dfs在各种组件上调用
ssh
。例如,您确定没有删除该脚本中的某些引号吗?此外,JAR通常是根据需要的应用程序添加的,或者在Thread类路径上,而不是在Hadoop类路径上添加的。我还添加了纱线类路径。这是外部JAR的类路径:
export HADOOP\u classpath=$HADOOP\u classpath:/home/avinashetty/JARs/hibernate/:/home/avinashetty/JARs/*
如前所述,不应该为HADOOP添加JAR。如果任何MapReduce、Spark等应用程序都需要它们,那么这些应用程序都有单独的类路径设置。