15

I'm in the process of setting up a Juypter server to host my notebooks on.

In /home/user/.jupyter/notebook_configuration.py

c.NotebookApp.certfile = u'/home/user/.jupyter/mycert.pem'
c.NotebookApp.keyfile = u'/home/user/.jupyter/mykey.key'

And if I ran on the console

jupyter notebook --ip="ip_address" --port=8000 --certfile=mycert.pem --keyfile mykey.key

The server and the certificate worked!

However, when I set up a DNS entry and attempt to route to the server I ran into this error

SSL Error on 10 ('ip_address', 63748): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:600)

What's going on?

AlexLordThorsen
  • 8,057
  • 5
  • 48
  • 103

1 Answers1

23

The problem is a super simple one that took me longer to figure out than it really should have.

By default the address that the console gives you is a https address to route to. https works.

But if you enter

your_url.com

it'll take you to http://your_url.com. If you set up TSL certs for your server your http routes don't work anymore and Jupyter doesn't come with a reroute to https out of the box.

Work Around: use https instead

My Long Term Solution: I ended up hosting my Jupyter notebook behind apache.

AlexLordThorsen
  • 8,057
  • 5
  • 48
  • 103
  • 1
    Worked perfect, just want to add that your browser might warn you that the connection is not private if you use https://... but as long as you don't mind you can ignore that warning. – Rene Pickhardt Nov 28 '16 at 17:15
  • 2
    This saved me potentially an hour of googling around for a solution. Thanks!!!!!!! – Heavy Breathing Jan 23 '17 at 23:04
  • I don't understand the solution. What needs to be changed? I believe I have the same issue. When I put in the propped notebook link, e.g. https://0.0.0.0:8888/, Safari/Chrome won't let me bypass certificate concerns to load the page. And I get a SSL error message as OP. – Justina Pinch Jan 13 '22 at 01:39
  • `0.0.0.0:8888` is probably a shorthand for `http://0.0.0.0:8888`. Try typing in explicitly `https://0.0.0.0:8888` – AlexLordThorsen Jan 14 '22 at 19:48