Home Ask Login Register

Developers Planet

Your answer is one click away!

awb99 February 2016

Jupyter websocket issue

I have a debian Jupyter running on port 8888.

I want to make it easier to connect to my server,so I have a node.js app running that forwards request to jupyter.mydomain.com:80 to port 8888, andother domains to other ports.

This way I dont have to remember the ports of different apps, and instead can refer to the server with different dns names. All the different names are setup as a links in the dns server.

Now Jupyter works this way; but the Websockets that report the result of calculations do not due to security error.

Is there any setting how I can get this to work?




minrk February 2016

node-http-proxy is a node proxy that supports websockets. Your node app that's proxying requests must also proxy websocket connections.

JupyterHub is a multi-user server for spawning and authenticating single-user notebook servers, and it uses configurable-http-proxy, a subclass of node-http-proxy that adds some live configuration, to relay connections to notebooks. If you use NHP or CHP for your proxy app, the websockets should work.

From the node-http-proxy readme:

You can activate the websocket support for the proxy using ws:true in the options.

// Create a proxy server for websockets
  target: 'ws://localhost:9014',
  ws: true

Post Status

Asked in February 2016
Viewed 3,493 times
Voted 14
Answered 1 times


Leave an answer

Quote of the day: live life