404 trying to find autoload.js when running Jupyter notebook on remote machine

Running the example here: bokeh/notebook_embed.ipynb at 2.2.3 · bokeh/bokeh · GitHub returns the following Javascript error after the call to show(...):

GET https://localhost:41731/autoload.js?bokeh-autoload-element=1002&bokeh-absolute-url=https://localhost:41731&resources=none net::ERR_CONNECTION_REFUSED

I am ssh’ng and into a remote machine and port forwarding from local port 9999 to 8889, so that my Jupyter notebook is accessible on my dev machine from https://localhost:8889. I tried setting notebook_url="http://localhost:8889" but I get the same error.

OS: Ubuntu Linux 18.04
Python: 3.7

So I’ve done this …

show(modify_doc, notebook_url="https://localhost:8889", port=5006)

… and the error is now:

GET https://localhost:5006/autoload.js?bokeh-autoload-element=1002&bokeh-absolute-url=https://localhost:5006&resources=none

BUT … if I get rid of the “https” and just use “http”, I can get to that ‘autoreload.js’. So, is there a way to tell bokeh to use http even when my jupyter notebook is running over https?

SOLVED

This is the configuration thats needed for running things over ssl:

show(plot_emb_app, notebook_url="https://localhost:8889", port=5006, 
     ssl_certfile="/home/user/mycert.pem", 
     ssl_keyfile="/home/user/mycert.key")
1 Like