DataNode,NameNode,JobTracker,TaskTracker用jps查看无法启动解决办法
查看tasktracker的50060的地址无法正常查看,主要有两个原因,一个是在/tmp目录下有以前使用2.02版本留下的文件没有删除,二个是因为端口被占用了
解决方法:
一、删除/tmp目录下所有文件
[root@localhost hadoop]# su -
[root@localhost ~]# cd /tmp/
[root@localhost tmp]# ls
hadoop-shen hsperfdata_shen
hadoop-shen-datanode.pid Jetty_0_0_0_0_50030_job____yn7qmk
hadoop-shen-jobtracker.pid Jetty_0_0_0_0_50070_hdfs____w2cu08
hadoop-shen-namenode.pid Jetty_0_0_0_0_50075_datanode____hwtdwq
hadoop-shen-secondarynamenode.pid Jetty_0_0_0_0_50090_secondary____y6aanv
hadoop-shen-tasktracker.pid
[root@localhost tmp]# rm -rf *
二、对占用的端口进行释放
[shen@localhost hadoop]$ lsof -i:9000
[shen@localhost hadoop]$ lsof -i:50070
[shen@localhost hadoop]$ lsof -i:50030
[shen@localhost hadoop]$ lsof -i:50075
[shen@localhost hadoop]$ lsof -i:50060
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 4280 shen 79u IPv6 51108 0t0 TCP *:50060 (LISTEN)
[shen@localhost hadoop]$ kill 4280
[shen@localhost hadoop]$ lsof -i:50020
[shen@localhost hadoop]$ lsof -i:50010
如上图,就是因为50060端口被占用,所以无法启动TaskTracker,kill后一切正常
[shen@localhost hadoop]$ jps
13510 DataNode
13656 SecondaryNameNode
13918 TaskTracker
13750 JobTracker
13362 NameNode
13994 Jps
默认端口 设置位置 描述信息
8021 JT RPC 交互端口
50030 mapred.job.tracker.http.address JobTracker administrative web GUI JOBTRACKER的HTTP服务器和端口
50070 dfs.http.address NameNode administrative web GUI NAMENODE的HTTP服务器和端口
50010 dfs.datanode.address DataNode control port DATANODE控制端口,主要用于DATANODE初始化时向NAMENODE提出注册和应答请求
50020 dfs.datanode.ipc.address DataNode IPC port, used for block transfer DATANODE的RPC服务器地址和端口
50060 mapred.task.tracker.http.address Per TaskTracker web interface TASKTRACKER的HTTP服务器和端口
50075 dfs.datanode.http.address Per DataNode web interface DATANODE的HTTP服务器和端口
50090 dfs.secondary.http.address Per secondary NameNode web interface 辅助DATANODE的HTTP服务器和端口