简体   繁体   English

无法在AWS上连接Jupyter Notebook

[英]Unable to connect jupyter notebook on AWS

I have trouble connecting jupyter notebook on AWS. 我无法在AWS上连接jupyter笔记本。 I tried several solutions on SO, including setting security group rule with port 8888 from any ip, setting configure file like: 我在SO上尝试了几种解决方案,包括通过任何IP使用端口8888设置安全组规则,设置配置文件,例如:

c = get_config()

# Notebook config this is where you saved your pem cert
c.NotebookApp.certfile = u'/home/ubuntu/certs/mycert.pem' 
# Run on all IP addresses of your instance
c.NotebookApp.ip = '*'
# Don't open browser by default
c.NotebookApp.open_browser = False  
# Fix port to 8888
c.NotebookApp.port = 8888

Also, I tried using jupyter notebook --ip=my_aws_ip --port=8888 . 另外,我尝试使用jupyter notebook --ip=my_aws_ip --port=8888 For the login part, I use ssh -i <pem key> ubuntu@<ec2...> -L 8888:localhost:8888 All above solutions returned https://ip-172-31-44-200:8888/?token=****** , and I was not able to open this url in the web browser, saying that ip-172-31-44-200's server IP address could not be found. 对于登录部分,我使用ssh -i <pem key> ubuntu@<ec2...> -L 8888:localhost:8888以上所有解决方案均返回https://ip-172-31-44-200:8888/?token=****** ,并且我无法在网络浏览器中打开此URL,说ip-172-31-44-200's server IP address could not be found. .

Is there any solution? 有什么解决办法吗? Thanks in advance! 提前致谢!

As @AlexK mentioned in the comments, I should use DNS or the public IP to connect jupyter notebook. 正如评论中提到的@AlexK,我应该使用DNS或公共IP连接jupyter笔记本。 For people who have the same issue, under the AWS instance tab, you can find the Public DNS (IPv4), then connect jupyter notebook using jupyter notebook --ip=ec2-**.******.compute.amazonaws.com . 对于有相同问题的人,可以在AWS实例选项卡下找到公共DNS(IPv4),然后使用jupyter notebook --ip=ec2-**.******.compute.amazonaws.com连接jupyter notebook jupyter notebook --ip=ec2-**.******.compute.amazonaws.com Now jupyter notebook should run perfectly on AWS. 现在jupyter notebook应该可以在AWS上完美运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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