i can start hadoop sucess but datanode[slave] can't connect namenode[master]
2016-11-09 16:00:15,953 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Problem connecting to server: master/192.168.1.101:9000
2016-11-09 16:00:21,957 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.1.101:9000. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
2016-11-09 16:00:22,965 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.1.101:9000. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
detail /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.101 master
192.168.1.102 slave1
core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://master:9000</value>
</property>
</configuration>
and hdfs-site.xml
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///opt/volume/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///opt/volume/datanode</value>
</property>
1 回答
1)检查防火墙是否限制端口
如果是这样,请冲洗它
要打开9000,
2)检查namenode日志以查找
/var/log/hadoop
下的任何问题