DataNode启动问题
集群只有一个主机节点,从节点无法工作,查看从节点日志。我这里是从节点redis02机器上查看
# root@redis02:/usr/local/hadoop/logs# cat hadoop-root-nodemanager-redis02.log
查看日志信息如下:
2022-03-10 17:21:33,925 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: 192.168.92.145:8020. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 2022-03-10 17:21:34,928 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: 192.168.92.145:8020. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 2022-03-10 17:21:35,930 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: 192.168.92.145:8020. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 2022-03-10 17:21:36,933 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: 192.168.92.145:8020. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
解决
检查 /etc/hosts 配置文件,发现有如下配置,删除这一行或者注掉。
root@redis01:~# cat /etc/hosts