简体   繁体   English

无法从Windows 10连接到Jupyter Notebook EC2服务器

[英]Unable to connect to jupyter notebook ec2 server from windows 10

I have spent days to solve this and no solution. 我花了几天的时间解决这个问题,但没有解决方案。

[ec2-user@ip-172-31-28-86 mynotebooks]$ jupyter notebook
[I 14:34:22.588 NotebookApp] [nb_conda_kernels] enabled, 15 kernels found
[I 14:34:22.615 NotebookApp] Writing notebook server cookie secret to /home/ec2-user/.local/share/jupyter/runtime/notebook_cookie_secret
[I 14:34:24.129 NotebookApp] [nb_anacondacloud] enabled
[I 14:34:24.250 NotebookApp] [nb_conda] enabled
[I 14:34:25.199 NotebookApp] ✓ nbpresent HTML export ENABLED
[W 14:34:25.199 NotebookApp] ✗ nbpresent PDF export DISABLED: No module named 'n                                                                                                                                                             bbrowserpdf'
[I 14:34:37.849 NotebookApp] sparkmagic extension enabled!
[I 14:34:37.854 NotebookApp] Serving notebooks from local     directory: /home/ec2-user/mynotebooks
[I 14:34:37.854 NotebookApp] 0 active kernels
[I 14:34:37.854 NotebookApp] The Jupyter Notebook is running at:
    [I 14:34:37.854 NotebookApp] https://[all ip addresses on your system]:8888/
    [I 14:34:37.854 NotebookApp] Use Control-C to stop this server and shut down all 

I have completed the setup process this is my output. 我已经完成设置过程,这是我的输出。 But when i try to open the url(public domain url in aws) with port number 8888 , it doesnt open timeout error. 但是,当我尝试使用端口号8888打开url(aws中的公共域url)时,它没有打开超时错误。 None of the previous asked question solved my issue 前面的问题都没有解决我的问题

Can you confirm that you have configured the Security Group applied to your ec2 instance that will let you connect on port 8888? 您是否可以确认已配置应用于ec2实例的安全组,该安全组将允许您在端口8888上进行连接?

As you are connecting over the public internet, I would encourage you to tunnel your connection over SSH. 当您通过公共Internet连接时,我鼓励您通过SSH建立连接。

To create a tunnel over SSH using Putty on Windows: 在Windows上使用Putty在SSH上创建隧道:

  1. Log into your remote box 登录到您的远程邮箱
  2. Start up Jupyter Notebnook $ jupyter notebook --ip='*' --no-browser 启动Jupyter Notebnook $ jupyter notebook --ip='*' --no-browser
  3. Note which port Jupyter is using. 注意Jupyter使用的是哪个端口。 In this example, it is 8846 . 在这个例子中,它是8846 See: The Jupyter Notebook is running at: http://[all ip addresses on your system]:8846 请参阅: The Jupyter Notebook is running at: http://[all ip addresses on your system]:8846
  4. Start another Putty window and highlight the session you use to connect to your instance and click the "Load" Button 启动另一个Putty窗口,并突出显示用于连接到实例的会话,然后单击“加载”按钮
  5. Navigate down to Connection | 导航到“连接” | SSH | SSH | Tunnels 隧道
  6. Enter the port you want to connect to on your local machine in the " "Source Port" (I am using 5500 in this example) 在““源端口”中输入要连接到本地计算机上的端口(在此示例中,我使用的是5500)
  7. Enter your destination address ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:8846 and click the "Add" button 输入您的目标地址ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:8846 ,然后点击“添加”按钮
  8. Navigate back to your session, click "Save", then click "Connect" 导航回到您的会话,单击“保存”,然后单击“连接”
  9. You should now be able to enter http://localhost:5500 in your web browser and connection to Jupyter 您现在应该可以在网络浏览器中输入http:// localhost:5500并连接到Jupyter

More Information: 更多信息:

An example of someone tunneling through a proxy 有人通过代理进行隧道传输的示例

Some excellent screenshots here 这里有一些很棒的截图

An informative Stack Overflow thread 内容丰富的堆栈溢出线程

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

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