python - ssl_options Jupyter Notebook 中缺少密钥“certfile”
问题描述
这是说我错过了密钥,但我已经创建了一个自签名并将其设置为绝对路径按照此处的教程:https ://jupyter-notebook.readthedocs.io/en/stable/public_server.html#using-lets -加密
我还尝试使用 .key 和 .crt 扩展名重新制作密钥,但仍然没有区别
## The full path to a private key file for usage with SSL/TLS.
# Default: ''
c.NotebookApp.keyfile = u'/home/jupyter/Jupyter/notebook/0_repo/nb-privkey.pem'
# The full path to an SSL/TLS certificate file.
# Default: ''
# c.NotebookApp.certfile = u'/home/jupyter/Jupyter/notebook/0_repo/nb-cert.pem'
(notebook) [jupyter@tf notebook]$ jupyter notebook
Traceback (most recent call last):
File "/home/jupyter/Jupyter/notebook/bin/jupyter-notebook", line 8, in <module>
sys.exit(main())
File "/home/jupyter/Jupyter/notebook/lib/python3.9/site-packages/jupyter_core/application.py", line 254, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/jupyter/Jupyter/notebook/lib/python3.9/site-packages/traitlets/config/application.py", line 844, in launch_instance
app.initialize(argv)
File "/home/jupyter/Jupyter/notebook/lib/python3.9/site-packages/traitlets/config/application.py", line 87, in inner
return method(app, *args, **kwargs)
File "/home/jupyter/Jupyter/notebook/lib/python3.9/site-packages/notebook/notebookapp.py", line 2124, in initialize
self.init_webapp()
File "/home/jupyter/Jupyter/notebook/lib/python3.9/site-packages/notebook/notebookapp.py", line 1790, in init_webapp
self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options,
File "/home/jupyter/Jupyter/notebook/lib/python3.9/site-packages/tornado/util.py", line 288, in __new__
instance.initialize(*args, **init_kwargs)
File "/home/jupyter/Jupyter/notebook/lib/python3.9/site-packages/tornado/httpserver.py", line 187, in initialize
TCPServer.__init__(
File "/home/jupyter/Jupyter/notebook/lib/python3.9/site-packages/tornado/tcpserver.py", line 130, in __init__
raise KeyError('missing key "certfile" in ssl_options')
KeyError: 'missing key "certfile" in ssl_options'
解决方案
推荐阅读
- sql - 如何从geojson中删除少于4个值的坐标
- java - Modelmapper 跳过对象字段
- metal - MetalKit 掩蔽两个四边形
- kubernetes - 如何在 OpenShift 中使用 Spring Batch 设置主 Pod 和工作 Pod 以进行远程分块?
- mqtt - MQTT 在 TCP/IP 上传输时如何轻量级
- ios - 哪种方式在 Swift 中定义空字符串最有效?
- javascript - 2个字段名称和电子邮件添加和删除它们没有jquery
- reactjs - MUI 自动完成和 react-hook-form 不显示带有提取数据的选定选项
- python - 检查行的日期范围是否与 Python / Pandas Dataframe 中的任何先前行的日期范围重叠
- javascript - 在 Flask 中隐藏一个 div