dask-gateway: `ssl_context` context error when connecting to existing cluster.
I am having issues when connecting to existing clusters in the gateway (0.6.0). When I run:
from dask_gateway import Gateway, BasicAuth
from dask.distributed import Client
gateway = Gateway(
'<web-url>',
proxy_address="'<scheduler-proxy>',",
auth=BasicAuth("", "password")
)
cluster = gateway.new_cluster()
existing_cluster = gateway.connect(cluster.name)
client = Client(existing_cluster)
I get the following error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-33-c12b00e8db36> in <module>
----> 1 client = Client(existing_cluster)
/anaconda3/envs/py37/lib/python3.7/site-packages/distributed/client.py in __init__(self, address, loop, timeout, set_as_default, scheduler_file, security, asynchronous, name, heartbeat_interval, serializers, deserializers, extensions, direct_to_workers, **kwargs)
724 ext(self)
725
--> 726 self.start(timeout=timeout)
727 Client._instances.add(self)
728
/anaconda3/envs/py37/lib/python3.7/site-packages/distributed/client.py in start(self, **kwargs)
889 self._started = asyncio.ensure_future(self._start(**kwargs))
890 else:
--> 891 sync(self.loop, self._start, **kwargs)
892
893 def __await__(self):
/anaconda3/envs/py37/lib/python3.7/site-packages/distributed/utils.py in sync(loop, func, callback_timeout, *args, **kwargs)
332 if error[0]:
333 typ, exc, tb = error[0]
--> 334 raise exc.with_traceback(tb)
335 else:
336 return result[0]
/anaconda3/envs/py37/lib/python3.7/site-packages/distributed/utils.py in f()
316 if callback_timeout is not None:
317 future = gen.with_timeout(timedelta(seconds=callback_timeout), future)
--> 318 result[0] = yield future
319 except Exception as exc:
320 error[0] = sys.exc_info()
/anaconda3/envs/py37/lib/python3.7/site-packages/tornado/gen.py in run(self)
733
734 try:
--> 735 value = future.result()
736 except Exception:
737 exc_info = sys.exc_info()
/anaconda3/envs/py37/lib/python3.7/site-packages/distributed/client.py in _start(self, timeout, **kwargs)
982
983 try:
--> 984 await self._ensure_connected(timeout=timeout)
985 except OSError:
986 await self._close()
/anaconda3/envs/py37/lib/python3.7/site-packages/distributed/client.py in _ensure_connected(self, timeout)
1039 self.scheduler.address,
1040 timeout=timeout,
-> 1041 connection_args=self.connection_args,
1042 )
1043 comm.name = "Client->Scheduler"
/anaconda3/envs/py37/lib/python3.7/site-packages/distributed/comm/core.py in connect(addr, timeout, deserialize, connection_args)
216 timedelta(seconds=min(deadline - time(), 1)),
217 future,
--> 218 quiet_exceptions=EnvironmentError,
219 )
220 break
/anaconda3/envs/py37/lib/python3.7/site-packages/dask_gateway/comm.py in connect(self, address, deserialize, **connection_args)
39 raise TypeError(
40 "Gateway expects a `ssl_context` argument of type "
---> 41 "ssl.SSLContext, instead got %s" % ctx
42 )
43
TypeError: Gateway expects a `ssl_context` argument of type ssl.SSLContext, instead got None
Do anyone have advice for getting around this?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (8 by maintainers)
Version 0.6.1 has been released. It’s available on PyPI, should be on conda-forge shortly. Docker images and helm chart have been updated accordingly.
I’d love for another contributor to this project! That said, I’m giving a talk on dask-gateway this weekend and would like this bug fixed by then and a bugfix release out. If you don’t think you can get a patch in by EOD tomorrow then I’ll probably need to take this one on myself (sorry).