运行nutch常见几个错误

1.1.1   Crawl抓取出现hadoop出错提示

配置完成nutchcygwin中运行nutchcrawl命令时:

[Fatal Error] hadoop-site.xml:15:7: The content of elements must consist of well

-formed character data or markup.

Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseExcep

tion: The content of elements must consist of well-formed character data or mark

up.

问题解决:

hadoop-site.xmlhadoop-site.xml其中一个标签前面多了一个尖括号

1.1.2   运行crawl报错Job failed

Exception in thread "main" java.io.IOException: Job failed!

        at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:604)

        at org.apache.nutch.indexer.DeleteDuplicates.dedup(DeleteDuplicates.java

:439)

        at org.apache.nutch.crawl.Crawl.main(Crawl.java:135)

问题解决:

此多为crawl-urlfilter.txtMY.DOMAIN.NAME的修改不正确

1.1.3   又一个Job failed

Exception in thread "main" java.io.IOException: Job failed!

        at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:604)

        at org.apache.nutch.indexer.DeleteDuplicates.dedup(DeleteDuplicates.java

:439)

        at org.apache.nutch.crawl.Crawl.main(Crawl.java:135)

问题解决:

多为crawl-urlfilter.txtMY.DOMAIN.NAME修改不正确

1.1.4   Eclipse中运行nutchJob failed

Exception in thread "main" java.io.IOException: Job failed!

       at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:604)

       at org.apache.nutch.crawl.Injector.inject(Injector.java:162)

       at org.apache.nutch.crawl.Crawl.main(Crawl.java:115)

问题解决:

此问题是eclipsejava版本设置问题,解决方法:

如原来使用java1.4,需要改为1.6

project-properties-java compiler

jdk compliance

compiler compliance level:改为6.0

你可能感兴趣的:(nutch)