Help needed: problem proxying websocket connection to vscode

Hi all!

We’re trying to set up vscode to run via jupyter-server-proxy up on our jupyterhub that runs a single node DockerSpawner behind an external nginx proxy. We see the following situation:

  • Running the image locally without a proxy allows to use vscode.
  • Connecting to jupyterlab or classic notebook on the hub works normally.
  • Trying to connect to vscode on the hub results in the following confusing set of errors:

I guess that we are missing some configuration of the proxy, but I couldn’t find any docs for this. Do you know what’s wrong or where I could find out more?

Thanks in advance!

Did you configure websockets in your Nginx config? There’s an example here:
https://jupyterhub.readthedocs.io/en/stable/reference/config-proxy.html#nginx

If that doesn’t help could you paste your Nginx config here?

Thanks! Turns out our proxy config was from prehistoric times and had different rules for different paths. Following the manual to the letter fixed everything.