最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【已解决】pyspider运行出错:Error Could not create web server listening on port 25555

pyspider crifan 2122浏览 0评论

折腾:

【已解决】写Python爬虫爬取汽车之家品牌车系车型数据

期间,去运行pyspider,结果出错:

<code>➜  AutocarData pyspider
Error: Could not create web server listening on port 25555
[I 180421 14:48:04 result_worker:49] result_worker starting...
[I 180421 14:48:04 tornado_fetcher:638] fetcher starting...
[I 180421 14:48:05 processor:211] processor starting...
[I 180421 14:48:05 scheduler:647] scheduler starting...
[I 180421 14:48:05 scheduler:782] scheduler.xmlrpc listening on 127.0.0.1:23333
[I 180421 14:48:05 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0
[I 180421 14:48:05 app:76] webui running on 0.0.0.0:5000
Error: Could not create web server listening on port 25555
Error: Could not create web server listening on port 25555
Error: Could not create web server listening on port 25555
Error: Could not create web server listening on port 25555
Error: Could not create web server listening on port 25555
^C[I 180421 14:48:15 processor:229] processor exiting...
[I 180421 14:48:15 app:84] webui exiting...
[I 180421 14:48:15 tornado_fetcher:671] fetcher exiting...
[I 180421 14:48:15 result_worker:66] result_worker exiting...
[I 180421 14:48:15 scheduler:663] scheduler exiting...
</code>

pyspider Error Could not create web server listening on port 25555

Error: Could not create web server listening on port 25555 · Issue #423 · binux/pyspider

“Reboot the PC,or remove phantomjs can fix it.”

升级后pyspider不启动,一直停留在web server running on port 25555 – SegmentFault 思否

Could not create web server listening on port 25555 – 爬虫 – Sunaloe

how to use more phantomjs instances to reduce the concurrent requests to phantomjs? – Google Groups

去看看端口占用情况:

【已解决】Mac中如何查看正在使用的端口及其进程ID

然后去kill掉phantmojs:

<code>➜  AutocarData lsof -i:25555
COMMAND     PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
phantomjs 46971 crifan   12u  IPv4 0xe4d24cdcaf5e481f      0t0  TCP *:25555 (LISTEN)
➜  AutocarData kill  46971
➜  AutocarData lsof -i:25555
</code>

然后再去试试

就可以了:

<code>➜  AutocarData pyspider
phantomjs fetcher running on port 25555
[I 180421 15:24:30 result_worker:49] result_worker starting...
[I 180421 15:24:30 processor:211] processor starting...
[I 180421 15:24:30 scheduler:647] scheduler starting...
[I 180421 15:24:30 tornado_fetcher:638] fetcher starting...
[I 180421 15:24:30 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0
[I 180421 15:24:30 scheduler:782] scheduler.xmlrpc listening on 127.0.0.1:23333
[I 180421 15:24:30 app:76] webui running on 0.0.0.0:5000
</code>

然后访问:

http://0.0.0.0:5000

看到了:

【总结】

此处出错的原因是:

对应的25555端口被占用了。

解决办法:

Mac中,找到该端口被谁占用,找到其pid,通过pid去kill掉即可:

<code>➜  AutocarData lsof -i:25555
COMMAND     PID   USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
phantomjs 46971 crifan   12u  IPv4 0xe4d24cdcaf5e481f      0t0  TCP *:25555 (LISTEN)
➜  AutocarData kill  46971
</code>

即可把占用了25555端口的phantomjs,通过其pid去kill掉了。

再去运行pyspider就可以了。

转载请注明:在路上 » 【已解决】pyspider运行出错:Error Could not create web server listening on port 25555

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
60 queries in 0.113 seconds, using 19.03MB memory