wget Connection reset by peer | curl: (56)
Dec 3rd,2011
发表评论
[root@vps1 ce]# curl -v http://9.douban.com/site/entry/200760330/view
* About to connect() to 9.douban.com port 80 (#0)
* Trying 211.147.4.31... connected
* Connected to 9.douban.com (211.147.4.31) port 80 (#0)
> GET /site/entry/200760330/view HTTP/1.1
> User-Agent: curl/7.23.1 (x86_64-unknown-linux-gnu) libcurl/7.19.7 NSS/3.12.6.2 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: 9.douban.com
> Accept: */*
>
* Closing connection #0
* Failure when receiving data from the peer
curl: (56) Failure when receiving data from the peer
[root@vps1 ce]# wget -d http://9.douban.com/site/entry/200760330/view
DEBUG output created by Wget 1.12 on linux-gnu.
--2011-12-03 10:55:04-- http://9.douban.com/site/entry/200760330/view
Resolving 9.douban.com... 211.147.4.31
Caching 9.douban.com => 211.147.4.31
Connecting to 9.douban.com|211.147.4.31|:80... connected.
Created socket 3.
Releasing 0x00000000027a30c0 (new refcount 1).
---request begin---
GET /site/entry/200760330/view HTTP/1.0
User-Agent: Wget/1.12 (linux-gnu)
Accept: */*
Host: 9.douban.com
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 302 Moved Temporarily
Server: nginx
Content-Type: text/plain
Connection: keep-alive
Keep-Alive: timeout=10
Content-Length: 92
Expires: Sun, 1 Jan 2006 01:00:00 GMT
Location: http://www.unicornblog.cn/user1/gemsoo/28774.html
Pragma: no-cache
Cache-Control: must-revalidate, no-cache, private
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Set-Cookie: bid="PpOvI75T7j8"; path=/; domain=.douban.com; expires=Thu, 01-Jan-2012 00:00:00 GMT
Date: Sat, 03 Dec 2011 02:55:05 GMT
---response end---
302 Moved Temporarily
cdm: 1 2 3 4 5 6 7 8
Stored cookie douban.com -1 (ANY) / <permanent> <insecure> [expiry 2012-01-01 08:00:00] bid PpOvI75T7j8
Registered socket 3 for persistent reuse.
Location: http://www.unicornblog.cn/user1/gemsoo/28774.html [following]
Skipping 92 bytes of body: [Your browser should have redirected you to http://www.unicornblog.cn/user1/gemsoo/28774.html] done.
--2011-12-03 10:55:05-- http://www.unicornblog.cn/user1/gemsoo/28774.html
Disabling further reuse of socket 3.
Closed fd 3
Resolving www.unicornblog.cn... 122.224.9.114
Caching www.unicornblog.cn => 122.224.9.114
Connecting to www.unicornblog.cn|122.224.9.114|:80... connected.
Created socket 3.
Releasing 0x00000000027a1ec0 (new refcount 1).
wget、curl如果出现这些错误,原因可能是多方面的,不过更常见的原因是:1:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;2:客户关掉了浏览器,而服务器还在给客户端发送数据;3:浏览器端按了Stop
目前测试这种问题常出现在境外机器对国内的访问,不知道有没什么特殊原因,如”长城…”
Normally this error will resolve itself but if it continues you may need to troubleshoot this with your web hosting company.
Note that there are some issues with TCP window scaling on some Linux kernels after v2.6.17. See the following bug reports for more information:
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/59331
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/89160
声明: 本文采用 BY-NC-SA 协议进行授权. 转载请注明转自: wget Connection reset by peer | curl: (56)
评论 (0)
Trackbacks (0)
发表评论
Make a trackback