简体   繁体   English

Scrapy Splash 服务器未通过 docker run 启动

[英]Scrapy Splash server not starting via docker run

Installed docker, scrapyjs, and splash per alexce's instructions here .安装搬运工,scrapyjs,飞溅每alexce的指示在这里

Then, running docker run -p 8050:8050 scrapinghub/splash , I get this output:然后,运行docker run -p 8050:8050 scrapinghub/splash ,我得到这个输出:

2016-05-08 17:17:45+0000 [-] Log opened.
2016-05-08 17:17:45.978866 [-] Splash version: 2.1
2016-05-08 17:17:45.979553 [-] Qt 5.5.1, PyQt 5.5.1, WebKit 538.1, sip 4.17, Twisted 16.1.1, Lua 5.2
2016-05-08 17:17:45.980138 [-] Python 3.4.3 (default, Oct 14 2015, 20:28:29) [GCC 4.8.4]
2016-05-08 17:17:45.980401 [-] Open files limit: 1048576
2016-05-08 17:17:45.981020 [-] Can't bump open files limit
2016-05-08 17:17:46.086232 [-] Xvfb is started: ['Xvfb', ':1', '-screen', '0', '1024x768x24']
2016-05-08 17:17:46.161902 [-] proxy profiles support is enabled, proxy profiles path: /etc/splash/proxy-profiles
2016-05-08 17:17:46.260357 [-] verbosity=1
2016-05-08 17:17:46.260607 [-] slots=50
2016-05-08 17:17:46.261170 [-] argument_cache_max_entries=500
2016-05-08 17:17:46.262476 [-] Web UI: enabled, Lua: enabled (sandbox: enabled)
2016-05-08 17:17:46.264565 [-] Site starting on 8050
2016-05-08 17:17:46.265203 [-] Starting factory <twisted.web.server.Site object at 0x7f270ec81e10>

And it hangs up there.它挂在那里。 I tried troubleshooting based on instructions here (reinstalled docker, verify vm is running, regenerate certs, set env) but still nothing.我尝试根据此处的说明进行故障排除(重新安装 docker,验证 vm 正在运行,重新生成证书,设置 env)但仍然没有。

My settings file and Spider我的设置文件蜘蛛

When running the spider without the meta= parameter in the yield scrapy.Request' call within start_requests`, the spider runs fine (except that the dynamic fields are not captured), so I'm not sure if this is an issue with docker or splash. yield scrapy.Request' call within start_requests` 中的yield scrapy.Request' call within运行没有meta=参数的蜘蛛时,蜘蛛运行良好(除了未捕获动态字段),所以我不确定这是否是 docker 或溅。

thanks in advance.提前致谢。

When running Splash with Docker, the console will, at first, just "hang there", indeed.当使用 Docker 运行 Splash 时,控制台首先会“挂在那里”,确实。 Splash is waiting for a request through one of its endpoints. Splash 正在等待通过其端点之一的请求。

$ sudo docker run -p 8050:8050 scrapinghub/splash
2016-05-09 10:21:42+0000 [-] Log opened.
2016-05-09 10:21:42.773541 [-] Splash version: 2.1
2016-05-09 10:21:42.774298 [-] Qt 5.5.1, PyQt 5.5.1, WebKit 538.1, sip 4.17, Twisted 16.1.1, Lua 5.2
2016-05-09 10:21:42.774453 [-] Python 3.4.3 (default, Oct 14 2015, 20:28:29) [GCC 4.8.4]
2016-05-09 10:21:42.774632 [-] Open files limit: 1048576
2016-05-09 10:21:42.774842 [-] Can't bump open files limit
2016-05-09 10:21:42.879868 [-] Xvfb is started: ['Xvfb', ':1', '-screen', '0', '1024x768x24']
2016-05-09 10:21:43.072351 [-] proxy profiles support is enabled, proxy profiles path: /etc/splash/proxy-profiles
2016-05-09 10:21:43.214478 [-] verbosity=1
2016-05-09 10:21:43.214617 [-] slots=50
2016-05-09 10:21:43.214703 [-] argument_cache_max_entries=500
2016-05-09 10:21:43.215195 [-] Web UI: enabled, Lua: enabled (sandbox: enabled)
2016-05-09 10:21:43.217494 [-] Site starting on 8050
2016-05-09 10:21:43.217635 [-] Starting factory <twisted.web.server.Site object at 0x7f529d0fee48>

To test if Splash is running correctly, try its web UI at http://localhost:8050/要测试 Splash 是否正常运行,请在http://localhost:8050/尝试其 Web UI

You should see something like:你应该看到类似的东西:

在此处输入图片说明

And you can then try entering some URL and clicking "Render me!"然后您可以尝试输入一些 URL 并单击“呈现给我!”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM