我已经安装了Ubuntu 14.04 LTS服务器的7个虚拟机实例。 第一个实例运行namenode服务,所有其他6个节点运行datanode服务。我认为我的NameNode由于某些问题而崩溃或阻塞。 重新启动后,如果我检查JPS命令输出我的namenode正在运行。 在core-site.xml中,fs.defaultfs属性设置为hdfs:// instance-1:8020。 但在netstat -tulpn输出8020端口不在那里。
这是重新启动后的JPS输出。
root@instance-1:~# jps 3017 VersionInfo 2613 NameNode 3371 VersionInfo 3313 ResourceManager 3015 Main 2524 QuorumPeerMain 2877 HeadlampServer 1556 Main 3480 Jps 2517 SecondaryNameNode 3171 JobHistoryServer 2790 EventCatcherService 2842 AlertPublisher 2600 Bootstrap 2909 Main
这是我在jps之后检查的netstat输出。
root@instance-1:~# netstat -tulpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 600/rpcbind tcp 0 0 0.0.0.0:9010 0.0.0.0:* LISTEN 2524/java tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1164/sshd tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1158/postgres tcp 0 0 127.0.0.1:19001 0.0.0.0:* LISTEN 1496/python tcp 0 0 0.0.0.0:42043 0.0.0.0:* LISTEN 2524/java tcp 0 0 10.240.71.132:9000 0.0.0.0:* LISTEN 1419/python tcp 0 0 0.0.0.0:7432 0.0.0.0:* LISTEN 1405/postgres tcp6 0 0 :::111 :::* LISTEN 600/rpcbind tcp6 0 0 :::22 :::* LISTEN 1164/sshd tcp6 0 0 :::7432 :::* LISTEN 1405/postgres udp 0 0 0.0.0.0:68 0.0.0.0:* 684/dhclient udp 0 0 0.0.0.0:111 0.0.0.0:* 600/rpcbind udp 0 0 10.240.71.132:123 0.0.0.0:* 3323/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 3323/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 3323/ntpd udp 0 0 0.0.0.0:721 0.0.0.0:* 600/rpcbind udp 0 0 0.0.0.0:29611 0.0.0.0:* 684/dhclient udp6 0 0 :::111 :::* 600/rpcbind udp6 0 0 :::123 :::* 3323/ntpd udp6 0 0 :::721 :::* 600/rpcbind udp6 0 0 :::22577 :::* 684/dhclient
正如我所说我没有看到8020端口。 一分钟后,我检查了JPS输出,namenode不见了。
这是重启后一分钟的jps输出。
root@instance-1:~# jps 3794 Main 3313 ResourceManager 3907 EventCatcherService 4325 Jps 2530 RunJar 3082 RunJar 2524 QuorumPeerMain 2656 Bootstrap 2877 HeadlampServer 1556 Main 2517 SecondaryNameNode 3171 JobHistoryServer 2842 AlertPublisher 2600 Bootstrap
正如我所说的namenode不在那里。 我重复上述过程几次,每次我得到相同的结果端口8020不在那里和namenode得到崩溃。 我认为这是一个防火墙问题,你怎么看?
提前致谢。
您应该首先检查$ HADOOP_HOME / logs目录下的NameNode守护进程日志。
作为一个动机,
在启动期间,NameNode必须完成某些操作,然后才能提供客户端请求:
- 从fsimage文件读取文件系统元数据。
- 读取编辑日志并将logging的操作应用于文件系统元数据。
- 写一个新的检查点。
- 保持安全模式,直到数据节点报告足够数量的块。