【发布时间】:2020-10-05 04:41:30
【问题描述】:
我在可通过 SSH 访问的远程计算机上使用 dask.distributed,并尝试连接到 Dask 仪表板。我记得之前(在其他虚拟环境中)当我使用 Dask 做我的第一步时,它已经工作了,但现在每当我尝试连接到 http://localhost:8787/ 或 http://localhost:8787/status 时,我都会收到“404 Not found”错误。
由于机器只能通过 SSH 访问,因此我设置了一个 SSH 隧道,以便能够使用我桌面上的浏览器访问仪表板,这给了我 404 - 所以不知何故服务器正在工作并接受连接但不提供页面。此外,使用 lynx 或 telnet 在命令行本地连接到它会产生相同的错误。我还确定端口 8787 上没有运行其他任何东西。
仪表板是否需要额外的软件包才能工作?这是我的环境:
$ pip freeze
click==7.1.2
cloudpickle==1.4.1
dask==2.18.1
distributed==2.18.0
HeapDict==1.0.1
msgpack==1.0.0
numpy==1.18.5
psutil==5.7.0
PyYAML==5.3.1
sortedcontainers==2.2.2
tblib==1.6.0
toolz==0.10.0
tornado==6.0.4
zict==2.0.0
$ python
Python 3.7.5 (default, Nov 12 2019, 11:34:05)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from dask.distributed import Client
>>> client = Client()
>>> client
<Client: 'tcp://127.0.0.1:40076' processes=4 threads=16, memory=135.43 GB>
>>> client.scheduler_info()
{
'type': 'Scheduler',
'id': 'Scheduler-1662a23e-a12b-4640-832e-75c5c45c83b0',
'address': 'tcp://127.0.0.1:40076',
'services': {
'dashboard': 8787
},
'workers': {
'tcp://127.0.0.1:34228': {
'type': 'Worker',
'id': 1,
'host': '127.0.0.1',
'resources': {},
...
从另一个控制台:
$ telnet 127.0.0.1 8787
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET / HTTP/1.0
HTTP/1.1 404 Not Found
Server: TornadoServer/6.0.4
Content-Type: text/html; charset=UTF-8
Date: Mon, 15 Jun 2020 17:34:37 GMT
Content-Length: 69
<html><title>404: Not Found</title><body>404: Not Found</body></html>Connection closed by foreign host.
$
【问题讨论】:
-
Bokeh 2.1 可能存在问题,请参阅github.com/dask/distributed/issues/3741。当我从 Bokeh 2.0 升级到 2.1 时,它也停止工作了。
-
要么降级到 Bokeh 2.0,要么等待新的 dask 分布式版本,请参阅 github.com/dask/distributed/issues/3905。
标签: python http-status-code-404 dashboard dask-distributed