【问题标题】:Error indexing Nutch crawl data into Elasticsearch将 Nutch 爬网数据索引到 Elasticsearch 时出错
【发布时间】:2018-08-31 00:33:22
【问题描述】:

我正在使用 Nutch 1.14 并尝试将小型网络爬网索引到 ES v5.3.0 中,但我不断收到此错误:

ElasticIndexWriter
    elastic.cluster : elastic prefix cluster
    elastic.host : hostname
    elastic.port : port
    elastic.index : elastic index command 
    elastic.max.bulk.docs : elastic bulk index doc counts. (default 250)
    elastic.max.bulk.size : elastic bulk index length in bytes. (default 2500500)
    elastic.exponential.backoff.millis : elastic bulk exponential backoff initial delay in milliseconds. (default 100)
    elastic.exponential.backoff.retries : elastic bulk exponential backoff max retries. (default 10)
    elastic.bulk.close.timeout : elastic timeout for the last bulk in seconds. (default 600)


Indexer: java.io.IOException: Job failed!
    at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:873)
    at org.apache.nutch.indexer.IndexingJob.index(IndexingJob.java:147)
    at org.apache.nutch.indexer.IndexingJob.run(IndexingJob.java:230)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.nutch.indexer.IndexingJob.main(IndexingJob.java:239)

Error running:
  /home/david/tutorials/nutch/apache-nutch-1.14-src/runtime/local/bin/nutch index -Delastic.server.url=http://localhost:9300/search-index/ searchcrawl//crawldb -linkdb searchcrawl//linkdb searchcrawl//segments/20180824175802
Failed with exit value 255.

我已经完成了this,但我仍然收到错误...

更新 - 好的,我已经取得了进展。索引现在似乎工作了 - 没有更多的错误。但是,当我通过 Kibana 查看使用 _stats 来检查文档计数时,当 Nutch 告诉我这个时,我得到 0:

Segment dir is complete: crawl/segments/20180830115119.
Indexer: starting at 2018-08-30 12:19:31
Indexer: deleting gone documents: false
Indexer: URL filtering: false
Indexer: URL normalizing: false
Active IndexWriters :
ElasticRestIndexWriter
    elastic.rest.host : hostname
    elastic.rest.port : port
    elastic.rest.index : elastic index command 
    elastic.rest.max.bulk.docs : elastic bulk index doc counts. (default 250) 
    elastic.rest.max.bulk.size : elastic bulk index length. (default 2500500 ~2.5MB)


Indexer: number of documents indexed, deleted, or skipped:
Indexer:      9  indexed (add/update)
Indexer: finished at 2018-08-30 12:19:45, elapsed: 00:00:14

我假设这意味着 ES 被发送了 9 个文档进行索引?

【问题讨论】:

  • 查看ES端的日志,在这种情况下,我们唯一能得到的信息就是索引失败。
  • @JorgeLuis - 我查看了日志,似乎 TransportService 已关闭,但我很确定我的本地 ES 正在运行。 Elastic 是否完全弃用了 TransportClient?
  • 您可以将日志上传到 Github gist 或其他什么地方吗?那里应该有更多信息。会不会是超时了?
  • @JorgeLuis - 抱歉耽搁了,这是 ES 日志的要点gist.github.com/redlinecodes/6fb77ca7e13d6785803b8fdfa7e8966d - 看起来可能存在内存问题??
  • @JorgeLuis - 我已经在 SO 和 Google 上进行了大量搜索以尝试解决这个问题 - 您似乎对 Nutch(和 ES 集成)非常了解。在您看来,如果我尝试更新我的垂直搜索引擎 - 您会使用哪个版本的 Nutch,您还会使用 Jest REST api 进行 ES 集成吗?

标签: nutch elasticsearch-5


【解决方案1】:

我已将 Elasticsearch 6.0 与 nutch 1.14 一起使用,效果非常好,我正在使用带有端口 9200 的 indexer-elastic-rest 插件,我附上我的 nutch-site.xml 以供参考.

【讨论】:

  • 您是否使用 Jest 保持所有默认设置,您只是使用 cli crawl 命令还是必须使用 Nutch 1x REST api?
  • 谢谢。我将从新的 1.14 和新的 nutch-site.xml 开始,然后从那里开始。我会告诉你它是否有效
  • 如果有机会,请查看我上面的更新
  • Chadhary - 成功!我升级到 ES 和 Kibana 5.6.0,现在我看到通过 Nutch 索引到 ES 的文档!一定需要一直升级 :) 非常感谢您的帮助。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-03-02
  • 2016-10-18
  • 1970-01-01
  • 2012-11-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多