2011-07-05 30 views
11
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) 

每當我運行./nutch crawl urls -dir crawl -depth 3 -topN 5。 nutch決定拋出這個錯誤。我有我的nutch-site.xml & nutch-default.xml設置。Nutch沒有在'http.agent.name'中列出的代理商

<property> 
    <name>http.agent.name</name> 
    <value>blah</value> 
    </property> 

將說明寫出來使其更易於閱讀。但是我沒有看到代理名稱可以指定的地方。如果有人有任何建議,我將不勝感激。

回答

15

使用1.3?如果是這樣,請確保在運行時更改nutch-site.xml(而不是默認值)/ local/conf 除非使用ant重建,否則更改NUTCH_HOME/conf中的conf不會被複制到運行時目錄。 順便說一句,你爲什麼不問問郵件列表呢?你更可能在那裏得到一些幫助

+1

非常感謝這是問題!編輯錯誤的文件。 – LinuxBill

+0

郵件列表似乎不工作。我嘗試訂閱nutch郵件列表幾次,但失敗 – janwen

0

嘗試給予http.robots.agents的代理名稱也。它爲我工作。此後我沒有收到這條消息!

相關問題