请问如何解决HTTP 599: Recv failure: Connection reset by peer错误。
页面访问正常。
track.fetch 13824.35ms
{
"content": "",
"encoding": null,
"error": "HTTP 599: Recv failure: Connection reset by peer",
"headers": {},
"ok": false,
"redirect_url": null,
"status_code": 599,
"time": 13.82435154914856
}
track.process 0.15ms
HTTP 599: Recv failure: Connection reset by peer
[E 161205 18:03:46 base_handler:195] HTTP 599: Recv failure: Connection reset by peer
Traceback (most recent call last):
File "/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/base_handler.py", line 188, in run_task
result = self._run_task(task, response)
File "/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/base_handler.py", line 167, in _run_task
response.raise_for_status()
File "/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/response.py", line 190, in raise_for_status
raise http_error
requests.exceptions.HTTPError: HTTP 599: Recv failure: Connection reset by peer
{
"exception": "HTTP 599: Recv failure: Connection reset by peer",
"follows": 0,
"logs": "[E 161205 18:03:46 base_handler:195] HTTP 599: Recv failure: Connection reset by peer\n Traceback (most recent call last):\n File \"/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/base_handler.py\", line 188, in run_task\n result = self._run_task(task, response)\n File \"/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/base_handler.py\", line 167, in _run_task\n response.raise_for_status()\n File \"/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/response.py\", line 190, in raise_for_status\n raise http_error\n requests.exceptions.HTTPError: HTTP 599: Recv failure: Connection reset by peer\n",
"ok": false,
"result": null,
"time": 0.00014662742614746094
}
fetch
{
"fetch_type": "js"
}
process
{
"callback": "detail_page"
}
schedule
{
"exetime": 1480932256.3733845,
"itag": "v2",
"priority": 2,
"retried": 1
}
这个应该是你的HTTP头不对,和网站的对比看看差别吧