设置公共Juypter服务器时使用SSL:WRONG_VERSION_NUMBER [英] SSL: WRONG_VERSION_NUMBER when setting up public Juypter server

查看:916
本文介绍了设置公共Juypter服务器时使用SSL:WRONG_VERSION_NUMBER的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置Juypter服务器来托管我的笔记本.

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

/home/user/.jupyter/notebook_configuration.py

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

如果我在控制台上运行

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

服务器和证书有效!

但是,当我设置DNS条目并尝试路由到服务器时,遇到了此错误

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)

这是怎么回事?

推荐答案

问题是一个非常简单的问题,使我花了更长的时间才能弄清楚它应有的程度.

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

默认情况下,控制台为您提供的地址是要路由到的https地址. https有效.

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

但是,如果您输入

your_url.com

它将带您到http://your_url.com.如果您为服务器设置了TSL证书,则HTTP路由将不再起作用,并且Jupyter也不会立即提供重新路由到https的功能.

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.

变通办法:使用https代替

Work Around: use https instead

我的长期解决方案:我最终将我的Jupyter笔记本托管在apache后面.

这篇关于设置公共Juypter服务器时使用SSL:WRONG_VERSION_NUMBER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆