请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Incorrect configuration: namenode address dfs.namenode

老师好,我用的是阿里云服务器,hosts已经配了hadoop000的映射,并且已配置了java_hom,在运行./start-dfs.sh时,报下面错误

[hadoop@hadoop000 sbin]$ ./start-dfs.sh
Incorrect configuration: namenode address dfs.namenode.servicerpc-address or dfs.namenode.rpc-address is not configured.
Starting namenodes on [2020-08-16 19:10:33,261 WARN  [main] util.NativeCodeLoader (NativeCodeLoader.java:<clinit>(62)) - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable]
Unable: ssh: Could not resolve hostname unable: Name or service not known
your: ssh: Could not resolve hostname your: Name or service not known
platform...: ssh: Could not resolve hostname platform...: Name or service not known
WARN: ssh: Could not resolve hostname warn: Name or service not known
2020-08-16: ssh: Could not resolve hostname 2020-08-16: Name or service not known
to: ssh: Could not resolve hostname to: Name or service not known
load: ssh: Could not resolve hostname load: Name or service not known
where: ssh: Could not resolve hostname where: 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
applicable: ssh: Could not resolve hostname applicable: Name or service not known
19:10:33,261: ssh: Could not resolve hostname 19:10:33,261: Name or service not known
native-hadoop: ssh: Could not resolve hostname native-hadoop: Name or service not known
builtin-java: ssh: Could not resolve hostname builtin-java: Name or service not known
util.NativeCodeLoader: ssh: Could not resolve hostname util.nativecodeloader: Name or service not known
classes: ssh: Could not resolve hostname classes: Name or service not known
for: ssh: Could not resolve hostname for: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
-: ssh: Could not resolve hostname -: Name or service not known
(NativeCodeLoader.java:<clinit>(62)): ssh: Could not resolve hostname (nativecodeloader.java:<clinit>(62)): Name or service not known
cat: /home/hadoop/app/hadoop-2.6.0-cdh5.16.2/slaves: No such file or directory
Starting secondary namenodes [2020-08-16 19:10:34,187 WARN  [main] util.NativeCodeLoader (NativeCodeLoader.java:<clinit>(62)) - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
0.0.0.0]
platform...: ssh: Could not resolve hostname platform...: Name or service not known
to: ssh: Could not resolve hostname to: Name or service not known
2020-08-16: ssh: Could not resolve hostname 2020-08-16: Name or service not known
using: ssh: Could not resolve hostname using: Name or service not known
WARN: ssh: Could not resolve hostname warn: Name or service not known
native-hadoop: ssh: Could not resolve hostname native-hadoop: Name or service not known
Unable: ssh: Could not resolve hostname unable: Name or service not known
-: ssh: Could not resolve hostname -: Name or service not known
for: ssh: Could not resolve hostname for: Name or service not known
library: ssh: Could not resolve hostname library: Name or service not known
[main]: ssh: Could not resolve hostname [main]: Name or service not known
(NativeCodeLoader.java:<clinit>(62)): ssh: Could not resolve hostname (nativecodeloader.java:<clinit>(62)): Name or service not known
load: ssh: Could not resolve hostname load: Name or service not known
your: ssh: Could not resolve hostname your: Name or service not known
builtin-java: ssh: Could not resolve hostname builtin-java: Name or service not known
util.NativeCodeLoader: ssh: Could not resolve hostname util.nativecodeloader: Name or service not known
classes: ssh: Could not resolve hostname classes: Name or service not known
applicable: ssh: Could not resolve hostname applicable: Name or service not known
where: ssh: Could not resolve hostname where: Name or service not known
19:10:34,187: ssh: Could not resolve hostname 19:10:34,187: Name or service not known
0.0.0.0: Error: JAVA_HOME is not set and could not be found.

正在回答 回答被采纳积分+3

1回答

Michael_PK 2020-08-16 19:20:06

1) 阿里云机器的host是配置内网的哦

2)hadoopenv里面也需要配置javahome的

3)Name or service not known这个错以为是hosts配置有问题,你在云主机上ssh 用户名@hostname,看看能通吗?

这几个步骤都ok后再启动

0 回复 有任何疑惑可以回复我~
  • 提问者 慕的地243712 #1
    谢谢老师回答:
    1.hosts已经配置了hadooop映射到了我的内网ip
    2.ssh hadoop@hadoop000时,提示登录成功的
    3.hadoop-env.sh也配置了JAVA_HOME了
    回复 有任何疑惑可以回复我~ 2020-08-17 21:08:17
  • Michael_PK 回复 提问者 慕的地243712 #2
    your: ssh: Could not resolve hostname your: Name or service not known  这个错  应该还是hosts里面的配置 ssh连不过去呢,你的hosts里面是如何配置的
    回复 有任何疑惑可以回复我~ 2020-08-17 21:17:49
  • Michael_PK 回复 提问者 慕的地243712 #3
    还有就是你的core-site.xml里面是配置的hostname吧,不会是ip的吧?这个hostname和你的hosts里面对应上没
    回复 有任何疑惑可以回复我~ 2020-08-17 21:19:01
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信