我在通过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.
$
答案 0 :(得分:1)
谢谢@ weiji14的评论。我注意到甚至没有安装bokeh。安装(2.0)后,仪表板将再次可用。