我已经在 linux 集群中安装了 Hadoop。当我尝试通过命令 $bin/start-all.sh 启动服务器时,出现以下错误:
mkdir: cannot create directory `/var/log/hadoop/spuri2': Permission denied
chown: cannot access `/var/log/hadoop/spuri2': No such file or directory
/home/spuri2/spring_2012/Hadoop/hadoop/hadoop-1.0.2/bin/hadoop-daemon.sh: line 136: /var/run/hadoop/hadoop-spuri2-namenode.pid: Permission denied
head: cannot open `/var/log/hadoop/spuri2/hadoop-spuri2-namenode-gpu02.cluster.out' for reading: No such file or directory
localhost: /home/spuri2/.bashrc: line 10: /act/Modules/3.2.6/init/bash: No such file or directory
localhost: mkdir: cannot create directory `/var/log/hadoop/spuri2': Permission denied
localhost: chown: cannot access `/var/log/hadoop/spuri2': No such file or directory
我已将 conf/hadoop-env.sh 中的日志目录参数配置为 /tmp 目录,并且我已将 core-site.xml 中的“hadoop.tmp.dir”配置为 /tmp/ 目录。由于我无权访问 /var/log 目录,但 hadoop 守护进程仍在尝试写入 /var/log 目录并失败。
我想知道为什么会这样?