我在virtualbox上安装了Cloudera快速入门VM 5.13,我试图用命令sudo service hadoop-hdfs-namenode start
启动hadoop服务器,但我得到了这两个错误:log4j:ERROR Could not find value for key log4j.appender.RFA
和log4j:ERROR Could not instantiate appender named "RFA"
。有人能帮我解决这个问题吗?
我找到了我的log4j。属性文件(我的例子。/workspace/training/conf/log4j.properties),我添加了这两行,它解决了问题:
log4j.appender.RFA = org.apache.log4j。ConsoleAppender log4j.appender.RFA.layout = org.apache.log4j.PatternLayout
对于我的情况,log4j.properties
文件位于/etc/hadoop/conf/
然后按建议添加以下配置
log4j.appender.RFA=org.apache.log4j.ConsoleAppender
log4j.appender.RFA.layout=org.apache.log4j.PatternLayout