Skip to content
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

[Remote-SSH Bug]: After one of the latest releases, it doesnt respect remote.SSH.serverPickPortsFromRange #10043

Closed
3 tasks done
rgulden opened this issue Jul 8, 2024 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug ssh Issue in vscode-remote SSH

Comments

@rgulden
Copy link

rgulden commented Jul 8, 2024

Is there an existing issue for this bug?

  • I have searched the existing issues

Required Troubleshooting Steps

  • I have followed these troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting

Connect Locally

It doesn’t connect successfully (same error message)

Version

vscode-portable 1.91.0 -- installed via Scoop on windows.

Expected Behavior

Expected is VSCode remote server will start on one of the ports from the range

Steps To Reproduce

Attempt to connect to a remote machine and set your server pick port range.

Example settings as below:

{
    "remote.SSH.serverPickPortsFromRange": {
        "my_hostname": "60000-60001"
    },
    "remote.SSH.remotePlatform": {
        "my_hostname": "linux"
    },
    "remote.SSH.enableDynamicForwarding": false
}

Remote-SSH Log

Remote-SSH Log

[16:43:28.747] > Starting VS Code CLI... "/home/jupyter/.vscode-server/code-ea1445cc7016315d0f572
> 8f8e8b12a45dc0a7286" command-shell --cli-data-dir "/home/jupyter/.vscode-server/
> cli" --on-port --on-host=127.0.0.1 --parent-process-id 2832 &> "/home/jupyter/.v
> scode-server/.cli.ea1445cc7016315d0f5728f8e8b12a45dc0a7286.log" < /dev/null   

Anything else?

As you can see from the log, it is not giving a port to --on-port even when the following config is passed [16:43:27.009] "remote.SSH.serverPickPortsFromRange": {"my_hostname":{"start":60000,"end":60001}}

Error message if cant use port [11:56:51.530] > channel 3: open failed: administratively prohibited: open failed on remote machine.

In the following issue a similar problem happened with OnHost, I would think the fix is similar. #9963

@rgulden rgulden added the ssh Issue in vscode-remote SSH label Jul 8, 2024
@laustindasauce
Copy link

I'm experiencing the same issue

@rgulden
Copy link
Author

rgulden commented Jul 26, 2024

@roblourens @connor4312 - Is there anyway you could quickly look into this. I believe its a quick fix based off of the linked issue. Thanks!

@roblourens roblourens assigned connor4312 and unassigned roblourens Jul 26, 2024
@roblourens
Copy link
Member

Looks like this isn't respected for execServer mode, you can disable useExecServer if you need it

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Jul 26, 2024
@rgulden
Copy link
Author

rgulden commented Jul 26, 2024

@roblourens - that worked! What does this setting even mean? Is it using a old way to launch the remote server when this is disabled? Thanks for responding!

@joshspicer
Copy link
Member

@rgulden There's a little bit of info in this wiki - https://github.com/microsoft/vscode-remote-release/wiki/Remote-SSH-troubleshooting#remotesshuseexecserver---exec-server-mode. Having this setting enabled utilizes the VS Code CLI

@connor4312
Copy link
Member

This'll be fixed in the prerelease of Remote - SSH on VS Code Insiders next week

connor4312 added a commit to microsoft/vscode that referenced this issue Jul 26, 2024
* cli: allow listening on range of ports

For microsoft/vscode-remote-release#10043

* clippy lint
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

5 participants