Variable explorer doesn't show variables on remote kernel when using localhost forwarded ports
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole
(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset
- Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- [x ] Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
Simply put, it’s the same behavior as Issue #11538 (recently marked resolved but seems like still an issue in this case)… I connect to an existing remote kernel, but the variable explorer never populates.
In this case, the remote kernel is accessed via localhost forwarded ports over an SSH session. I don’t know if that matters or not.
The remote system uses two factor authentication to log in even on SSH shells. I suspect the challenge response interactivity during the login session is unexpected by the typical “remote SSH connection” configuration the Spyder console expects. To get around this fact, or other firewall block issues, I forward the localhost ports over an existing SSH tunnel link. Putty makes it straightforward to configure the multiple ports required in a reusable session config.
Here’s an online guide: https://medium.com/@mazzine.r/how-to-connect-your-spyder-ide-to-an-external-ipython-kernel-with-ssh-putty-tunnel-e1c679e44154
What steps reproduce the problem?
- Start a Kernel on the remote system using --ip=127.0.0.1 and snag the json configuration file
- Use SSH port forwarding (e.g. PuTTY => Connection->SSH->Tunnels) to forward all remote ports in the config to localhost ports
- Copy the JSON config locally
- “Connect to an existing kernel” in Spyder, use the JSON config (bc of port forwards, no remote host config required)
What is the expected output? What do you see instead?
Expected: Variable explorer to populate Actual: Variable Explorer remains completely blank, even if variables are assigned directly inside that console window
Versions
- Spyder version: 4.2.3 (Latest as of submission)
- Python version: 3.8.5
- Qt version:
- PyQt version:
- Operating System name/version: Local Spyder: Windows 10 Remote IPython Kernel: an updated RedHat based system I have no control over
Dependencies: Remote IPython Kernel: 1.10.2
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (7 by maintainers)
Top GitHub Comments
@venkateshsathya Your use case should be covered by https://github.com/spyder-ide/spyder/pull/14447. Make sure you have the latest version of spyder and spyder-kernels both locally and remotely.
The way it works is that the comm port number should be automatically transferred to the frontend by the other channels. So If you connect via ssh, the ports need to be forwarded. It should happen automatically since 4.2.2
heya! any chance the pull request mentioend here will be merged soon? i suspect it may resolve my issue on variable explorer not updating properly (or at all) when connecting to remote kernel running in WSL2 on the same machine