I'm trying to connect to jupyter notebook running on my remote server. The code below has been working fine for days to forward the jupyter notebook running on the port on my ubuntu server to my mac. It stopped today. Does anyone know what the issue might be? Also does anyone know how I can just open the port on my ubuntu server so I wouldn't need the code below?
code:
ssh -L 8000:localhost:8888 username#111.111.11.122
Update:
code:
jupyter notebook --no-browser --port=8889
Message:
WARNING: The conda.compat module is deprecated and will be removed in a future release.
[I 14:11:23.334 NotebookApp] [nb_conda_kernels] enabled, 2 kernels found
[I 14:11:23.343 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret
[I 14:11:24.175 NotebookApp] Serving notebooks from local directory: /home/username
[I 14:11:24.175 NotebookApp] The Jupyter Notebook is running at:
[I 14:11:24.175 NotebookApp] http://localhost:8889/?token=d111b8540568567c80796a3be5cf53229fe38360b411a4dd
[I 14:11:24.175 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:11:24.178 NotebookApp]
To access the notebook, open this file in a browser:
file:///run/user/1000/jupyter/nbserver-77790-open.html
Or copy and paste one of these URLs:
http://localhost:8889/?token=d111b8540568567c80796a3be5cf53229fe38360b411a4dd
Update:
code:
ssh -L 8888:localhost:8889 username#111.111.11.122
message:
bind: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 8888
Could not request local forwarding.
I encounter the same problem time to time. You can try restarting your remote jupyter server (the link contains information to kill existing server and start a new one). Or try a different port number. BTW please share the exact error you face with.
[https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh][1]
Change "ipython" with "jupyter" and make sure jupyter is installed both on remote machine and your machine.
ipython notebook --no-browser --port=8889
jupyter notebook --no-browser --port=8889
This is because you have already opened another Jupyter notebook using port 8888 on your local machine. So solution is simply choosing a different port number, e.g. 8890 or else except 8888 in your case.
The issue seems to be that I needed to type localhost:8888 in to the browser on my local machine. I had been typing in the port I opened the jupyter notebook server on, on my remote machine so localhost:8889. Example
jupyter notebook --no-browser --port=8889
followed by
ssh -N -f -L localhost:8888:localhost:8889 username#111.111.11.122
bang head here.
Related
I downloaded a docker image for cadquery and jupyter notebook.
When i run the container, it gave me this message:
[I 19:48:59.700 LabApp] JupyterLab application directory is /opt/conda/envs/cq/share/jupyter/lab
[I 19:48:59.703 LabApp] Serving notebooks from local directory: /home/cq
[I 19:48:59.703 LabApp] Jupyter Notebook 6.1.1 is running at:
[I 19:48:59.703 LabApp] http://58bb309866f3:8888/
[I 19:48:59.703 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
When i visit http://58bb309866f3:8888/ in my browser (docker-host machine) i get: This site can’t be reached.
So how am i able to start jupyter? I have never used jupyter before - i don't clearly know what that is - but it is the way to get access to cadquery's API.
EDIT:
I started the docker container with :
sudo docker run -it --rm -v $WORKDIR:/home/cq -p 8888:8888 bwalter42/jupyter_cadquery:1.0.0
The address 58bb309866f3:8888 is an internal container address in that cannot be reached from the host
You should connect using localhost and the port mapped in your docker run command. In this case you can connect using localhost:8888
I've installed anaconda on a remote ubuntu server. I'm trying to launch jupyter notebook on the ubuntu server and then connect to it with my local machine by replacing "localhost" in http://localhost:8888/ with the ip address of the ubuntu server. But when I paste it in to chrome on my local machine I'm getting the message that the site can't be reached. I've don this before on other ubuntu servers and connected from my local machine. Is there any clues what the issue might be from the messages below that I get when I launch jupyter notebook on the ubuntu server? I notice it's asking me to enable javascript which is unusual. By the way the token listed below is made up for the post, not real.
Code and error:
name1#master1:~$ jupyter notebook
[I 10:15:43.009 NotebookApp] JupyterLab beta preview extension loaded from /home/name1/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 10:15:43.010 NotebookApp] JupyterLab application directory is /home/name1/anaconda3/share/jupyter/lab
[I 10:15:43.018 NotebookApp] Serving notebooks from local directory: /home/name1
[I 10:15:43.019 NotebookApp] 0 active kernels
[I 10:15:43.019 NotebookApp] The Jupyter Notebook is running at:
[I 10:15:43.019 NotebookApp] http://localhost:8888/?token=655ab123f2c6f8cfc6b9c123d159b123113a84a8433982cd
[I 10:15:43.019 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 10:15:43.022 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=655ab123f2c6f8cfc6b9c123d159b123113a84a8433982cd&token=655ab123f2c6f8cfc6b9c123d159b123113a84a8433982cd
Jupyter Notebook requires JavaScript.
Please enable it to proceed.
Jupyter Notebook
Quit Logout
• Files
• Running
• Clusters
Select items to perform actions on them.
Duplicate Rename Move Download Shutdown View Edit
[ ] Upload
New
• Notebook:
•
• Other:
• Text File
• Folder
• Terminal
[ ] Toggle Dropdown
• Folders
• All Notebooks
• Running
• Files
•
File size
Last Modified
Name
Currently running Jupyter processes
Terminals
There are no terminals running.
Notebooks
There are no notebooks running.
Clusters tab is now provided by IPython parallel. See 'IPython parallel' for installation details.
≪ ↑ ↓ Viewing <Home>
I'm trying to train keras models on the Deep Learning Virtual Machine (DLVM)from MS Azure. I've setup a Ubuntu VM and connected to it via ssh from my mac but when I try to run jupyter notebook, I get this error : No such notebook dir: ''/dsvm/Notebooks'', for which I tried the solutions specified in Deep Learning Virtual Machine can't run jupyter "No such notebook dir: ''/dsvm/Notebooks''", but that gives me The Jupyter Notebook is running at:https://[all ip addresses on your system]:9999/
But chrome says my vm's ip : 9999 is not working.
According to the docs jupyter hub should be available at 8000 as soon as the vm starts but I can't access http://my-vm-ip:8000 either.
when I tried systemctl status jupyterhub as recommended here Can't reach Jupyter Notebooks on Azure Deep Learning Virtual Machine, I can see that jupyter hub is indeed listening at 8000 and there is a firewall rule defined at the vm allowing tcp connections to 8000 over the internet.
How do I access jupyter from the DLVM?
JupyterHub should be working and accessible on your VM. Are you connecting via https? Your post says you're using http, but we only support https.
Also, have you have confirmed that port 8000 is open on the Azure portal? Some VMs are created without this port open for various reasons. You might also try restarting the JupyterHub service to confirm it's working properly.
If you want to run Jupyter instead, you will need to fix an issue with the latest Ubuntu DSVM with the Jupyter config file. At a terminal:
sudo -s
source /anaconda/bin/activate py35
jupyter notebook --generate-config --config=/usr/local/etc/jupyter/jupyter_notebook_config.py
You should then open port 8888 in the firewall. Jupyter will then be accessible.
Slight issue with the 3rd command above. It should be "--config=" instead of "config=".
sudo -s
source /anaconda/bin/activate py35
jupyter notebook --generate-config --config=/usr/local/etc/jupyter/jupyter_notebook_config.py
Also please note that the above commands is needed to fix the Jupyterhub issue ("No such notebook dir: ''/dsvm/Notebooks''") also.
I can not access Jupyter notebook on Data science VM in Azure clould.
What I did:
create a Data Science VM for Linux. Resource group, NSG, etc are newly created.
follow the instruction of the command dsvm-more-info. That is
set c.NotebookApp.password (u'sha1:89this89is89a89fake89')
restart jupyter
access https://12.34.56.78:9999/ (The IP address is of course a fake.)
But I can not establish any connection to the server.
SSH works without any problem.
NSG looks OK: TCP/9999 is allowed from all (This is the default setting.)
I tried to https://localhost:9999/ on the VM, but no connection is established.
http://12.34.56.78:9999/ is not working. (Just in case.)
c.NotebookApp.allow_origin = '*' changes nothing.
My subscription is a test version. Is this relevant?
Following Jupyter Documentation, I created mykey.key and mycert.pem and
added absolute paths to the files in jupyter_notebook_config.py. But
this does not help.
You can connect to Jupyter Notebook if you are running it on Ubuntu.
Assuming your jupyter notebook will be running on port:8888 on Azure VM.
First you have to create a SSH tunneling:
On your local computer type:
ssh -L 8080:localhost:8888 username#server_address
Then on Azure start a notebook
jupyter notebook --no-browser
Finally, open http://localhost:8080 in a web browser on your local machine.
The Jupyter notebook is accessed through JupyterHub. You sign in using
your local Linux user name and password.
So, you should connect Jupyter notebook from port 8000, not 9999.
You can access the Jupyter notebook server from any host. Just type https://<VM DNS name or IP Address>:8000/
You also could use netstat -ant to check port listening on your VM. Port 9999 is not listening. So, you could not get it from port 9999.
More information about Jupyter on Azure Data science VM please refer to this link. You could check Jupyter notebook.
I am using a Surface Pro 3 with Windows Pro 8.1. I'm trying to access an IPython notebook from docker. The command I am using is
ipython notebook --no-browser --port 8888 "--ip=*"
The notebook is running but it is not opening in my browser, this is what I get when I run it
[I 23:16:44.921 NotebookApp]B Using existing profile dir: u'/home/itam/.ipython/profile_default'
[I 23:16:44.990 NotebookApp]B Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[C 23:16:45.012 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[C 23:16:45.012 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended.
[I 23:16:45.018 NotebookApp]B Serving notebooks from local directory: /home/itam/mate-computacional/itam-mate-computacional
[I 23:16:45.018 NotebookApp]B 0 active kernels
[I 23:16:45.018 NotebookApp]B The IPython Notebook is running at: http://[all ip addresses on your system]:8888/
[I 23:16:45.019 NotebookApp]B Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
The IP address of my virtual machine is 192.168.59.103, but https://192.168.59.103:8888/ doesn't open the notebook.
Start boot2docker and create new docker container ipython1:
docker run -it -ip 8888:8888 -v //c/Users/USERNAME://usr/data --name ipython1 <image_name>
image_name - name of your docker image
-v folder_in_your_win_machine:folder_in_docker_container
-ip port_in_win:port_in_docker_container
Start docker container ipython1 and launch ipython notebook in docker container:
docker start ipython1
docker exec -it ipython1 ipython notebook --ip=0.0.0.0 --no-browser
Next go to windows browser and enter url: docker_ip:8888.
To know docker IP execute:
boot2docker ip