Nutch:失败了:java.net.SocketException:连接重置

时间:2013-10-08 17:41:34

标签: hadoop nutch

我在我的hadoop集群中运行nutch。 当作业进入获取数据时,我得到java.net.SocketException: Connection reset。这是完整的堆栈跟踪:

2013-10-09 00:34:05,922 INFO org.apache.nutch.fetcher.Fetcher: fetch of Url error : xxxxxxx  failed with: java.net.SocketException: Connection reset
2013-10-09 00:34:05,923 ERROR org.apache.nutch.protocol.httpclient.Http: Failed to get protocol output
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:189)
    at java.net.SocketInputStream.read(SocketInputStream.java:121)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
    at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
    at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
    at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)
    at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
    at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
    at org.apache.nutch.protocol.httpclient.HttpResponse.<init>(HttpResponse.java:94)
    at org.apache.nutch.protocol.httpclient.Http.getResponse(Http.java:154)
    at org.apache.nutch.protocol.http.api.HttpBase.getProtocolOutput(HttpBase.java:140)
    at org.apache.nutch.fetcher.Fetcher$FetcherThread.run(Fetcher.java:703)

1 个答案:

答案 0 :(得分:0)

您必须在种子列表中指明url的协议!例如:

http://stackoverflow.com/
https://google.com
ftp://foo.bar