IPython laptop cannot connect to kernel on google-compute-engine

I am trying to get an ipython / jupyter laptop running as a laptop server in Google Compute Engine (Ubuntu 14.04 VM) but cannot connect to Python core.

I started with the latest Anaconda distribution. I can connect to the laptop server from a local machine over the Internet, browse the virtual machine directory tree and create a new laptop, but never connect to the kernel (orange message in the top right corner of Jupyter). Laptop port (8888) is open in 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 encountered this before and can suggest some things to check, I would appreciate it. A google search didn't help and I would really like to see this work working on the cloud. Thank!

+3


source to share


2 answers


I am using EC2 but am facing the same problem.

I am using SSL mentioned in the tutorial after logging in and opening a laptop in Safari, always showing "Connect to core". Then I start Chrome which gives a certificate warning but works fine.

Then I will comment out the certificate in the config file, then open in Safari, it works fine.



If you are using Firefox this may be the problem Unable to contact kernel in Firefox after upgrading to ipython 3.0

Hope this helps.

Update : The issue is reported on Github: https://github.com/ipython/ipython/issues/8621 . As said in the post, this is a Safari limitation. If you still want to use SSL to visit your laptop, you need to add the certificate to your keychain and trust it. Contact Apple for help: https://support.apple.com/kb/PH18677?locale=en_US

+8


source


Another way to connect to the IPython notebook server (Jupyter) is to open an SSH tunnel with port forwarding. I wrote a guide to describe my own workflow. I'm using the Google Compute Engine from Chrome, but many of these steps are similar to other setup options:
https://stharrold.github.io/20151208-ipynb-on-gce-from-chrome.html

Excerpts:
""
Brief setup:
* Start [your] virtual machine instance.
* Start the 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 the local port to the server 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 open the tunnel (see screenshot [ in the message]).
* View server on http://localhost:8888


""



See the post for more information.

+1


source







All Articles