简体   繁体   中英

Cannot connect to jupyter notebook on Amazon AWS Ec2 instance

I'm running Amazon Linux 2 AMI EC2 instance. On the instance, I'm able to install anaconda. After setting jupyter notebook config etc. I tried to open jupyter notebook on Chrome using the url https://ip-xxx-xx-x-xx.us-east-2.compute.internal:8888/ from nohup.out. The link never worked.

1. Here is my Network settings: 在此处输入图像描述

2. And here is my jupyter notebook config:

c = get_config()
c.IPKernelApp.pylab = 'inline'
c.NotebookApp.certfile = u'/home/ec2-user/certs/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
# Your password below will be whatever you copied earlier
c.NotebookApp.password = u'xxxxx'
c.NotebookApp.port = 8888

3. And here is the log after running nohup jupyter notebook :

[I 15:51:03.957 NotebookApp] Writing notebook server cookie secret to /home/ec2-user/.local/share/jupyter/runtime/notebook_cookie_secret
[I 15:51:04.525 NotebookApp] JupyterLab extension loaded from /home/ec2-user/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 15:51:04.525 NotebookApp] JupyterLab application directory is /home/ec2-user/anaconda3/share/jupyter/lab
[I 15:51:04.528 NotebookApp] Serving notebooks from local directory: /home/ec2-user/Notebook
[I 15:51:04.528 NotebookApp] The Jupyter Notebook is running at:
[I 15:51:04.528 NotebookApp] https://ip-xxx-xx-x-xx.us-east-2.compute.internal:8888/
[I 15:51:04.528 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

I believe it should be a security setting issue. But I already allowed SSH traffic from anywhere and also allow HTTPs traffic from the internet.

Anything wrong with the above? Please share if you have any clues. Thanks!!

Did you try using the public dns that's listed on your EC2 instance? This is considering you have configured your EC2 in a public subnet that has an internet gateway.

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