SSL: WRONG_VERSION_NUMBER when setting up public Juypter server

萝らか妹 提交于 2019-12-20 10:17:34

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/34345605/ssl-wrong-version-number-when-setting-up-public-juypter-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!