Running Jupyter Server on Windows 10 - windows-10

I have followed the directions at http://jupyter-notebook.readthedocs.io/en/stable/public_server.html to set up a jupyter server. I am able to run it via the anaconda prompt and get the following output:
C:\Users\adamimos>jupyter lab --ip=* --no-browser
[I 16:10:53.627 LabApp] JupyterLab beta preview extension loaded from C:\Users\adamimos\Anaconda3\lib\site-packages\jupyterlab
[I 16:10:53.627 LabApp] JupyterLab application directory is C:\Users\adamimos\Anaconda3\share\jupyter\lab
[I 16:10:53.798 LabApp] Serving notebooks from local directory: C:\Users\adamimos
[I 16:10:53.798 LabApp] 0 active kernels
[I 16:10:53.798 LabApp] The Jupyter Notebook is running at:
[I 16:10:53.798 LabApp] https://DESKTOP-TCCSP57:9999/
[I 16:10:53.798 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 16:11:37.581 LabApp] 302 GET / (172.25.101.65) 1.00ms
On the same machine running the server, I can then connect by typing in the browser: https://172.25.101.65:9999
However, when I go to another computer and try to do the same thing using the global ip address, I get a "took too long to respond." error. I have tried turning off firewalls on both computers.

Related

Cannot start jupyter notebook when i type the address in the browser

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

Docker container got some strange address, 03a0646cb148:8888/ can anyone explain what's this type of address is called?

i was running a container which got two different addresses, i understand http://127.0.0.1:8888/?token=... and ::1 is referring to the localhost in ipv4 and 6 respectively but where does this http://03a0646cb148:8888/?token=... address comes from ???
lib#DESKTOP-ISQPMPU:~$ docker run --rm -p 8888:8888 -v $PWD:/home/jovyan/pwd --env JUPYTER_ENABLE_LAB=yes --env JUPYTER_TOKEN=x --name ihaskell_notebook crosscompass/ihaskell-notebook:latest
[sudo] password for lib:
Executing the command: jupyter lab
[I 15:35:31.698 LabApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[I 15:35:34.001 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab
[I 15:35:34.001 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 15:35:34.006 LabApp] Serving notebooks from local directory: /home/jovyan
[I 15:35:34.006 LabApp] The Jupyter Notebook is running at:
[I 15:35:34.006 LabApp] http://03a0646cb148:8888/?token=...
[I 15:35:34.006 LabApp] or http://127.0.0.1:8888/?token=...
[I 15:35:34.006 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
where does this http://03a0646cb148:8888/?token=... address comes from ?
That's a container hostname. One of Linux's namespaces used by docker is UTS which is easiest thought of as the hostname. Hostnames in containers default to the short container id:
$ docker run -it --name test-host busybox hostname
e93c238e1aa3
$ docker container ls -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e93c238e1aa3 busybox "hostname" About a minute ago Exited (0) About a minute ago test-host
$ docker container inspect test-host --format '{{.ID}}'
e93c238e1aa32b62b9c57df722ea3150a48322c266383f0d7c8e049ab7bd760c

Connection Failed to remote jupyter notebook

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.

Jupyter lab is only opened on private ip, not public ip

OS : ubuntu 18.04.1 LTS on aws ec2
I'm setting up jupyter lab on my aws ec2 server, and want to connect my server from other pc.
However I can't access jupyter
Maybe that's why it is connected to private ip
Firstly, I installed jupyter and config
$ pip3 install jupyter
$ pip3 install jupyterlab
$ jupyter notebook --generate-config
changed config on
"~/.jupyter/jupyter_notebook_config.py"
c.NotebookApp.allow_origin = '*'
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.password = <my_password>
c.NotebookApp.port = 8888
and then, I try to run jupyter lab
$ jupyter lab
Finally,
[I 06:25:39.565 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.6/dist-packages/jupyterlab
[I 06:25:39.565 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[W 06:25:39.567 LabApp] JupyterLab server extension not enabled, manually loading...
[I 06:25:39.569 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.6/dist-packages/jupyterlab
[I 06:25:39.569 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 06:25:39.570 LabApp] Serving notebooks from local directory: /home/ubuntu/.certs
[I 06:25:39.570 LabApp] The Jupyter Notebook is running at:
[I 06:25:39.570 LabApp] http://(ip-XXX-XX-XX-XXX or 127.0.0.1):8888/
[I 06:25:39.570 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
is printed
I expect ec2-XX-XXX-XXX-XX.ap-northeast-2.compute.amazonaws.com shows on cmd
How can I run jupyter on public ip?

can't connect to jupyter notebook on ubuntu remote server

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>

Resources