【发布时间】:2018-12-01 00:00:43
【问题描述】:
我无法在 AWS 上连接 jupyter notebook。我在 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
另外,我尝试使用jupyter notebook --ip=my_aws_ip --port=8888。对于登录部分,我使用ssh -i <pem key> ubuntu@<ec2...> -L 8888:localhost:8888 以上所有解决方案都返回https://ip-172-31-44-200:8888/?token=******,而我无法在Web 浏览器中打开这个url,说ip-172-31-44-200’s server IP address could not be found.。
有什么解决办法吗?提前致谢!
【问题讨论】:
-
这是您尝试访问的 Ec2 的私有 IP。您应该在端口
8888上使用 DNS 或公共 IP。 -
@AlexK 你知道我应该如何使用 DNS 或公共 IP 连接笔记本吗?我用公共 IP 更改了 url,但它返回了相同的内容。
-
确保您的 ec2 可以通过您的 IP 访问,即调整你的安全组并检查机器的防火墙
-
@AlexK 知道了,谢谢!
-
你连接了吗?如果您有,我会将其添加为答案,以便其他人也可以受益:)
标签: amazon-web-services jupyter-notebook