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

getsockname failed: Not a socket, Failed to parse remote port from server output #1309

Closed
dreamflasher opened this issue Aug 28, 2019 · 6 comments
Labels
info-needed Issue requires more information from poster

Comments

@dreamflasher
Copy link

dreamflasher commented Aug 28, 2019

The error happens in three out of four cases, my setup is the following:
(client → server connection attempt)

  1. laptop → ND40sv2 (Ubuntu 19.04)
  2. laptop → IMpersonal (Ubuntu 18.04.2 LTS)
  3. desktop → ND40sv2 (Ubuntu 19.04)
  4. desktop → IMpersonal (Ubuntu 18.04.2 LTS)
  • Remote SSH version: 0.45.6
  • Local OS Version: Windows 10
  • Remote Extension/Connection Type: SSH

desktop and laptop:
image

SSH connection works in all four combinations.

1) laptop → ND40sv2 (Ubuntu 19.04)

[07:47:06.150] win32 x64
[07:47:06.152] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a226d617263656c5f4e443430737632227d", attempt 1
[07:47:06.152] SSH Resolver called for host: ND40sv2
[07:47:06.152] Setting up SSH remote "ND40sv2"
[07:47:06.185] Using commit id "f06011ac164ae4dc8e753a3fe7f9549844d15e35" and quality "stable" for server
[07:47:06.189] Testing ssh with ssh -V
[07:47:06.314] ssh exited with code: 0
[07:47:06.314] Got stderr from ssh: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[07:47:06.315] Running script with connection command: ssh -o ClearAllForwardings=true ND40sv2 bash
[07:47:06.321] Install and start server if needed
[07:47:06.431] > 
[07:47:06.432] Got some output, clearing connection timeout
[07:47:06.919] > �]0;C:\WINDOWS\SYSTEM32\cmd.exe�
[07:47:28.003] > ssh: connect to host 40.114.123.58 port 22: Connection timed out
> 
[07:47:28.014] > Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
> 
[07:47:28.311] "install" terminal command done
[07:47:28.311] Install terminal quit with output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:47:28.312] Received install output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:47:28.313] Failed to parse remote port from server output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:47:28.313] 
[07:47:28.313] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"UnparsableOutput"},"measures":{"resolveAttempts":1,"retries":1}}
[07:47:28.314] ------

2) laptop → IMpersonal (Ubuntu 18.04.2 LTS)

works again (has been working previously, didn't work after an update, works again after the latest update)

3) desktop → ND40sv2 (Ubuntu 19.04)

[07:47:36.063] remote-ssh@0.45.6
[07:47:36.063] win32 x64
[07:47:36.063] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a226d617263656c4e443430737632227d", attempt 1
[07:47:36.063] SSH Resolver called for host: ND40sv2
[07:47:36.063] Setting up SSH remote "ND40sv2"
[07:47:36.081] Using commit id "f06011ac164ae4dc8e753a3fe7f9549844d15e35" and quality "stable" for server
[07:47:36.085] Testing ssh with ssh -V
[07:47:36.156] ssh exited with code: 0
[07:47:36.156] Got stderr from ssh: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[07:47:36.157] Running script with connection command: ssh -o ClearAllForwardings=true ND40sv2 bash
[07:47:36.159] Install and start server if needed
[07:47:36.423] > 
[07:47:36.424] Got some output, clearing connection timeout
[07:47:36.508] > getsockname failed: Not a socket
> packet_write_poll: Connection to UNKNOWN port -1: Permission denied
> Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
> 
[07:47:36.964] "install" terminal command done
[07:47:36.964] Install terminal quit with output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:47:36.964] Received install output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:47:36.964] Failed to parse remote port from server output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:47:36.964] 
[07:47:36.964] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"UnparsableOutput"},"measures":{"resolveAttempts":1,"retries":1}}
[07:47:36.964] ------

4) desktop → IMpersonal (Ubuntu 18.04.2 LTS)

does not work again (has been working previously, didn't work after an update, does not work again after the latest update)

[07:40:27.029] remote-ssh@0.45.6
[07:40:27.029] win32 x64
[07:40:27.030] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a22494d706572736f6e616c227d", attempt 1
[07:40:27.030] SSH Resolver called for host: IMpersonal
[07:40:27.030] Setting up SSH remote "IMpersonal"
[07:40:27.048] Using commit id "f06011ac164ae4dc8e753a3fe7f9549844d15e35" and quality "stable" for server
[07:40:27.050] Testing ssh with ssh -V
[07:40:27.129] ssh exited with code: 0
[07:40:27.129] Got stderr from ssh: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[07:40:27.130] Running script with connection command: ssh -o ClearAllForwardings=true IMpersonal bash
[07:40:27.131] Install and start server if needed
[07:40:27.434] > 
[07:40:27.434] Got some output, clearing connection timeout
[07:40:27.508] > getsockname failed: Not a socket
> packet_write_poll: Connection to UNKNOWN port -1: Permission denied
> Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
> 
[07:40:27.940] "install" terminal command done
[07:40:27.940] Install terminal quit with output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:40:27.940] Received install output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:40:27.941] Failed to parse remote port from server output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.
[07:40:27.941] 
[07:40:27.941] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"UnparsableOutput"},"measures":{"resolveAttempts":1,"retries":1}}
[07:40:27.942] ------
@roblourens
Copy link
Member

SSH connection works in all four combinations.

So if you connect from a terminal with ssh <hostname> it works?

What does your ssh config look like?

@roblourens roblourens added the info-needed Issue requires more information from poster label Sep 1, 2019
@dreamflasher
Copy link
Author

SSH connection works in all four combinations.

So if you connect from a terminal with ssh <hostname> it works?

exactly

What does your ssh config look like?

IdentityFile "C:\Users\df\.ssh\id_rsa"

Host IMpersonal
    User ubuntu
    HostName 52.166.240.77
    IdentityFile "C:\Users\df\.ssh\id_rsa"

Host ND40sv2 
    User ubuntu
    HostName 40.114.123.58
    IdentityFile "C:\Users\df\.ssh\id_rsa"

@roblourens
Copy link
Member

Still no clue what the problem is. What if you take it a step further and try something like echo uname | ssh IMpersonal bash

@dreamflasher
Copy link
Author

I swear I didn't do anything, but IMpersonal now works on both laptop and desktop.

ND40sv2 still does not work on either machine.

echo uname | ssh IMpersonal bash
yields Linux for both ND40sv2 and IMpersonal

@roblourens
Copy link
Member

This error has shown up twice before and both times it was due to trying to enable ControlMaster, which does not work on windows: #629 and #209

Your ssh config clearly shows that you do not have that enabled, so then I have no idea.

@vscodebot vscodebot bot closed this as completed Sep 10, 2019
@vscodebot
Copy link

vscodebot bot commented Sep 10, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants