question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spyder Crashes on Windows During Remote Kernel Connection

See original GitHub issue

This issue occurs for me on both spyder 2.3.4 and 2.3.5.2. I am running Windows 8.1 (x64), with Python 3.4.3 installed.

SSH keys are configured such that no password is needed to connect to server

From Git-Bash

ogi@OGI-DESKTOP ~/.ssh
$ ssh ogi@ubuntu
Welcome to Ubuntu 15.04 (GNU/Linux 3.19.0-21-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sun Jun 28 13:10:40 PDT 2015

  System load:  0.04               Processes:           166
  Usage of /:   27.4% of 21.29GB   Users logged in:     1
  Memory usage: 6%                 IP address for eth0: 192.168.1.13
  Swap usage:   0%                 IP address for eth1: 192.168.1.133

  Graph this data and manage this system at:
    https://landscape.canonical.com/

0 packages can be updated.
0 updates are security updates.

Last login: Sun Jun 28 13:02:28 2015 from 192.168.1.120
ogi@ubuntu:~$

I can confirm a connection with Paramiko (note: I had to apply some commits from a fork due to a known_hosts issue here: https://github.com/paramiko/paramiko/pull/473 )

IPython QtConsole 3.2.0
Python 3.4.3 |Continuum Analytics, Inc.| (default, Mar  6 2015, 12:06:10) [MSC v.1600 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 3.2.0 -- An enhanced Interactive Python.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
%guiref   -> A brief reference about the graphical user interface.

In [1]: import paramiko

In [2]: client = paramiko.SSHClient()

In [3]: client.load_system_host_keys()

In [4]: server = 'ubuntu'

In [5]: username = 'ogi'

In [6]: port = 22

In [7]: keyfile = "C:\\Users\\ogi\\.ssh\\id_rsa"

In [8]: client.connect(server, port, username=username, key_filename=keyfile, look_for_keys=True)

In [9]: 

Generating the kernel on my server:


ogi@ubuntu:~$ ipython kernel --ip='*'
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing kernel-4481.json

In my working directory, I have my kernel-4481.json file with the following contents:

{
  "signature_scheme": "hmac-sha256",
  "control_port": 43208,
  "stdin_port": 42048,
  "ip": "0.0.0.0",
  "key": "076d1b3b-a644-4996-bb5e-ef810109c9b3",
  "transport": "tcp",
  "shell_port": 40174,
  "iopub_port": 56122,
  "hb_port": 48740
}

Here is a screen grab of my image before I click Ok and cause the crash: http://i.imgur.com/1y1XWfN.png

Suggestions?

EDIT: 6/29/2015 - fixed a typo and inserted some better punctuation.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
arita297commented, May 27, 2016

Just wondering if there is a way to connect to Docker Linux Ipython running, I have similar error connection.

Thanks

0reactions
wuyingmmcommented, Oct 7, 2015

I am trying to start a remote IPython process (kernel) in remote server and connect Spyder to it. But still fighting with this!!!

The remote server is Ubuntu server running as Virtual Machine (VirtualBox). The IP is 10.0.2.15.

Local Spyder is running on Windows 7. Version is 2.3.5.2.

I define port forward in VirtualBox from 127.0.1.1:22 to 10.0.2.15:22, by which I can use PuTTY to connect to the remote server by SSH.

Anaconda is installed in the remote server. To start a ipython kernel on the remote server, I use:

image

I copy the kernel-remote.json file from the remote server to my local Windows.

Then in my local Spyder, I add the remote kernel as:

image

Then when I click OK to connect, the python crashes with the error message:

image

Then I open a command window, try to connect to the remote ipython kernel by:

image

I get the error message below:

image

Now I am confused it is the problem from Spyder, or IPython, or the configuration of remote server. I lose my direction where to go. Using the remote kernel is very important in my project, so Please help me!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ipython console in Spyder stuck on "connecting to kernel"
I have solved by uninstalling and reinstalling python(x,y) AND deleting related folders (.ipython and .spyder2) in the user folder, but I still ...
Read more >
Common Illnesses — Spyder 5 documentation
If you receive the message An error occurred while starting the kernel in the IPython Console, Spyder was unable to launch a new...
Read more >
spyderlib - Google Code
ID Status Summary 2225 New Memory error Type‑Defect Priority‑Medium 2223 New file "" Type‑Defect Priority‑Medium 2221 New M Type‑Defect Priority‑Medium
Read more >
Connecting Spyder IDE to a remote IPython kernel - Medium
Doing data science in Jupyter notebook is fun but sometimes you need the ability to poke into variables using the handy variable explorer...
Read more >
Configuring Jupyter Notebook in Windows Subsystem Linux ...
Install GUI and Remote Desktop to WSL2 to lunch GUI required like Spyder or Anaconda Navigator; Thanks; Some helpful resources. First, install WSL2....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found