Почему я не могу получить дескриптор клиента с помощью dask-gateway для кластера dask
Я развернул диаграммы руля dask-hub в кластере GKE kubernetes с dask-gateway, предоставленным в качестве службы jupyterhub. Я могу подключиться к шлюзу и запросить мои текущие кластеры в порядке. Однако, когда я прошу клиента подключиться к кластеру, я получаю тайм-аут.
Я сделал минимальную тестовую программу, чтобы показать проблему:
from dask_gateway import Gateway
with Gateway("https://daskhub-uat.example.com/services/dask-gateway",
auth="jupyterhub") as gateway:
print(f"Gateway address: {gateway.address}")
clusters = gateway.list_clusters()
for cluster in clusters:
print(f"Cluster: {cluster.name}")
cluster = gateway.connect(clusters[0].name)
print(f"Using cluster: {cluster.name}")
with cluster.get_client() as client:
print(f"Using client: {client}")
Выполнение этого показывает, что я могу аутентифицироваться, перечислять кластеры, подключаться к кластеру, однако, когда я запрашиваю клиента, я получаю тайм-аут.
╰─➤ python test.py 1 ↵
Gateway address: https://daskhub-uat.example.com/services/dask-gateway
Cluster: default.0d95ce5e8bb24d2c92fa0737fb75182b
Using cluster: default.0d95ce5e8bb24d2c92fa0737fb75182b
Traceback (most recent call last):
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/distributed/comm/core.py", line 286, in connect
comm = await asyncio.wait_for(
File "/home/pti/.pyenv/versions/3.8.6/lib/python3.8/asyncio/tasks.py", line 498, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "test.py", line 15, in <module>
with cluster.get_client() as client:
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/dask_gateway/client.py", line 1078, in get_client
client = Client(
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/distributed/client.py", line 748, in __init__
self.start(timeout=timeout)
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/distributed/client.py", line 956, in start
sync(self.loop, self._start, **kwargs)
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/distributed/utils.py", line 340, in sync
raise exc.with_traceback(tb)
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/distributed/utils.py", line 324, in f
result[0] = yield future
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/distributed/client.py", line 1046, in _start
await self._ensure_connected(timeout=timeout)
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/distributed/client.py", line 1103, in _ensure_connected
comm = await connect(
File "/home/pti/.local/share/virtualenvs/brol-6JQtX1Y9/lib/python3.8/site-packages/distributed/comm/core.py", line 308, in connect
raise IOError(
OSError: Timed out trying to connect to gateway://daskhub-uat.example.com:443/default.0d95ce5e8bb24d2c92fa0737fb75182b after 10 s
Шлюз кажется мне странным, поскольку отсутствует путь к службе шлюза в jupyterhub.
У меня установлены следующие пакеты pip (по сути , pip install dask-gateway в новой версии), и кластер использует диаграмму управления daskgateway-0.9.0 как часть диаграммы управления daskhub.
╰─➤ pip list 1 ↵
Package Version
----------------- --------
aiohttp 3.7.3
async-timeout 3.0.1
attrs 20.3.0
chardet 3.0.4
click 7.1.2
cloudpickle 1.6.0
dask 2021.1.1
dask-gateway 0.9.0
distributed 2021.1.1
HeapDict 1.0.1
idna 3.1
msgpack 1.0.2
multidict 5.1.0
pip 20.0.2
psutil 5.8.0
PyYAML 5.4.1
setuptools 46.1.3
sortedcontainers 2.3.0
tblib 1.7.0
toolz 0.11.1
tornado 6.1
typing-extensions 3.7.4.3
wheel 0.34.2
yarl 1.6.3
zict 2.0.0