Shashi Tunga
Shashi Tunga

Reputation: 516

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. None of the previous asked question solved my issue

Upvotes: 1

Views: 2180

Answers (1)

Zerodf
Zerodf

Reputation: 2298

Can you confirm that you have configured the Security Group applied to your ec2 instance that will let you connect on port 8888?

As you are connecting over the public internet, I would encourage you to tunnel your connection over SSH.

To create a tunnel over SSH using Putty on Windows:

  1. Log into your remote box
  2. Start up Jupyter Notebnook $ jupyter notebook --ip='*' --no-browser
  3. Note which port Jupyter is using. In this example, it is 8846. See: 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
  5. Navigate down to Connection | 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)
  7. Enter your destination address ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:8846 and click the "Add" button
  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

More Information:

An example of someone tunneling through a proxy

Some excellent screenshots here

An informative Stack Overflow thread

Upvotes: 3

Related Questions