Chinaunix首页 | 论坛 | 博客
  • 博客访问: 25552
  • 博文数量: 15
  • 博客积分: 650
  • 博客等级: 上士
  • 技术积分: 170
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-30 11:04
文章分类
文章存档

2010年(2)

2009年(13)

我的朋友
最近访客

分类: Java

2010-01-06 20:58:11

在运行爬虫或者其他Hadoop任务的时候,会报一下错误:

task_0035_m_000005_0: log4j:ERROR setFile(null,true) call failed.
task_0035_m_000005_0: java.io.FileNotFoundException:
/data/sengine/search/bin/../logs (Is a directory)
task_0035_m_000005_0: at java.io.FileOutputStream.openAppend(Native
Method)
task_0035_m_000005_0: at java.io.FileOutputStream.(
FileOutputStream.java:177)
task_0035_m_000005_0: at java.io.FileOutputStream.(
FileOutputStream.java:102)
task_0035_m_000005_0: at org.apache.log4j.FileAppender.setFile(
FileAppender.java:289)
task_0035_m_000005_0: at org.apache.log4j.FileAppender.activateOptions(
FileAppender.java:163)
task_0035_m_000005_0: at
org.apache.log4j.DailyRollingFileAppender.activateOptions(
DailyRollingFileAppender.java:215)
task_0035_m_000005_0: at org.apache.log4j.config.PropertySetter.activate(
PropertySetter.java:256)
task_0035_m_000005_0: at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java
:132)
task_0035_m_000005_0: at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
task_0035_m_000005_0: at
org.apache.log4j.PropertyConfigurator.parseAppender(
PropertyConfigurator.java:654)
task_0035_m_000005_0: at
org.apache.log4j.PropertyConfigurator.parseCategory(
PropertyConfigurator.java:612)
task_0035_m_000005_0: at
org.apache.log4j.PropertyConfigurator.configureRootCategory(
PropertyConfigurator.java:509)
task_0035_m_000005_0: at org.apache.log4j.PropertyConfigurator.doConfigure
(PropertyConfigurator.java:415)
task_0035_m_000005_0: at org.apache.log4j.PropertyConfigurator.doConfigure
(PropertyConfigurator.java:441)
task_0035_m_000005_0: at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(
OptionConverter.java:468)
task_0035_m_000005_0: at org.apache.log4j.LogManager.(
LogManager.java:122)
task_0035_m_000005_0: at org.apache.log4j.Logger.getLogger(Logger.java
:104)
task_0035_m_000005_0: at
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)
task_0035_m_000005_0: at org.apache.commons.logging.impl.Log4JLogger
.(Log4JLogger.java:65)
task_0035_m_000005_0: at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
task_0035_m_000005_0: at
sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:39)
task_0035_m_000005_0: at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:27)
task_0035_m_000005_0: at java.lang.reflect.Constructor.newInstance(
Constructor.java:513)
task_0035_m_000005_0: at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
LogFactoryImpl.java:529)
task_0035_m_000005_0: at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
LogFactoryImpl.java:235)
task_0035_m_000005_0: at org.apache.commons.logging.LogFactory.getLog(
LogFactory.java:370)
task_0035_m_000005_0: at org.apache.hadoop.mapred.TaskTracker.(
TaskTracker.java:82)
task_0035_m_000005_0: at org.apache.hadoop.mapred.TaskTracker$Child.main(
TaskTracker.java:1423)
task_0035_m_000005_0: log4j:ERROR Either File or DatePattern options are not
set for appender [DRFA].
task_0035_m_000004_0: log4j:ERROR setFile(null,true) call failed.

该错误是由于Nutch 0.9的Log4J 配置不完整造成的,

打开 conf/log4j.properties加入以下两个参数

hadoop.log.dir=.
hadoop.log.file=hadoop.log

即可。

阅读(2780) | 评论(0) | 转发(0) |
0

上一篇:正则表达式

下一篇:没有了

给主人留下些什么吧!~~