Hadoop集群搭建时的问题及解决(5)

自己先解决第一个问题:
/home/Hadoop/hadoop/bin/../bin/hadoop-daemon.sh: line 127: /tmp/hadoop-hadoop-namenode.pid: 权限不够
供大家参考,希望能帮助到遇到同样问题的童鞋。

在hadoop用户下,查看/tmp文件:
-rw-r--r--  1 root   root       5 12-07 13:18 hadoop-hadoop-jobtracker.pid
-rw-r--r--  1 root   root       5 12-07 13:18 hadoop-hadoop-namenode.pid
-rw-rw-r--  1 hadoop hadoop     5 12-11 18:38 hadoop-hadoop-secondarynamenode.pid
-rw-r--r--  1 root   root       5 12-07 13:55 hadoop-root-datanode.pid
-rw-r--r--  1 root   root       5 12-07 13:55 hadoop-root-jobtracker.pid
-rw-r--r--  1 root   root       5 12-07 13:55 hadoop-root-namenode.pid
-rw-r--r--  1 root   root       5 12-07 13:55 hadoop-root-secondarynamenode.pid
-rw-r--r--  1 root   root       5 12-07 13:55 hadoop-root-tasktracker.pid

start时有权限问题,至于原理现在我不清楚,是在start的时候需要对hadoop-hadoop-namenode.pid进行修改?还是什么?请高手解答。

解决办法:
1。在hadoop-config中修改hadoop-env.sh,添加:export HADOOP_PID_DIR=$HADOOP_HOME/run/tmp。改变pid的路径。3台机子一块改。
2。在/etc中修改profile,添加:export HADOOP_PID_DIR=$HADOOP_HOME/run/tmp,同样,改3台机子。
3。重启之后:
[hadoop@hadoop1 hadoop]$ bin/start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-mapred.sh
starting namenode, logging to /home/hadoop/hadoop/logs/hadoop-hadoop-namenode-hadoop1.out
hadoop3: starting datanode, logging to /home/hadoop/hadoop/logs/hadoop-hadoop-datanode-hadoop3.out
hadoop2: starting datanode, logging to /home/hadoop/hadoop/logs/hadoop-hadoop-datanode-hadoop2.out
hadoop1: starting secondarynamenode, logging to /home/hadoop/hadoop/logs/hadoop-hadoop-secondarynamenode-hadoop1.out
starting jobtracker, logging to /home/hadoop/hadoop/logs/hadoop-hadoop-jobtracker-hadoop1.out
hadoop3: starting tasktracker, logging to /home/hadoop/hadoop/logs/hadoop-hadoop-tasktracker-hadoop3.out
hadoop2: starting tasktracker, logging to /home/hadoop/hadoop/logs/hadoop-hadoop-tasktracker-hadoop2.out

是否从新format都无影响,显示正常!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/pxxfj.html