错误:用mongodb

时间:2016-10-01 12:54:11

标签: mongodb apache nutch

当我尝试运行时,出现以下错误,在mongodb日志中接受一个连接并立即结束。解决它?

    $ bin / crawl conf / urls / seeds.txt tuto 1     没有指定SOLRURL。跳过索引。     注入种子URL     /e/apache-nutch/apache-nutch-2.3.1/runtime/local/bin/nutch注入conf / urls / seeds.txt -crawlId tuto     InjectorJob:从2016-10-01 18:15:14开始     InjectorJob:注入urlDir:conf / urls / seeds.txt     InjectorJob:使用org.apache.gora.mongodb.store.MongoStore类作为Gora存储类。     InjectorJob:java.lang.NullPointerException             在java.lang.ProcessBuilder.start(ProcessBuilder.java:1010)             在org.apache.hadoop.util.Shell.runCommand(Shell.java:482)             在org.apache.hadoop.util.Shell.run(Shell.java:455)             在org.apache.hadoop.util.Shell $ ShellCommandExecutor.execute(Shell.java:702)             在org.apache.hadoop.util.Shell.execCommand(Shell.java:791)             在org.apache.hadoop.util.Shell.execCommand(Shell.java:774)             at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:646)             在org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:434)             在org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:281)             在org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:125)             在org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:348)             在org.apache.hadoop.mapreduce.Job $ 10.run(Job.java:1285)             在org.apache.hadoop.mapreduce.Job $ 10.run(Job.java:1282)             at java.security.AccessController.doPrivileged(Native Method)             在javax.security.auth.Subject.doAs(Subject.java:415)             在org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)             在org.apache.hadoop.mapreduce.Job.submit(Job.java:1282)             在org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1303)             在org.apache.nutch.util.NutchJob.waitForCompletion(NutchJob.java:115)             在org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:231)             在org.apache.nutch.crawl.InjectorJob.inject(InjectorJob.java:252)             在org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:275)             在org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)             在org.apache.nutch.crawl.InjectorJob.main(InjectorJob.java:284)

2 个答案:

答案 0 :(得分:0)

我相信最新版本的Nutch使用

# bin/nutch inject seedDirectory/

至少这对我有用。

答案 1 :(得分:0)

我通过删除两行来解决了这个问题,即:

[field name="sitemaps" docfield="sitemaps" type="document"] 

[field name="stmPriority" docfield="stmPriority" type="int32"] 

来自荷兰gora-mongodb-mapping.xml文件夹中的conf文件。希望它会帮助你..