启动secondarynamenode时报错
环境:
mac系统 + hadoop2.6.0-cdh5.7.0伪分布式
问题一:
在启动hdfs的secondarynamenode时,报错。
正常情况:
sumengdeMacBook-Pro:sbin sumeng$ ./start-dfs.sh
18/06/11 21:35:00 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: starting namenode, logging to /Users/sumeng/app/hadoop-2.6.0-cdh5.7.0/logs/hadoop-sumeng-namenode-sumengdeMacBook-Pro.local.out
localhost: starting datanode, logging to /Users/sumeng/app/hadoop-2.6.0-cdh5.7.0/logs/hadoop-sumeng-datanode-sumengdeMacBook-Pro.local.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /Users/sumeng/app/hadoop-2.6.0-cdh5.7.0/logs/hadoop-sumeng-secondarynamenode-sumengdeMacBook-Pro.local.out
18/06/11 21:35:15 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
报错:
sumengdeMacBook-Pro:sbin sumeng$ ./start-dfs.sh
18/06/11 21:42:19 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: starting namenode, logging to /Users/sumeng/app/hadoop-2.6.0-cdh5.7.0/logs/hadoop-sumeng-namenode-sumengdeMacBook-Pro.local.out
localhost: starting datanode, logging to /Users/sumeng/app/hadoop-2.6.0-cdh5.7.0/logs/hadoop-sumeng-datanode-sumengdeMacBook-Pro.local.out
Starting secondary namenodes [account.jetbrains.com]
(卡在了这里,一直启动不了)
account.jetbrains.com: ssh_exchange_identification: Connection closed by remote host
分析:
/etc/hosts/中,我在破解idea中,加了一行
0.0.0.0 account.jetbrains.com
我猜是由他引起的
方法一:
注释掉这句话之后,就不再报这个错误,secondarynamenode顺利启动
方法二:
在hdfs-site.xml添加
<property> <name>dfs.secondary.http.address</name> <value>127.0.0.1:50090</value> </property>
因为不写的话默认是0.0.0.0:50090,改为127.0.0.1就可以
问题二:
在启动hadoop时,提示警告
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable、
方法:
https://blog.csdn.net/u014039577/article/details/49816907(里面有免费的包)
https://blog.csdn.net/u013310025/article/details/52853941
只是查了这些资料,没有实践