Splash UI 未在 windows 开始
Splash UI doesn't start on windows
我已经使用 Docker 工具箱和 Docker 快速启动终端在 docker 上设置了 splash。它给出了这个输出:
$ docker run -p 8050:8050 scrapinghub/splash
2018-02-27 14:29:21+0000 [-] Log opened.
2018-02-27 14:29:21.129146 [-] Splash version: 3.2
2018-02-27 14:29:21.136203 [-] Qt 5.9.1, PyQt 5.9, WebKit 602.1, sip 4.19.3, Twisted 16.1.1, Lua 5.2
2018-02-27 14:29:21.138036 [-] Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609]
2018-02-27 14:29:21.139606 [-] Open files limit: 1048576
2018-02-27 14:29:21.140590 [-] Can't bump open files limit
2018-02-27 14:29:21.263294 [-] Xvfb is started: ['Xvfb', ':1117575427', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2018-02-27 14:29:21.962490 [-] proxy profiles support is enabled, proxy profiles path: /etc/splash/proxy-profiles
2018-02-27 14:29:22.400764 [-] verbosity=1
2018-02-27 14:29:22.402173 [-] slots=50
2018-02-27 14:29:22.403916 [-] argument_cache_max_entries=500
2018-02-27 14:29:22.406959 [-] Web UI: enabled, Lua: enabled (sandbox: enabled)
2018-02-27 14:29:22.410192 [-] Server listening on 0.0.0.0:8050
2018-02-27 14:29:22.415698 [-] Site starting on 8050
2018-02-27 14:29:22.419534 [-] Starting factory <twisted.web.server.Site object at 0x7ff34b2557f0>
然后我按照 Splash 指南的说明进行操作:
Splash UI provides an easy way to try scripts: there is a code editor for Lua and a button to submit a script to execute. Visit http://127.0.0.1:8050/ (or whatever host/port Splash is listening to).
但是我打不开地址。
来自日志:
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 26 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 27 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 27 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 28 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 28 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.226373 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 29 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.226373 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 29 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.233242 ERROR [COM]: aRC=E_FAIL (0x80004005) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={This machine does not have any snapshots}, preserve=false aResultDetail=0
由于格式奇怪,我无法识别记录的时间。谁能告诉我打不开 splash 的问题出在哪里 UI?
我找到了一个解决方案,我在这里报告是因为该指南对初学者的误导性很小...
它建议:
Splash UI provides an easy way to try scripts: there is a code editor for Lua and a button to submit a script to execute. Visit http://127.0.0.1:8050/ (or whatever host/port Splash is listening to).
不了解 Docker 的人可能会认为它在默认情况下可在 127.0.0.1 访问。事实上,作为一个虚拟机,它有自己的 IP 地址,可能与 localhost 不同。因此,您必须改为插入 XX.XX.XX.XX:port,将虚拟机的正确位置和您设置的端口替换为 XX。
我已经使用 Docker 工具箱和 Docker 快速启动终端在 docker 上设置了 splash。它给出了这个输出:
$ docker run -p 8050:8050 scrapinghub/splash
2018-02-27 14:29:21+0000 [-] Log opened.
2018-02-27 14:29:21.129146 [-] Splash version: 3.2
2018-02-27 14:29:21.136203 [-] Qt 5.9.1, PyQt 5.9, WebKit 602.1, sip 4.19.3, Twisted 16.1.1, Lua 5.2
2018-02-27 14:29:21.138036 [-] Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609]
2018-02-27 14:29:21.139606 [-] Open files limit: 1048576
2018-02-27 14:29:21.140590 [-] Can't bump open files limit
2018-02-27 14:29:21.263294 [-] Xvfb is started: ['Xvfb', ':1117575427', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2018-02-27 14:29:21.962490 [-] proxy profiles support is enabled, proxy profiles path: /etc/splash/proxy-profiles
2018-02-27 14:29:22.400764 [-] verbosity=1
2018-02-27 14:29:22.402173 [-] slots=50
2018-02-27 14:29:22.403916 [-] argument_cache_max_entries=500
2018-02-27 14:29:22.406959 [-] Web UI: enabled, Lua: enabled (sandbox: enabled)
2018-02-27 14:29:22.410192 [-] Server listening on 0.0.0.0:8050
2018-02-27 14:29:22.415698 [-] Site starting on 8050
2018-02-27 14:29:22.419534 [-] Starting factory <twisted.web.server.Site object at 0x7ff34b2557f0>
然后我按照 Splash 指南的说明进行操作:
Splash UI provides an easy way to try scripts: there is a code editor for Lua and a button to submit a script to execute. Visit http://127.0.0.1:8050/ (or whatever host/port Splash is listening to).
但是我打不开地址。 来自日志:
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 26 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 27 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 27 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 28 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.225391 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 28 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.226373 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 29 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.226373 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={No storage device attached to device slot 0 on port 29 of controller 'SATA'}, preserve=false aResultDetail=0
00:19:47.233242 ERROR [COM]: aRC=E_FAIL (0x80004005) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={This machine does not have any snapshots}, preserve=false aResultDetail=0
由于格式奇怪,我无法识别记录的时间。谁能告诉我打不开 splash 的问题出在哪里 UI?
我找到了一个解决方案,我在这里报告是因为该指南对初学者的误导性很小... 它建议:
Splash UI provides an easy way to try scripts: there is a code editor for Lua and a button to submit a script to execute. Visit http://127.0.0.1:8050/ (or whatever host/port Splash is listening to).
不了解 Docker 的人可能会认为它在默认情况下可在 127.0.0.1 访问。事实上,作为一个虚拟机,它有自己的 IP 地址,可能与 localhost 不同。因此,您必须改为插入 XX.XX.XX.XX:port,将虚拟机的正确位置和您设置的端口替换为 XX。