我在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.
。
有什么解决办法吗?提前致谢!
正如评论中提到的@AlexK,我应该使用DNS或公共IP连接jupyter笔记本。对于存在相同问题的人员,您可以在AWS实例选项卡下找到公共DNS(IPv4),然后使用来连接jupyter notebook jupyter notebook --ip=ec2-**.******.compute.amazonaws.com
。现在jupyter notebook应该可以在AWS上完美运行。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句