yarn-daemon.sh写入HDP中错误的日志目录

时间:2015-05-26 15:27:14

标签: hadoop hortonworks-data-platform resourcemanager

我在笔记本电脑上安装了Hortonworks HDP 2.2.4.2-2版。我已经启动了HDFS服务,例如名称节点,辅助名称节点和所有数据节点。我可以通过名称节点web界面浏览HDFS。问题在于资源管理器。 HDP随播广告文件为HADOOP_LIBEXEC_DIR设置了错误的值。它被设置为/usr/lib/hadoop/libexec这是错误的。正确的地址是:/usr/hdp/2.2.4.2-2/hadoop/libexec。在我更改了此参数并使用此命令启动资源管理器后(使用yarn user):

/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh --config /etc/hadoop/conf start resourcemanager

显示错误:

mkdir: cannot create directory `/var/log/hadoop-yarn': Permission denied
chown: cannot access `/var/log/hadoop-yarn/yarn': No such file or directory
mkdir: cannot create directory `/var/run/hadoop-yarn': Permission denied
starting resourcemanager, logging to /var/log/hadoop-yarn/yarn/yarn-yarn-resourcemanager-rm.hdp.local.out
/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh: line 129: cd: /usr/lib/hadoop-yarn: No such file or directory
/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh: line 131: /var/run/hadoop-yarn/yarn/yarn-yarn-resourcemanager.pid: No such file or directory
/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh: line 130: /var/log/hadoop-yarn/yarn/yarn-yarn-resourcemanager-rm.hdp.local.out: No such file or directory
head: cannot open `/var/log/hadoop-yarn/yarn/yarn-yarn-resourcemanager-rm.hdp.local.out' for reading: No such file or directory
/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh: line 135: /var/log/hadoop-yarn/yarn/yarn-yarn-resourcemanager-rm.hdp.local.out: No such file or directory
/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh: line 136: /var/log/hadoop-yarn/yarn/yarn-yarn-resourcemanager-rm.hdp.local.out: No such file or directory

问题是yarn-daemon.sh根据我的环境变量使用了错误的日志目录:

[yarn@rm ~]$ echo ${YARN_LOCAL_DIR}
/hadoop/yarn/local
[yarn@rm ~]$ echo ${YARN_LOG_DIR}
/var/log/hadoop/yarn
[yarn@rm ~]$ echo ${YARN_LOCAL_LOG_DIR}
/hadoop/yarn/logs
[yarn@rm ~]$ echo ${YARN_PID_DIR}
/var/run/hadoop/yarn

这真的是一个错误还是我做错了什么?

0 个答案:

没有答案