Nutch在'http.agent.name'中没有列出代理商

Lin*_*ill 11 web-crawler nutch

Exception in thread "main" java.lang.IllegalArgumentException: Fetcher: No agents listed in 'http.agent.name' property.
        at org.apache.nutch.fetcher.Fetcher.checkConfiguration(Fetcher.java:1166)
        at org.apache.nutch.fetcher.Fetcher.fetch(Fetcher.java:1068)
        at org.apache.nutch.crawl.Crawl.run(Crawl.java:135)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.nutch.crawl.Crawl.main(Crawl.java:54)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Run Code Online (Sandbox Code Playgroud)

每次我跑./nutch crawl urls -dir crawl -depth 3 -topN 5.nutch决定抛出这个错误.我有我的nutch-site.xml和nutch-default.xml设置.

 <property>
  <name>http.agent.name</name>
  <value>blah</value>
  </property>
Run Code Online (Sandbox Code Playgroud)

进行了描述,使其更容易阅读.但我没有看到可以指定代理名称的其他位置.如果有人有任何建议我会很感激.

Jul*_*che 16

使用1.3?如果是这样,请确保在runtime/local/conf中更改了nutch-site.xml(而不是默认值)更改NUTCH_HOME/conf中的conf将不会复制到运行时目录,除非您使用ant重建.