Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL: WRONG_VERSION_NUMBER when setting up public Juypter server

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?

like image 328
AlexLordThorsen Avatar asked Dec 17 '15 22:12

AlexLordThorsen


1 Answers

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.

like image 180
AlexLordThorsen Avatar answered Oct 02 '22 16:10

AlexLordThorsen