JupyterHub in Docker and Nginx on host: Websocket problem

I’m using the official Nginx proxy settings, including websocket configuration as presented in the official documentation: https://jupyterhub.readthedocs.io/en/stable/reference/config-proxy.html#nginx Server starts, and the Jupyter main page loads, however, I keep getting Websocket errors in the Chrome developer console:

WebSocket connection to 'ws://localhost/api/events/subscribe?token=8acfafc93ec11a9acfeeb21f680d8008a4a0def370750ace' failed:

It looks like the offiicial Nginx config no longer works with the official Jupyter containers. Could someone confirm, please? If it worked for you, what was your container hash?

If this is with JupyterHub, I suspect you might be hitting this issue using the legacy notebook server, which doesn’t provide this endpoint. Check the single-user server logs to see if it says it’s starting “Jupyter Server” or “Notebook” and the version.

You can specifically launch jupyter-server with JUPYTERHUB_SINGLEUSER_APP=jupyter-server in the spawner environment.