ipython/ipython — Issue #1308: ipython qtconsole  --ssh=server --existing ... hangs
Author: bshanks
Created: 2012-01-21 06:27:48+00:00
State: open

I have a server running on a Linode VPS, and a client which is my home computer. The server is running Debian 6, and the client is running Ubuntu 11.10. Both have ipython 0.12. i do the following on my server (server name and usernames changed to server and myserveruser):

myserveruser@linode:~$ ipython kernel --debug
[IPKernelApp] Config changed:
[IPKernelApp] {'IPKernelApp': {'log_level': 10}}
[IPKernelApp] Using existing profile dir: u'/home/myserveruser/.ipython/profile_default'
[IPKernelApp] Searching path [u'/home/myserveruser', u'/home/myserveruser/.ipython/profile_default'] for config files
[IPKernelApp] Attempting to load config file: ipython_config.py
[IPKernelApp] Config file ipython_config.py not found
[IPKernelApp] Attempting to load config file: ipkernel_config.py
[IPKernelApp] Config file not found, skipping: ipkernel_config.py
[IPKernelApp] Connection file not found: kernel-27632.json
[IPKernelApp] Starting the kernel at pid: 27632
[IPKernelApp] shell ROUTER Channel on port: 64300
[IPKernelApp] iopub PUB Channel on port: 63881
[IPKernelApp] stdin ROUTER Channel on port: 63235
[IPKernelApp] Heartbeat REP Channel on port: 58253
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp] --existing kernel-27632.json
[IPKernelApp] Loading IPython extensions...
[IPKernelApp] Loading IPython extension: storemagic

and then i do the following on my client (username changed to myuser):

$ scp myserveruser@server:.ipython/profile_default/security/kernel-27632.json /home/myuser/ipython-kernel-myserveruser-1.json
kernel-27632.json 100% 166 0.2KB/s 00:00
myuser@home:~$ ipython qtconsole --ssh=server --existing ~/ipython-kernel-myserveruser-1.json --debug
[IPythonQtConsoleApp] Config changed:
[IPythonQtConsoleApp] {'Application': {'log_level': 10}, 'IPythonQtConsoleApp': {'sshserver': u'server', 'existing': u'/home/myuser/ipython-kernel-myserveruser-1.json'}}
[IPythonQtConsoleApp] Using existing profile dir: u'/home/myuser/.ipython/profile_default'
[IPythonQtConsoleApp] Searching path [u'/home/myuser', u'/home/myuser/.ipython/profile_default'] for config files
[IPythonQtConsoleApp] Attempting to load config file: ipython_config.py
[IPythonQtConsoleApp] Config file ipython_config.py not found
[IPythonQtConsoleApp] Attempting to load config file: ipython_qtconsole_config.py
[IPythonQtConsoleApp] Config file not found, skipping: ipython_qtconsole_config.py
[IPythonQtConsoleApp] Connecting to existing kernel: /home/myuser/ipython-kernel-myserveruser-1.json
[IPythonQtConsoleApp] Loading connection file /home/myuser/ipython-kernel-myserveruser-1.json
[IPythonQtConsoleApp] Forwarding connections to 127.0.0.1 via server

[IPythonQtConsoleApp] To connect another client via this tunnel, use:
[IPythonQtConsoleApp] --existing ipython-kernel-myserveruser-1-ssh.json

the result is that nothing happens for over a minute, and then finally a window comes up on the client which reads

----
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
Type "copyright", "credits" or "license" for more information.

IPython 0.12 -- An enhanced Interactive Python.
? -> 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.
----

there is no prompt below this -- i cannot enter commands. If i click my mouse in the middle of the text already in the window, there is no cursor, but then if i press enter, a newline is created, with dots, like this:

Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
Type "copyright", "credits" or "license" for more information.

----
IPython 0.12 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for ex
...
...
...
...
...
...
...
...
... tra details.
%guiref -> A brief reference about the graphical user interface.
----

Other than that, i can't seem to do anything. Characters other than newline do not appear on the screen (typing any key except for Enter appears to have no effect) -- ipython has hung. I waited for about 10 minutes and then gave up.

I can ssh from the client to the server normally and it doesn't take a minute to connect. IPython works fine in console mode on both machines. There are other programs taking up memory on the server but the CPU is 92% idle.

thanks