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.

Variable explorer doesn't show variables on remote kernel when using localhost forwarded ports

See original GitHub issue

Issue 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 (or pip, 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?

  1. Start a Kernel on the remote system using --ip=127.0.0.1 and snag the json configuration file
  2. Use SSH port forwarding (e.g. PuTTY => Connection->SSH->Tunnels) to forward all remote ports in the config to localhost ports
  3. Copy the JSON config locally
  4. “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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
impact27commented, Mar 12, 2021

@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

0reactions
fohriacommented, Nov 24, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spyder: variable explorer does not show ... - Stack Overflow
Spyder variable explorer works fine for a local kernel; however, it does not work for the remote kernel. Indeed, the connection to the...
Read more >
Remote Computing with Jupyter Notebooks | by Bobby Lindsey
Now in a new terminal on your laptop, forward your server's port traffic to your laptop's local port: ssh -N -L localhost:8888:localhost:8889 your_username@ ......
Read more >
Chapter 47. Getting started with nftables Red Hat Enterprise ...
The nft command does not pre-create tables and chains. ... variables in nftables script. To define a variable in an nftables script, use...
Read more >
Host ASP.NET Core on Linux with Nginx - Microsoft Learn
Learn how to set up Nginx as a reverse proxy on an Ubuntu 20.04 VM to forward HTTP traffic to an ASP.NET Core...
Read more >
Jupyter notebooks in PyCharm - Caitlin Casar
Note:Unfortunately, you cannot view your variables while using a remote Jupyter server kernel as documented here. Congrats on developing in ...
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