I've been working on a locally hosted notebook for a while with no problems. However, I recently re-opened the notebook and found all of my cells to be overlapping, as shown in the image below:
If I move the cells up and down again they seem to re-align correctly. The only change I can think of that may have caused this was that I recently updated my anaconda package. All of the output to the console appears normal to me.
2014-10-10 08:22:45.531 [NotebookApp] Using existing profile dir: u'/Users/uname/.ipython/profile_default'
2014-10-10 08:22:45.535 [NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
2014-10-10 08:22:45.726 [NotebookApp] Serving notebooks from local directory: /Users/uname/cwd
2014-10-10 08:22:45.727 [NotebookApp] 0 active kernels
2014-10-10 08:22:45.727 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2014-10-10 08:22:45.727 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
2014-10-10 08:23:00.197 [NotebookApp] Kernel started: fa1fcfaf-c04f-4af0-a8da-6199a5e1d7ca
Any idea what might be causing this?
System Info:
Python 2.7.8 :: Anaconda 2.1.0 (x86_64)
Mac OS X Version 10.9.4
Google Chrome Version 39.0.2171.13 beta (64-bit)
Downgrade chrome. V39.x is supposed to be dev. Bug is apparently fixed on chrome canary.
Works perfectly fine in Firefox.
Downgrading chrome might cause some security vulnerabilities to be exposed.
Related
The Jupyter notebook keeps saying Connecting to kernel, which never reaches finally popping an error,
A connection to the notebook server could not be established. The notebook will continue
trying to reconnect. Check your network connection or notebook server
configuration.
So the asterisk on the command line stays forever.
The strange part is, iPython on terminal works FINE.
Here are what I tried:
Change the browser from Chrome to Firefox
Change port number into something else than '8888'
Uninstalled the Jupyter and re-installed it
Anybody with similar issues?
I had a similar issue. It was caused by the tornado-package and I had to downgrade it.
sudo pip3 uninstall tornado
sudo pip3 install tornado==5.1.1
See Jupyter notebook: No connection to server because websocket connection fails
I have found this same issue, and identified it only happens with Chrome standard browser. Incognito Chrome or Firefox does not have the same issue of ipykernel not connecting.
For now I open jupyter in firefox using the following command from Terminal:
jupyter lab --browser Firefox
Not sure what the difference is with the browsers, but recently I have had an issue of not being able to access local files from chrome, so will look into this issue and see if that resolves it for Chrome standard browser.
I'm using python3.5 and jupyter 4.0.6. I launched the jupyter notebook, and get the following output:
[I 21:47:27.021 NotebookApp] Serving notebooks from local directory: /home/nitrous
[I 21:47:27.021 NotebookApp] 0 active kernels
[I 21:47:27.021 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 21:47:27.022 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 21:47:27.023 NotebookApp] No web browser found: could not locate runnable browser.
on my firefox browser, I typed the specified localhost url: http://localhost:8888/ but I get unable to connect error message. What am I missing? is the hint of the problem on this line:
[W 21:47:27.023 NotebookApp] No web browser found: could not locate runnable browser.
it is my first time using the notebook. I tried to put the below code in the jupyter_notebook_config.py file but to no avail:
c.NotebookApp.open_browser = True
c.NotebookApp.browser = 'firefox'
it also says 0 active kernels. is that a problem?
If you are running your jupyter notebook in a VM (mostly on a linux vm on a windows guest) and trying to access from guest, you will need to launch Jupyter Notebook with right options. Please try to run it like below and it should work.
jupyter notebook --ip=0.0.0.0 --no-browser
Please check the ip of the VM before you enter the URL in firefox. you can use
ifconfig
command for this.
While running Jupyter on my ec2 instance I had faced the same issue.
I resolved it by executing the following command :
jupyter notebook --no-browser
Initially it will show 0 active kernels, once we start creating notebooks on different environments like Python,R etc it will show us the number of active kernels.
I had a similar problem but with Chrome. I dont know in firefox but in chrome, Settings-> Enable guest browsing.
I have a similar problem at first. I solve it by changing the following line in jupyter_notebook_config.py:
c.NotebookApp.browser = r"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe --app=%s"
I guess adding prefix "r" prefix to convert the string to raw string has actually solved this problem.
I have launched an AWS EMR cluster following the steps on the EMR page. After connecting through SSH (putty in Windows 7) and enabling foxyproxy (Chrome), it launched fine and can be accessed in my laptop browser.
Pyspark and sparkR come with the EMR Spark 1.6.0 installation and work perfectly in the terminal.
The ports for Hue etc. work fine in the following format:
ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com:/
I installed Jupyter by following the steps on http://jupyter.readthedocs.org/en/latest/install.html#using-pip
sudo pip install jupyter
I opened a new notebook with
jupyter notebook
It opened a browser in the terminal that I shut down. It gave the following output:
[I 14:32:12.001 NotebookApp] Writing notebook server cookie secret to /home/hadoop/.local/share/jupyter/runtime/notebook_cookie_secret
[I 14:32:12.033 NotebookApp] The port 8888 is already in use, trying another random port.
[I 14:32:12.037 NotebookApp] Serving notebooks from local directory: /home/hadoop
[I 14:32:12.037 NotebookApp] 0 active kernels
[I 14:32:12.038 NotebookApp] The Jupyter Notebook is running at: http://localhost:8889/
[I 14:32:12.038 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
I tried accessing it in my browser by:
localhost:8889/
(didn't work of course)
then by:
ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com:8889/
(replacing the x's), but this gave an error as well.
This webpage is not available
ERR_CONNECTION_RESET
So how can I access Jupyter in my local browser when it has been installed on the head node of an EMR cluster?
I haven't actually used Jupyter yet, but I tried installing and running it like you did, and I noticed that Jupyter is configured by default to listen only on localhost, which is why you can't access it from your browser.
I then found that running "jupyter notebook --generate-config" would generate a config file ~/.jupyter/jupyter_notebook_config.py, which you can edit in order to make it listen on 0.0.0.0 instead of localhost. Just change c.NotebookApp.ip to '0.0.0.0' and uncomment the line.
After doing this, I was able to access Jupyter from my browser using a URL like http://ip-10-168-157-117.ec2.internal:8888/. (Mine is listening on port 8888 by default, but I'm assuming yours started on port 8889 due to having Hue installed and listening on port 8888 already.)
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.
Despite being listed in the ipython-notebook doc as one of the supported browsers, Safari 5.1.10 running on OSX 10.6.8(64bit) can not run IPython-notebook fully functionally. ipython version 2.2.0, in anaconda python environment.
Safari displays the list of notebooks OK. Every aspects seem to be fine until one opens (or creates a new) notebook. A error message shows up:
"A WebSocket connection could not be established.
You will NOT be able to run code.
Check your network connection or notebook server configuration."
Basically the cell shows up alright, but you can't run them.
Firefox 32.0.3 can, however, fully functions with IPython notebook. Therefore it is not a IPython notebook problem. Therefore there is no error message in the terminal, i.e:
6600sls-Mac-Pro:~ bio101sl$ ipython notebook --no-browser
2014-11-11 12:23:39.339 [NotebookApp] Using existing profile dir: u'/Users/bio101sl/.ipython/profile_default'
2014-11-11 12:23:39.369 [NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
2014-11-11 12:23:39.541 [NotebookApp] Serving notebooks from local directory: /Users/bio101sl/IPython_NB
2014-11-11 12:23:39.542 [NotebookApp] 0 active kernels
2014-11-11 12:23:39.542 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2014-11-11 12:23:39.542 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Seems to be a Safari - websocket related problem. Is there any settings in Safari has to be changed to get it work? Unfortunately ipython-notebook doc doesn't provide any hint on that.
Turns out not to be a browser issue either. It has to do with the tornado 4.0.2 shipped with anaconda, which is not compatible with Safari 5.1.10. Downgrade tornado to 3.2.2 solved the problem, in terminal:
conda install tornado=3.2
3.2.2 appears to be the last version that will work with Safari 5.1.10
I had similar problem using Safari 5.1.7 on Windows. Solution: I set Chrome version 40.0.2214.115 m as default browser.