nutch1.6安装使用中错误解决方法
来源:互联网 发布:淘宝不自动打开淘口令 编辑:程序博客网 时间:2024/06/05 11:34
本文为小编在使用nutch 1.6中遇到“Nutch Fetcher: No agents listed in ‘http.agent.name’ property” 的第一个,该问题解决方法:原文网址:http://blog.csdn.net/chaishen10000/article/details/7183382
网络上大多解释是:在{nutch}/conf下找到nutch-default.xml
如果一开始的属性设置为:<property> <name> http.agent.name</name> <value> </value> </property>
则可能会抛出Fetcher: No agents listed in ‘http.agent.name’ property的错误提示。原因在于<value></value>中的值为空,自己加上一些东西(我想应该是随意的),改成 如下所示:
<property> <name> http.agent.name</name> <value> ZB nutch agent</value> </property>这种方法在nutch1.6中无效,仔细分析后发现,1.6中存在“/runtime/local”目录,所有运行都是在该目录下。找到该目录下的conf/nutch-default.xml,按上述办法即可解决。
第二个遇到的问题:
Fetcher: Your 'http.agent.name' value should be listed first in 'http.robots.agents' property.
解决方法:nutch-default.xml中的<name>http.robots.agents</name>中加入spider,* 。官方并不建议这么做,最好将下面的代码复制到nutch-site.xml,默认会覆盖nutch-default.xml中的配置(推荐)。
<property> <name>http.agent.name</name> <value>spider</value> <description>HTTP 'User-Agent' request header. MUST NOT be empty - please set this to a single word uniquely related to your organization. NOTE: You should also check other related properties: http.robots.agents http.agent.description http.agent.url http.agent.email http.agent.version and set their values appropriately. </description></property> <property> <name>http.robots.agents</name> <value>spider,*</value> <description>The agent strings we'll look for in robots.txt files, comma-separated, in decreasing order of precedence. You should put the value of http.agent.name as the first agent name, and keep the default * at the end of the list. E.g.: BlurflDev,Blurfl,* </description></property>
删除在 data/segments 报错的文件夹就可以了。
1、git 来作为版本控制工具,github作为server。bitbucket.org提供免费的私有库。
2、Nutch的提高在于 研读nutch-default.xml文件中的每一个配置项的实际含义(需要结合源代码理解)。
3、ant 根据build.xml配置文件进行执行,里面指定了如何对nutch进行编译,进行打包的,定制开发Nutch入门的方法时研读build.xml文件。
第一次获取数据失败了,失败内容通过cat nohup.out 日志文件中进行查看,发现是hostname的问题。
在进行 nohup bin/nutch crawl urls -dir data -threads 20 -depth 1 & 开始对数据进行抓取,最后成功的抓取到了网页的数据,放到data目录下的文件中。
PS :学习过程中的一些知识分享。
crawlDb :一个全局的抓取过超大的URL 文件夹
logs/hadoop.log 里面是数据抓去的详细信息。
solr :是一个独立的企业级搜索应用服务器,对外提供类似于Web-Service的API接口。
slf4j:java 日志
1、通过nutch诞生了hadoop,tika,gora。
2、Nutch 通过ivy(1.2之后)来进行依赖管理的。
3、Nutch 是使用SVN进行源代码管理的。
4、Lucene,Nutch,Hadoop在搜索界相当有名。
5、Nutch和Hadoop是通过什么连接起来的?
通过Nutch 脚本,通过Hadoop命令把apache-nutch-1.6.job提交给Hadoop的Job Tracker。
6、Nutch入门重点在于分析nutch脚本文件。
- nutch1.6安装使用中错误解决方法
- Nutch1.2的安装使用。
- nutch1.4中“Nutch Fetcher: No agents listed in ‘http.agent.name’ property”错误解决方法
- Nutch1.2 的安装与使用
- Nutch1.7学习使用一些错误记录--持续记录
- nutch1.0 在windows环境下的安装与使用
- Nutch1.9安装配置与基本使用介绍
- Nutch1.9安装配置与基本使用介绍
- debian中安装程序时错误解决方法
- caffe安装中错误以及解决方法
- Linux安装nutch1.9
- nutch1.9安装
- Nutch1.9安装
- nutch1.6安装与在myeclipse上部署
- Nutch1.4安装及测试
- nutch1.9--nutch安装记录
- reviewboard 安装 错误解决方法
- ReactNative安装错误解决方法
- camera2 opengl实现滤镜效果录制视频 二 双SurfaceView渲染
- 微服务架构的优势与不足
- mybatis Generator 配置详解
- Oracle数据库中的时间日期函数的使用
- 【BigHereo 7】-----面 试 再 总 结
- nutch1.6安装使用中错误解决方法
- HDU 6153 A Secret
- 小明学c++系列之第一篇:网络篇
- Python Web入门:Django学习与实践一
- 交叉编译工具库添加
- 微信小程序开发(十五)获取位置
- webpack学习资料
- Cookie 与 网络通信
- 机器学习与神经网络(一):人工神经网络模型简介