amazon-web-services - 无法在 AWS 上连接 jupyter notebook
问题描述
我无法在 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=******
,我无法在网络浏览器中打开此 url,说ip-172-31-44-200’s server IP address could not be found.
.
有什么解决办法吗?提前致谢!
解决方案
正如评论中提到的@AlexK,我应该使用 DNS 或公共 IP 来连接 jupyter notebook。对于有同样问题的人,在 AWS 实例选项卡下,您可以找到公共 DNS (IPv4),然后使用jupyter notebook --ip=ec2-**.******.compute.amazonaws.com
. 现在 jupyter notebook 应该可以在 AWS 上完美运行了。
推荐阅读
- java - BufferedReader 接受终端输入字符
- angular - 第一次加载页面时,Angular 按钮需要单击两次
- javascript - 游戏结束返回
- reactjs - 如何获取组件接受的更新的道具列表?
- spring - Spring - 更改全局错误处理程序和过滤器的顺序
- c# - 我什么时候应该在 selenium C# 上使用 DriverOptions
- python - 检查字符串中的(仅整个)单词
- c# - HttpContext 在带有 Rabbitmq 的 asp.net 核心中为空
- php - Ajax 不在Phonegap 项目中工作但在它之外运行?
- cassandra - Cassandra:带有令牌功能的全表扫描