-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable explorer doesn't show variables on remote kernel when using localhost forwarded ports #14894
Comments
Hey @MikeFair, I think the problem is (as it was in #11538) that we have a non-standard port (called comms) which is not forwarded. That's because we create it at runtime, so it's not part of the kernel's json config file. Unfortunately, that port is in charge of all communications between the kernel and Spyder, so not only the Variable Explorer, but also the debugger stop working when it's not found. What @impact27 did to solve issue #11538 was to forward that port when users enter their SSH credentials in our dialog for that. Since you're manually forwarding the kernel ports through Putty, his solution doesn't take effect. So the solution would be to ditch that port and use instead a standard one. However, that became possible only a few weeks ago, thanks to ipython/ipykernel#585 (because we needed that port to be threaded). But let's wait to hear from @impact27 to see if what I think is right. |
That is correct. The solutions I can think of are: |
When I looked at @impact27's patch to resolve #11538 this additional "comms port" did seem to be the missing piece, but as mentioned, wasn't in the JSON config. That being said, adding it to the JSON config, or at least giving me a way to query it at runtime, would be the easiest solutions. Another solution might be to enable the SSH Connection dialog to handle more complex interactivity, enabling me to actually just log in via SSH to the remote machine, but (1) that seems like a stretch, and (2) it seems to me a "port forward friendly" solution would be preferable overall. Out of curiosity I noticed that it appears Spyder is using ZeroMQ for its message routing. That being the case, what about creating a single "multiplex channel" that only uses a single OS level resource object (IP Port (default), Serial Port, Named Pipe, whatever) and then use ZMQ's queueing functions to multiplex all the Spyder comms over that backbone and eliminate the use of multiple ports and "future proofing" to enable as many separate channels internally as you'd like? IIRC it's exactly one of the core use case scenarios ZMQ had in mind when it was constructed... |
@MikeFair Open the internal console (Panes > Internal console) Then type: |
Or merge spyder-ide/spyder-kernels#281 |
We want to use ipython channels to be compatible with ipython kernels. Unfortunately, ipykernel was running all the channels in the same thread, so there was no way of doing something while the main thread was running. This is why we added a new channel. With the new version of ipykernel the control channel is running on a separate thread, solving this issue. |
Hi Guys, I am facing the same issue. The way I am connecting is:
As a temporary workaround, what would you guys suggest?. MY JSON contents are as follows. Do I create a separate field such as "comm_port": 56975. "{ |
@venkateshsathya Your use case should be covered by #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 |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
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?
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
Local Spyder: Windows 10
Remote IPython Kernel: an updated RedHat based system I have no control over
Dependencies:
Remote IPython Kernel: 1.10.2
The text was updated successfully, but these errors were encountered: