我有以下错误。如何修复以下证书错误(ipython)?

时间:2014-04-18 02:53:35

标签: certificate ipython ipython-notebook

当我想在我的macbook上运行ipython notebook时,我收到以下错误。有谁知道如何解决这一问题?你能帮我解决一下吗?

ERROR:root:Exception in I/O handler for fd 6
Traceback (most recent call last):
  File "//anaconda/lib/python2.7/site-packages/zmq/eventloop/ioloop.py", line 346, in start
    self._handlers[fd](fd, events)
  File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 167, in accept_handler
    callback(connection, address)
  File "//anaconda/lib/python2.7/site-packages/tornado/tcpserver.py", line 217, in _handle_connection
    do_handshake_on_connect=False)
  File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 407, in ssl_wrap_socket
    return ssl.wrap_socket(socket, **dict(context, **kwargs))
  File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 387, in wrap_socket
    ciphers=ciphers)
  File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 141, in __init__
    ciphers)
SSLError: [Errno 336445449] _ssl.c:368: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib
ERROR:root:Exception in I/O handler for fd 6
Traceback (most recent call last):
  File "//anaconda/lib/python2.7/site-packages/zmq/eventloop/ioloop.py", line 346, in start
    self._handlers[fd](fd, events)
  File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 167, in accept_handler
    callback(connection, address)
  File "//anaconda/lib/python2.7/site-packages/tornado/tcpserver.py", line 217, in _handle_connection
    do_handshake_on_connect=False)
  File "//anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 407, in ssl_wrap_socket
    return ssl.wrap_socket(socket, **dict(context, **kwargs))
  File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 387, in wrap_socket
    ciphers=ciphers)
  File "//anaconda/python.app/Contents/lib/python2.7/ssl.py", line 141, in __init__
    ciphers)
SSLError: [Errno 336445449] _ssl.c:368: error:140DC009:SSL routines:SSL_CTX_use_certificate_chain_file:PEM lib

2 个答案:

答案 0 :(得分:5)

您的浏览器似乎在没有SSL的情况下尝试访问笔记本。确保使用HTTPS访问该站点。例如,当您访问笔记本时,请在浏览器中键入https://127.0.0.1:9999。 (或者无论服务器的地址是什么。)

答案 1 :(得分:0)

它无法识别您传递的文件 - 或者:

  1. 将.pem文件(私钥)传递给--NotebookApp.keyfile=,将.crt文件(您的证书)传递给--NotebookApp.certfile=
  2. 通过将证书附加到密钥并将此新文件传递给--certfile来创建新文件。