cz.*_*ial 3 permissions ssh amazon-ec2 amazon-web-services jupyter
我已经在 AWS (ubuntu, eu-central-1b) 上设置了一个 EC2 实例。端口 8888(自定义 tcp 规则)、https 443 和 ssh 22 在 AWS(任何地方)上打开。我知道 chmod 400 key.pem 和 jupyter_notebook_config.py 主题。它还成功地在 EC2 实例上设置了 Anaconda3-5x 和 Jupyter。但是:我无法在浏览器(Firefox 和 Safari)上访问 Jupyter 服务器。登录 EC2 实例后启动 jupyter notebook 时,我收到 PermissionError: [Errno 13] Permission denied 错误消息。在浏览器中,我只是收到一条连接已超时错误消息。
我几乎遵循了每个教程,例如:
https://chrisalbon.com/aws/basics/run_project_jupyter_on_amazon_ec2/ 或 https://github.com/mGalarnyk/Installations_Mac_Ubuntu_Windows/tree/master/AWS
我现在尝试了几次,终止了 EC2 实例并重新设置了整个过程。但是,我仍然无法通过浏览器连接到 Jupyter 服务器。
当我尝试在浏览器中连接/输入 URL 时,确切的错误消息如下所示:
(base) ubuntu@ip-172-31-34-13:~$ jupyter notebook [I 15:44:20.930 NotebookApp] JupyterLab extension loaded from /home/ubuntu/anaconda3/lib/python3.7/site-packages/jupyterlab
[I 15:44:20.930 NotebookApp] JupyterLab application directory is /home/ubuntu/anaconda3/share/jupyter/lab
[I 15:44:20.934 NotebookApp] Serving notebooks from local directory: /home/ubuntu
[I 15:44:20.934 NotebookApp] The Jupyter Notebook is running at:
[I 15:44:20.934 NotebookApp] https://(ip-172-31-34-13 or 127.0.0.1):8888/
[I 15:44:20.934 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Exception in callback BaseAsyncIOLoop._handle_events(6, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(6, 1)>
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tornado/platform/asyncio.py", line 122, in _handle_events
handler_func(fileobj, events)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tornado/s**tack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tornado/netutil.py", line 262, in accept_handler
callback(connection, address)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tornado/tcpserver.py", line 263, in _handle_connection
do_handshake_on_connect=False)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tornado/netutil.py", line 565, in ssl_wrap_socket
context = ssl_options_to_context(ssl_options)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tornado/netutil.py", line 540, in ssl_options_to_context
context.load_cert_chain(ssl_options['certfile'], ssl_options.get('keyfile', None))**
Run Code Online (Sandbox Code Playgroud)
当我使用“ https://(AWS Public DNS):8888”或“ https://(AWS IPv4 Public IP):8888”时也没有区别
我什至尝试了一个不同的端口(8889)和类似的东西。
作为信息,我的 notebook_config 是什么样的:
c = get_config()
c.IPKernelApp.pylab = 'inline'
c.NotebookApp.certfile = u'/home/ubuntu/certs/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:xxxxx'
c.NotebookApp.port = 8888
Run Code Online (Sandbox Code Playgroud)
Everythings 基本上设置为它们在教程中显示的那样。我试过了,就像他们在 AWS 上正式展示一样:https : //docs.aws.amazon.com/dlami/latest/devguide/setup-jupyter-config.html
这可能是cert.pem文件的权限错误。假设mycert.pem您的notebook_config文件中列出的目录是正确的,从通过 SSH 连接到 EC2 实例的终端,您可以使用以下命令:
sudo chown $USER:$USER /home/ubuntu/certs/mycert.pem
此问题可能重复:Jupyter 认证问题
| 归档时间: |
|
| 查看次数: |
3602 次 |
| 最近记录: |