Dask Hub/JupyterHub - Cannot start Python Kernel

325 views Asked by At

I deployed Dask Hub (Dask Gateway + Jupyterhub) on Google Kubernetes Engine using helm. I am experiencing trouble fetching the Python Kernel when I start up my jupyter notebook instance. This error occurs when I am on my company's VPN, but no error occurs when I'm not on my company's VPN. I'm going to guess that this is firewall related, but I don't know enough about the internal of the Jupyterhub kernel to understand why it's being blocked. Could someone please shed some light on this?

enter image description here

I can't see anything wrong from inspecting the logs of the jupyter pod:

enter image description here

From the Browser's Developer Console, here is the error:

enter image description here

Update:

I added the following to the Jupyterhub config:

jupyterhub:
  hub:
    extraConfig: |
        c.JupyterHub.hub_connect_ip = '0.0.0.0'
        c.JupyterHub.hub_bind_url = 'http://127.0.0.1:8000'
  singleuser:
    extraEnv:
      DASK_GATEWAY__CLUSTER__OPTIONS__IMAGE: '{JUPYTER_IMAGE_SPEC}'
1

There are 1 answers

3
Cloudkollektiv On

This has definitely something to do with the routing of your VPN. I don't know which spawner you are using, but here are some possible solutions:

  1. Check if you have the correct settings for the following configuration options. The hub.connect.ip is important for the internal workings of Jupyterhub. bind_url is important for external traffic.

    c.JupyterHub.hub_connect_ip = '0.0.0.0'
    c.JupyterHub.bind_url = 'http://127.0.0.1:8000'
    
  2. Switch protocols for your VPN if possible. Try switching from UDP to TCP (if possible at all).

  3. Enforce an SSL connection for Jupyterhub. The VPN provider of your company could block non-secure connections. Read the documentation for Jupyterhub to enable SSL. Alternatively, you could also go for GKE managed certificates, more information can be found here.