These are chat archives for spyder-ide/public

23rd
Mar 2019
dcd2
@dcd2_gitlab
Mar 23 15:41
Any tips on troubleshooting connecting Spyder to a (local) Docker container running an anaconda environment? I've installed a SSH server into the container and can access it via ssh (or through standard Docker commands).
Stuck on "Connecting to kernel..." message.
dcd2
@dcd2_gitlab
Mar 23 15:46
Spyder 3.3.3 (Python 3.7), Docker version 18.09.2, build 6247962
CAM Gerlach
@CAM-Gerlach
Mar 23 16:40
@dcd2_gitlab You have followed all the steps in our guide on the topic, correct, including installing paramiko if on Windows, launching the kernel on the host with the latest version of Spyder-Kernels for your Spyder version, entering all the correct connection information, and ensuring the connection isn't blocked by your firewall/security software?
dcd2
@dcd2_gitlab
Mar 23 18:09
@CAM-Gerlach - thanks for the reply (on the weekend no less!). Yes, I've followed that specific guide. Everything is run on a single Linux host (laptop). On the host, Spyder was installed on top of the base miniconda install. Within the Docker image, which also uses a base miniconda install, I installed spyder-kernels (1.3.2 py37_0). I don't believe the firewall is blocking the ports necessary. Any advice here? Cheers
dcd2
@dcd2_gitlab
Mar 23 18:20
I've tried connecting to the Docker image using both the generated json file, and via ssh. Both options lead to getting stuck at "Connecting to kernel".
dcd2
@dcd2_gitlab
Mar 23 18:26
ps - ran ufw disable had no effect.
dcd2
@dcd2_gitlab
Mar 23 19:28
@CAM-Gerlach - last potentially oddity I noticed: The Docker image based on miniconda, which I installed spyder-kernels into (without Spyder), uses spyder-kernels 1.3.2-py37_0, whereas the host with Spyder and spyder-kernels uses spyder-kernels 0.4.2-py37_0. Quite the difference. Installing Spyder in the Docker image downgrades spyder-kernels: spyder-kernels 1.3.2-py37_0 --> 0.4.2-py37_0. Not sure the apparent large downgrade is indicative of another issue, but I still can't connect when both the host and the Docker image have the same version of spyder-kernels (both now at 0.4.2-py37_0).
CAM Gerlach
@CAM-Gerlach
Mar 23 20:54
@dcd2_gitlab What matters, as should be discussed in the guide, is that Spyder 3.x needs to connect to Spyder-Kernels 0.x, and Spyder 4.x needs Spyder-Kernels 1.x. Otherwise, it won't work. You need to connect to it over SSH, and ensure all your settings and credentials are correct and you're able to access it via SSH from your host system via those same credentials (which it sounds like you've done). Further, you need both the SSH credentials and correct connection file for the Spyder-Kernel you launched inside the Docker container (you'll need to scp it back to the host). Make sure the Spyder-Kernel is successfully launched and running on the Docker container. Make sure you've set the SSH port correctly to the one you've exposed in Docker.
Sorry if any of that is redundant; it sounds like you know what you're doing. But I just wanted to explore every possibility as to why it might not be working.

on the weekend no less!

Heh, the weekend is when I get most of my Spyder-related stuff done, since I'm not so busy with the actual research I'm paid to do, although I'm on a vacation now so I haven't gotten much done at all lately.