Unable to Access Jupyter Notebook - python

[enter image description here][1]After Launching Jupyter Notebook, the web page from where we can use jupyter notebook is buffering it is unable to redirect to localhost 8888.
Even if I am trying to open that localhost 8888 page it's not opening.
For a long time, it buffers then shows unable to reach.
When I tried to launch Notebook:
When I tried to access directly via localhost address:

Related

Error when open Jupyter Notebook from putty

I'am trying to open Jupyter Notebook from Putty. I have a server where is installed Python and Jupyter. I followed all the steps from this post Remote access Jupyter notebook from Windows but it doesn't work. I got the error: This site can't be reached.
Any idea?
Thx
edit: I added a photo with the ps from putty and the error from browser. It's said:
This site can't be reached
.
The good old logout/reboot mechanisms work in this case too!
You can try closing the jupyter connection in the tunnel's connection, logout from the remote server, re-connect and try. Has worked a few times for me today.
If that doesn't work, there might be stale jupyter notebook processes on the remote server. Query for them and kill them and then logout-log back in and try.
If that still does not work, try implementing your code through ipython to check if Jupyter is working at all, even if its user interface isn't loading on your browser.

Specify hostname to jupyter notebook when running on remote server

I'm running a notebook on a remote server, to which I connect from my local machine via browser. One slight annoyance I have is it prints this on start:
Serving notebooks from local directory: /home/xxxxxxx
0 active kernels
The Jupyter Notebook is running at:
http://(friendly or 127.0.0.1):8888/
Where friendly is the friendly name of the host. The FQDN of the host is actually friendly.x.y.z.com. I would like it to print this:
The Jupyter Notebook is running at:
http://friendly.x.y.z.com:8888/
so that the URL is directly clickable from the console. Is there a config option I can pass somewhere to do that in jupyter notebook to explicitly specify the hostname I want displayed?
To be clear, http://friendly.x.y.z.com:8888/ resolves correctly in the browser despite the above message.
You should first generate the config file:
jupyter notebook --generate-config
Then using the config file you can set the custom URL by editing the config file ~/.jupyter/jupyter_notebook_config.py changing the following line:
c.NotebookApp.custom_display_url = 'http://friendly.x.y.z.com:8888'
So when you start the server it will show this URL concatenated with the token.

Unable to load jupyter notebook

How to solve this issue of Jupyter extension loaded from C and jupyter application directory is something else.I am unable to use numpy and matplotlib in Jupyter notebook.
this is what I get in Anaconda Prompt
These are the two errors I get 302 and 404 when I host the notebook
This is I got when I run a code in notebook
continued...error I get
It usually happens when the application is not able to initiate or determine a default browser. Just copy the entire link http://localhost:8888/?token=4e558da5a28601f99fbc0f1773a4200c57e89b6d487de19a and paste it in a web browser similar to how you access any web url. Remember, the token changes every time you initiate the jupyter notebook.

Force Jupyter Notebook *not* to open a web browser

I'm running Jupyter notebooks (Python 3) on a remote cluster that I'm connected/tunneled to over SSH.
Jupyter's default behavior is to try to open the dashboard in a web browser when it launches -- aparently (I only just updated), at some point they switched to the Python 3 webbrowser library for this.
According to webbrowser's documentation:
text-mode browsers will be used if graphical browsers are not available or an X11 display isn’t available.
This is exactly what happens. I run jupyter notebook, webbrowser launches elinks, and my one-time authentication token gets eaten, preventing me from connecting to the notebook.
Jupyter isn't configured to use a browser -- c.NotebookApp.browser is commented out in my config -- and running BROWSER="" jupyter notebook doesn't help either.
How can I force Jupyter not to open any browser?
jupyter-notebook --help includes the following:
--no-browser
Don't open the notebook in a browser after startup.
jupyter notebook --generate-config
Then edit ~/.jupyter/jupyter_notebook_config.py and Add
NotebookApp.open_browser = False
You can achieve this by specifying --no-browser:
$ jupyter notebook --no-browser
I also recommend that you specify the port you want to use:
jupyter notebook --no-browser --port= <port_number>
ie:
$ jupyter notebook --no-browser --port=8888
You have to keep in mind that when you do this, jupyter will provide you with a token on the console, token that the server will ask you when connect remotely through the browser.
If you want to simplify this procedure, you can set a password that is easier for you to remember. To do this, you can run in a console:
$ jupyter notebook --generate-config
and later:
$ jupyter notebook password
This last command will ask you for the password that you wish to use to enter remotely.
Regards!

iPython notebook can't connect to kernel on google-compute-engine

I've been trying to get ipython/jupyter notebook running as a notebook server on Google Compute Engine (Ubuntu 14.04 VM), but can't connect to the Python kernel.
I started with the latest Anaconda distribution. I can connect to the notebook server from my local machine via the web, browse the directory tree of the VM, and create new notebook, but never connects to the kernel (orange message in the upper right of Jupyter). The notebook port (8888) is open in the firewall settings. iPython notebook returns the following:
[I 19:21:10.152 NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[I 19:21:10.169 NotebookApp] Serving notebooks from local directory: /home/rattlerray
[I 19:21:10.170 NotebookApp] 0 active kernels
[I 19:21:10.170 NotebookApp] The IPython Notebook is running at: https://[all ip addresses on your system]:8888/
[I 19:21:10.170 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 19:22:13.835 NotebookApp] 302 GET / (98.169.96.157) 0.85ms
[I 19:22:31.902 NotebookApp] Creating new notebook in
[I 19:22:33.634 NotebookApp] Kernel started: 011d8a15-0e4a-448a-b02a-4121780e4bb6
If anyone has run into this before and can offer some things to check, I'd appreciate it. Googling around hasn't helped and I'd really like to get this working on the cloud. Thanks!
I am using EC2 but encounter same problem.
I uses SSL told in the tutorial, after login and open a notebook in Safari always showing "Connecting to kernel". Then I try Chrome, which gives warning about certificate but works fine.
Then I comment the certificate in config file, then open in Safari it works fine.
If you are using Firefox, may be this issue Unable to contact kernel in Firefox after updating to ipython 3.0
Hope this will help.
Update:
The issue is reported on Github: https://github.com/ipython/ipython/issues/8621. As said in the post, this is the limitation of Safari. If you still want to use SSL to visit Notebook, you have to add the certificate into your keychain and trust it. Check the help posted by Apple: https://support.apple.com/kb/PH18677?locale=en_US
Another way you can connect to your IPython (Jupyter) Notebook server is by opening an SSH tunnel with port forwarding. I wrote a how-to post describing my own workflow. I'm using Google Compute Engine from within Chrome but many of the steps are analogous to other setup variations:
https://stharrold.github.io/20151208-ipynb-on-gce-from-chrome.html
Excerpt:
"""
Brief setup routine:
* Start [your] virtual machine instance.
* Start a Jupyter Notebook server on the instance:
$ jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser &
$ disown 1234 (where 1234 is the process ID)
* Create an SSH tunnel to forward a local port to the server's port on the instance:
$ ssh -f -N -L localhost:8888:0.0.0.0:8888 samuel_harrold#123.123.123.123
For [the] Chrome [app] Secure Shell, omit -f to keep the tunnel open (see screenshot [in post]).
* View the server at http://localhost:8888
"""
Additional details are in the post.

Categories

Resources