dask-kubernetes: SteamClosedError when creating KubeCluster on Kubeflow
Hi there,
I met this StreamClosedError when I created a cluster with
cluster = KubeCluster.from_yaml('worker-template.yaml') on kubeflow jupyter notebook:
---------------------------------------------------------------------------
StreamClosedError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/distributed/comm/tcp.py in read(self, deserializers)
183 try:
--> 184 n_frames = await stream.read_bytes(8)
185 n_frames = struct.unpack("Q", n_frames)[0]
StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
CommClosedError Traceback (most recent call last)
<ipython-input-4-1d49f9431640> in <module>
----> 1 cluster = KubeCluster.from_yaml('worker-template.yaml')
/opt/conda/lib/python3.7/site-packages/dask_kubernetes/core.py in from_yaml(cls, yaml_path, **kwargs)
309 d = yaml.safe_load(f)
310 d = dask.config.expand_environment_variables(d)
--> 311 return cls.from_dict(d, **kwargs)
312
313 @property
Assumed that the pod doesn’t have enough authorities to create new pods, I created a new role object jupyter-notebook and configured new rolebinding as below (the pod using the default ServiceAccount default-editor):
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
creationTimestamp: "2019-10-16T13:19:58Z"
name: default-editor
namespace: kubeflow-hong-zhu
ownerReferences:
- apiVersion: kubeflow.org/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Profile
name: kubeflow-hong-zhu
uid: 8022a9fa-f017-11e9-ad0d-42010a840259
resourceVersion: "4025"
selfLink: /apis/rbac.authorization.k8s.io/v1/namespaces/kubeflow-hong-zhu/rolebindings/default-editor
uid: a6f95f59-f017-11e9-ad0d-42010a840259
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: jupyter-notebook
subjects:
- kind: ServiceAccount
name: default-editor
namespace: kubeflow-hong-zhu
This however, doesn’t solve the problem. Any thoughts?
Thanks 😃
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (8 by maintainers)
I came across (I think) the same issue. It seems to depend on the version of Istio at least to some extent. On on cluster with
istio 1.2.6I have the error (trace below), but on a similar cluster withIstio 1.3.8and the same resources it works fine!Relevant versions:
I created a service account/role/rolebinding exactly as specified in the docs. I am using my own image instead of the daskdev one and it all worked fine on my local microk8s cluster (without Istio enabled).
Code:
Error message:
Hope this is useful for the dask-kubernetes contributors (#197) or others with the same issue.
Just wanted to confirm that running a notebook without istio, and then starting a Dask cluster (also without Istio) works.
So looks like we/I need to find a way to start using services.
Sry about the mess here, pressed wrong bottom 😂