简体   繁体   中英

jupyter SSL: WRONG_VERSION_NUMBER

My Jupyter config like this:

# encoding=utf-8
c = get_config()
c.IPKernelApp.pylab = 'inline'
c.NotebookApp.certfile = u'/root/.ipython/profile_txz_server/mycert.pem'
c.NotebookApp.client_ca = u'/root/.ipython/profile_txz_server/mycert.pem'

c.NotebookApp.password = u'sha1:4a46aefd018f:170840e2f9af032488....' # txzing_token
c.NotebookApp.ip = '127.0.0.1'
c.NotebookApp.port = 8888
c.NotebookApp.open_browser = False
c.NotebookApp.trust_xheaders = True

And My Nginx HTTP Config like this:

upstream notebook {
    server localhost:8888;
}
server {
    listen 80;
    server_name xx.xx.com;
    rewrite ^/(.*) https://xx.xx.com/$1 permanent;
}
server{
    listen 443 ssl;
    index index.html;
    server_name xx.xx.com;
    ssl_certificate /root/.ipython/profile_txz_server/mycert.pem;
    ssl_certificate_key /root/.ipython/profile_txz_server/mycert.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    location / {
        proxy_pass            http://127.0.0.1:8888;
        proxy_set_header      Host $host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Origin "";
    }
}

Finally I try to visit url : https://xx.xx.com

Jupyter get error like this:

SSL Error on 9 ('127.0.0.1', 43378): [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:749)

How can I deal this question?

I deal this question. And I try to do like this:

# c.NotebookApp.certfile = u'/root/.ipython/profile_txz_server/mycert.pem'
# c.NotebookApp.client_ca = u'/root/.ipython/profile_txz_server/mycert.pem'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM