Let me give the necessary context:
Security group details for Instance:
Jupyter Notebook Config File Snapshot:
When I run jupyter notebook this is what I get
And I cant connect to the Instance as I am getting this error:
Not sure what I am missing out or doing wrong. Any help would be appreciated.
You can run it in a headless mode, without browser:
jupyter notebook --no-browser
Then you can access it from your local workstation. Preferably over ssh tunnel for security reasons, rather then directly.
Related
With my Datalab instance, I can't run my script because the Kernel is dead and i don't have any option to select Python3 or Python 2.
I restarted the session and tried also to restart the VM also, but nothing changed, the Kernel option is still unavalaible to choose!
Can you help please?
There's an issue when connecting to Datalab from the Cloud Shell. You can workaround this issue by connecting to the instance without Cloud Shell and create a tunnel on port 8080 to display the Datalab UI on your machine.
In addition, I suggest switching to AI Platform Notebooks which provides an easy to use managed JupyterLab VM similar to Datalab and don't have this issue. Here's the quickstart to create a notebook.
I am a beginner for Amazon Ec2 and recently I successfully ssh to EC2 instance. yet when I tried to activate jupyter before ssh:
jupyter notebook --no-browser --port=8888
I get the message:
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=????????????????????
I copied the URL as instructed to the browser (chrome and safari), but it did not work. How could I proceed to ssh jupyter notebook? Thanks!
I hope you just didn't copied the link as it is (locahost), it is running on ec2, not on your computer. So change the server name to IP address of your EC2 instance (assuming you allowed traffic on correct ports)
There are a few guides how to access jupyter notebooks on remote servers, e. g. see
https://jupyter-notebook.readthedocs.io/en/stable/public_server.html#notebook-public-server
If you are just playing along and don't care about security in this case, you may just update the binding IP in your jupyter_notebook_config.py :
c.NotebookApp.ip = '*'
You can start the jupyter server using the following command:-
jupyter notebook --ip=*
If you want to keep it running even after the terminal is closed then use:-
nohup jupyter notebook --ip=* > nohup_jupyter.out&
Remember to open the port 8888 in the AWS EC2 security group inbound to Anywhere (0.0.0.0/0, ::/0)
Then you can access jupyter using http://:8888
Hope this helps.
I am having trouble setting up Jupyter Notebook in my EC2 Instance (Deep Learning AMI Linux). I followed the tutorial from this link. Imanaged to finish all without any problems except launching the notebook. In the SSH terminal, after I inputed the jupyter notebook command, it says my notebook is running in https://ip-172-*-*-*:8888/, but when I opened that link, it just says the site can't be reached. Same problem when I inputed my instance's public DNS with :8888 at the end.
Can someone tell my what I might be doing wrong?
Please help. Thank you in advance!
I havae found the solution, it turns out the links didn't specify that the EC2 instance has to allow HTTPS connection. So, I added a Custom TCP Rule, with prot range 443, and Souce 0.0.0.0/0 to the security group.
I can suggest you the following procedure:
jupyter notebook --ip=0.0.0.0 --no-browser
Access jupyter notebook index from your web-browser by visiting:
<IPv4 public IP address displayed on EC2 Dashboard> :8888/?token=...
Hope this helps.
I am trying to open on my local browser the Jupyter notebook opened through the AWS instance.
I am using m4.2xlarge instance from the ami-d36386aa, Ireland region.
I then typed inside the instance command line:
jupyter notebook --no-browser --ip=xx.xx.xx.xx
Where the ip is the public ip from AWS.
run Jupyter notebook
given output:
http://ec2-xx-xxx-x-xxx.eu-west-1.compute.amazonaws.com:8888/?token=....
I copied the output from (2) to my browser but nothing is happening.
Any suggestions?
I am working on a project in an EC2 isntance using jupyter notebook. It seems like jupyter notebook does not allow multiple ssh to its server at the same time, I have to log out if other people want to connect to jupyter notebook through the instance. Is it possible to make multiple access to jupyter notebook from the same instance?
Create/update jupyter_notebook_config.py file in ~/.jupyter folder with the below code. All jupyter notebook command calls post this file creation will infer configuration from the file.
from notebook.auth import passwd
c = get_config()
c.NotebookApp.open_browser=False
c.NotebookApp.ip='*' # Allows access from anywhere
c.NotebookApp.port=8885 # Jupyter runs in port 8885
c.NotebookApp.password=passwd('jupyter') # Password to access notebooks
Make sure you've opened 8885 (or any other port of your choice mentioned in the configuration file) allows connection requests from outside (update EC2 security groups appropriately). Not sure if you've tried this or what the issue at your end is but this works for me.
The juypter notebook is installed on a server in this case an EC2 machine.
Any number of people can SSH into this machine if they have the credentials using putty or some ssh client, this has no connection with jupyter notebook.
(assuming that the SSH port 22 is open for the other users and they are able to connect)
When you launch the jupyter notebook using the jupyter notebook command -> you start a local instance of the jupyter notebook on the default port (maybe 8888)
you will have a URL for this notebook interface and you can work on it.
Important to note -> This is a local instance of your notebook. It is not public and can only be accessed on your OS username as a localhost.
If other OS users run the jupyter notebook command they will get their local version of the notebook on a different port (maybe 8889 by default as the port number 8888 is already in use by you )
You can make your notebook public and then you will get a public URL for your notebook (serverip:8888 or the port you have specified)
This public link can be shared with others. Now multiple people have visibility to your notebook and can edit code in your notebook.
p.s -> for public notebooks the port in which you are running the notebook needs to accept connections from AWS end. This can be configured in AWS console under the security groups tab