标签:Hadoop
简介:下面我们模拟下Hadoop生产实战中 jps 真死、假死的问题
[root@hadoop000 ~]# jps
4868 DataNode
5062 SecondaryNameNode
5256 Jps
4717 NameNode
[root@hadoop000 ~]# kill -9 $(pgrep -f hadoop-2.8.1)
[root@hadoop000 ~]# jps
4868 -- process information unavailable
5062 -- process information unavailable
4717 -- process information unavailable
5279 Jps
[root@hadoop000 ~]# ps -ef|grep 4868
root 5301 1630 0 14:39 pts/0 00:00:00 grep 4868
#进程不存在 可去/tmp/hsperfdata_hadoop文件夹删除残留文件
[root@hadoop000 ~]# cd /tmp/hsperfdata_hadoop/
[root@hadoop000 hsperfdata_hadoop]# ll
total 96
-rw------- 1 hadoop hadoop 32768 May 19 14:38 4717
-rw------- 1 hadoop hadoop 32768 May 19 14:38 4868
-rw------- 1 hadoop hadoop 32768 May 19 14:38 5062
[root@hadoop000 hsperfdata_hadoop]# rm *
rm: remove regular file `4717‘? yes
rm: remove regular file `4868‘? yes
rm: remove regular file `5062‘? yes
#显示正确
[root@hadoop000 hsperfdata_hadoop]# jps
5304 Jps
#hadoop用户
[hadoop@hadoop000 hadoop-2.8.1]$ pwd
/opt/software/hadoop-2.8.1
[hadoop@hadoop000 hadoop-2.8.1]$ sbin/start-dfs.sh
[hadoop@hadoop000 hadoop-2.8.1]$ jps
10004 SecondaryNameNode
9655 NameNode
10219 Jps
9806 DataNode
#root用户
[root@hadoop000 ~]# jps
10004 -- process information unavailable
9655 -- process information unavailable
10187 Jps
9806 -- process information unavailable
[root@hadoop000 hsperfdata_hadoop]# ps -ef|grep 10004
hadoop 10004 1 3 15:07 ? 00:00:08 /usr/local/java1.8/bin/java -Dproc_secondarynamenode -Xmx1000m -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/opt/software/hadoop-2.8.1/logs -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/opt/software/hadoop-2.8.1 -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,console -Djava.library.path=/opt/software/hadoop-2.8.1/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Stack=true -Dhadoop.log.dir=/opt/software/hadoop-2.8.1/logs -Dhadoop.log.file=hadoop-hadoop-secondarynamenode-hadoop000.log -Dhadoop.home.dir=/opt/software/hadoop-2.8.1 -Dhadoop.id.str=hadoop -Dhadoop.root.logger=INFO,RFA -Djava.library.path=/opt/software/hadoop-2.8.1/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -Dhadoop.security.logger=INFO,RFAS -Dhdfs.audit.logger=INFO,NullAppender -Dhadoop.security.logger=INFO,RFAS -Dhdfs.audit.logger=INFO,NullAppender -Dhadoop.security.logger=INFO,RFAS -Dhdfs.audit.logger=INFO,NullAppender -Dhadoop.security.logger=INFO,RFAS org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode
root 10256 7539 0 15:11 pts/3 00:00:00 grep 10004
##看到进程存在 请不要去/tmp目录下做删除操作 用su切换到hadoop用户下 jps即显示正常
标签:Hadoop
原文地址:http://blog.51cto.com/10814168/2118219