Connection to dask gateway server goes down after a while with JupyterHub authentication

100 Views Asked by At

I am doing a multi user setup with DaskHub and JupyterHub with the use of Daskgateway servers but my connection to dask-gateway servers fails with error after a while:

Error

[I 2023-04-24 09:51:14.477 DaskGateway] Creating cluster jhub.6b1db15befa34f6cb9e3abaa38099f1b for user test
[I 2023-04-24 09:51:14.493 DaskGateway] 201 POST /api/v1/clusters/ 30.877ms
[I 2023-04-24 09:51:34.513 DaskGateway] 200 GET /api/v1/clusters/jhub.6b1db15befa34f6cb9e3abaa38099f1b?wait 20001.169ms
[I 2023-04-24 09:51:55.021 DaskGateway] 200 GET /api/v1/clusters/jhub.6b1db15befa34f6cb9e3abaa38099f1b?wait 20001.478ms
[W 2023-04-24 09:52:05.562 DaskGateway] 404 GET / 0.587ms
[I 2023-04-24 09:52:15.530 DaskGateway] 200 GET /api/v1/clusters/jhub.6b1db15befa34f6cb9e3abaa38099f1b?wait 20001.511ms
[I 2023-04-24 09:52:36.040 DaskGateway] 200 GET /api/v1/clusters/jhub.6b1db15befa34f6cb9e3abaa38099f1b?wait 20003.526ms
[I 2023-04-24 09:52:46.935 DaskGateway] 200 GET /api/v1/clusters/jhub.6b1db15befa34f6cb9e3abaa38099f1b?wait 10387.750ms
[W 2023-04-24 09:53:05.562 DaskGateway] 404 GET / 0.659ms
[I 2023-04-24 09:54:03.370 DaskGateway] Cluster jhub.88d0cbe73d7c4a3da1c1b9926a445a5f heartbeat [count: 0, n_active: 0, n_closing: 0, n_closed: 0]
[I 2023-04-24 09:54:03.387 DaskGateway] 200 POST /api/v1/clusters/jhub.88d0cbe73d7c4a3da1c1b9926a445a5f/heartbeat 17.781ms
[W 2023-04-24 09:54:05.562 DaskGateway] 404 GET / 0.505ms
[W 2023-04-24 09:55:05.561 DaskGateway] 404 GET / 0.515ms
[W 2023-04-24 09:56:05.562 DaskGateway] 404 GET / 0.732ms
[W 2023-04-24 09:57:05.561 DaskGateway] 404 GET / 0.526ms

Connection string used:

from dask_gateway import Gateway
gateway = Gateway(
    address="http://traefik-dask-gateway/services/dask-gateway/",
    public_address="https://jupyter-hub01.devops.h2.theagilehub.net/services/dask-gateway/",
    auth="jupyterhub")
gateway.list_clusters()

Helm chart config values:

jupyterhub:
  proxy:
    secretToken: "<token1>"
  hub:
    services:
      dask-gateway:
        apiToken: "<token2>"
    networkPolicy:
      enabled: false
  ingress:
    enabled: true
    ingressClassName: pomerium
    tls:
      - secretName: jupyter-hub-tls
        hosts:
          - jupyter-hub01.devops.h2.theagilehub.net
    hosts:
      - jupyter-hub01.devops.h2.theagilehub.net
    annotations:
      cert-manager.io/cluster-issuer: letsencrypt-prod
      ingress.pomerium.io/allow_websockets: "true"
      ingress.pomerium.io/pass_identity_headers: 'true'
      ingress.pomerium.io/preserve_host_header: 'true'
      ingress.pomerium.io/policy: |
        [{
          "allow": {
            "or": [
              {"claim/cognito:groups": "eu-west-1_ryHLiyRp9_shell-dev"}
            ]
          }
          }]
dask-gateway:
  gateway:
    auth:
      type: jupyterhub
      jupyterhub:
        apiToken: "<token2>"

Can someone please help me with the same?

enter image description here

0

There are 0 best solutions below