`

Nutch 1.13 + Solr 5.5.4集成常见报错

 
阅读更多

1. 没有找到Elastic search的信息

配置好了nutch1.13和Solr5.5.4之后,使用solr来索引nutch爬取到的结果,结果报错显示么有配elastic search的东西:

Zhuos-MacBook-Pro:apache-nutch-1.13 jo$ nutch solrindex http://localhost:8983/solr/ ~/nutch/crawl/crawldb -linkdb ~/nutch/crawl/linkdb -dir ~/nutch/crawl/segments

...

Indexer: java.lang.RuntimeException: Missing elastic.cluster and elastic.host. At least one of them should be set in nutch-site.xml 

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被指定为了elastic。修改nutch-site.xml解决这个问题:

将  <name>plugin.includes</name>的value节点值indexer-elastic修改成indexer-solr即可。修改完后如下:

<property>
  <name>plugin.includes</name>
  <value>protocol-http|urlfilter-regex|parse-(html|tika)|index-(basic|anchor)|indexer-solr|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
  <description>Regular expression naming plugin directory names to
  include.  Any plugin not matching this expression is excluded.
  In any case you need at least include the nutch-extensionpoints plugin. By
  default Nutch includes crawling just HTML and plain text via HTTP,
  and basic indexing and search plugins. In order to use HTTPS please enable 
  protocol-httpclient, but be aware of possible intermittent problems with the 
  underlying commons-httpclient library. Set parsefilter-naivebayes for classification based focused crawler.
  </description>
</property>

 

2)solrindex时报错Job failed.执行nutch solrindex报错404, 405等..

Indexer: java.io.IOException: Job failed!

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

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)

 

解决方法:查看nutch的log目录下的报错,发现后台是因为solr的页面返回了404,405等信息。

这些事因为在执行nutch solrindex的时候指定的solr地址不正确错误。

我们在http://localhost:8983/solr后面直接跟上core的名称,不要加#,不要加~cores/目录..

例如我自己创建了一个core叫mycore,那么执行的nutch solrindex命令如下:

nutch solrindex http://localhost:8983/solr/mycore ~/nutch/crawl/crawldb -linkdb ~/nutch/crawl/linkdb -dir ~/nutch/crawl/segments
分享到:
评论

相关推荐

    nutch2.3+hbase0.94.14+hadoop1.2.1安装文档.

    nutch2.3+hbase0.94.14+hadoop1.2.1安装文档.txt )

    Windows下cygwin+MyEclipse 8.5+Nutch1.2+Tomcat 6.0

    ### Windows下cygwin+MyEclipse 8.5+Nutch1.2+Tomcat 6.0 本文旨在详细介绍如何在Windows环境下搭建基于cygwin、MyEclipse 8.5、Nutch 1.2及Tomcat 6.0的开发环境,并对每个步骤进行深入解析。 #### 一、Cygwin的...

    nutch爬虫+java+eclipse

    Nutch 是一个开源的全文搜索引擎框架,主要用于网络数据抓取,是Java开发的,因此它为Java开发者提供了一个构建大规模网络爬虫的平台。在Java环境下结合Eclipse IDE,我们可以轻松地开发和调试Nutch爬虫项目。下面将...

    OCR_FontsSearchEngine, 一种超立方体Nutch和PHP的OCR搜索引擎.zip

    OCR_FontsSearchEngine, 一种超立方体Nutch和PHP的OCR搜索引擎 Silex框架 ;thiagoalessio ;nutch1.10+solr4.10.4 ;``` shell

    基于hbase+solr的搜索引擎毕业论文

    Nutch抓取指定网址数据,存储在HBase数据库中,存储过程由zookeeper管理。脚本调用索引器部件将数据索引化,经过索引化的数据被前端检索查询,最后前端展示查询结果,用户点击结果列表查看目标资料。

    apache-nutch-1.13-src.zip_nutch_网络爬虫

    Apache Nutch 是一款开源的网络爬虫项目,其1.13版本的源代码提供了丰富的学习资源,适合对网络爬虫技术感兴趣的开发者深入研究。Nutch 主要用于抓取、索引和搜索互联网上的信息,它是一个高度可扩展的系统,能够...

    基于Apache Nutch和Solr的AJAX页面内容爬取与处理设计源码

    本项目是基于Apache Nutch和Solr开发的AJAX页面内容爬取与处理设计源码,主要使用Java进行开发。项目共包含1064个文件,其中Java源代码文件458个,XML配置文件181个,文本文件81个,HTML页面文件56个,JPG图片文件56...

    垂直搜索引擎系统

    DDH垂直搜索引擎系统是一个Java实现的垂直搜索引擎系统,是一套整合了Nutch/UCI/SOLR的网络信息整合系统。借助DDH你可以快速构建多领域的垂直搜索引擎系统。目前DDH整合了Nutch2.2.1+UCI1.0+SOLR4。

    利用开源工具搭建小型搜索引擎

    基于开源搜索引擎工具(如Heritrix +Lucence,或Nutch+Solr),搭建独立完整的搜索引擎测试平台。 2)垂直搜索行业信息:自主选择某一感兴趣行业,抓取相关行业内容。以抓取结果作为数据库,建立垂直搜索引擎,实现...

    Lucene+Nutch本书源码+详细说明

    Nutch不仅包含了网页抓取的策略,还集成了链接分析算法,用于评估网页的重要性。通过Nutch的源码,我们可以了解到网络爬虫的工作原理,如何设置爬取规则,以及如何处理HTTP请求和响应。 在提供的压缩包中,...

    人工智能-项目实践-搜索引擎-基于Nutch+ElasticSearch+MySQL+SSM的简易搜索引擎

    标题中的“人工智能-项目实践-搜索引擎-基于Nutch+ElasticSearch+MySQL+SSM的简易搜索引擎”揭示了一个项目,旨在构建一个简易的搜索引擎,利用了人工智能的一些原理和技术。这个项目结合了多个开源工具,包括Nutch...

    nutch+lucene开发自己的搜索引擎ch3.pdf

    ### nutch+lucene开发自己的搜索引擎知识点总结 #### 一、概览 - **标题与描述**: 本资料“nutch+lucene开发自己的搜索引擎ch3.pdf”聚焦于介绍如何使用Nutch和Lucene来构建自己的搜索引擎,特别强调了第三章:...

    eclipse配置nutch,eclipse配置nutch

    而Eclipse作为一款流行的集成开发环境(IDE),被广泛应用于Java开发中。本文将详细解析如何在Eclipse中配置Nutch,以便于开发者更好地理解和操作这一过程。 ### 一、理解Nutch与Eclipse的结合 Nutch是一个基于...

    hadoop nutch solr 环境搭建手册

    自己写的 hadoop nutch solr 环境搭建手册,成功搭建后写的,会有红色标注容易出错的地方

    搜索引擎nutch配置

    编译完成后,可以运行Nutch的命令行工具,如`bin/nutch inject`来注入种子URL,`bin/nutch fetch`执行抓取,`bin/nutch update`更新已抓取的页面,`bin/nutch generate`生成待抓取的URL列表,以及`bin/nutch crawl`...

    Apache Nutch 1.7 在windows和Linux下的安装

    本文将详细介绍 Apache Nutch 1.7 在 Windows 和 Linux 下的安装过程,包括安装前的准备工作、安装 Cygwin、安装 Nutch 1.7、测试 Nutch 1.7 以及与 Solr 结合使用等内容。 1. 准备工作 在安装 Apache Nutch 1.7 ...

    Nutch搜索引擎·Solr简介及安装(第2期)

    1.1 Solr 简介 1.1.1 Solr 的特性 1.1.2 Solr 的目录结构 1.1.3 Solr 与Lucene 关系 1.2 Solr 安装 1.2.1 环境介绍 1.2.2 安装Solr 1.2.3 结合Nutch

    基于Apache Nutch和Solr等组件扩展实现对于AJAX加载类型页面的完整页面内容抓取,以及特定数据项的解析和索引

    通过在Nutch中集成Htmlunit,我们可以确保爬虫能够捕获到那些在页面初始加载后由AJAX调用生成的内容。 另一方面,Selenium WebDriver是一个更强大的自动化测试工具,它允许我们控制多种浏览器的行为,包括执行...

    基于Nutch+ElasticSearch+MySQL+SSM的简易搜索引擎+源代码+文档说明

    &lt;项目介绍&gt; 该资源内项目源码是个人的毕设,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96分,放心下载使用! 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用!...

Global site tag (gtag.js) - Google Analytics