open-remote-ssh icon indicating copy to clipboard operation
open-remote-ssh copied to clipboard

Couldn't Establish Connection - Error Resolving Authority

Open oren-weiss opened this issue 3 years ago • 8 comments

Hello,

When attempting to connect to a remote server (CentOS 7.9) with the config file setup:

	Host HOST
  	HostName HOSTNAME
  	User REMOTE_USER
  	IdentityFile /Users/LOCAL_USER/.ssh/id_rsa
  	ForwardAgent yes

I get the following error about being unable to establish a connection:

[Info  - 21:44:12.653] Resolving ssh remote authority 'ssh-remote+HOST' (attemp #1)
[Trace  - 21:44:12.660] Identity keys:
/Users/LOCAL_USER/.ssh/id_rsa ssh-rsa SHA256:XXX
[Info  - 21:44:12.695] Trying no-auth authentication
[Info  - 21:44:12.700] Trying publickey authentication: /Users/LOCAL_USER/.ssh/id_rsa ssh-rsa SHA256:XXX
[Trace  - 21:44:12.714] Server install command:

# Server installation script

TMP_DIR="${XDG_RUNTIME_DIR:-"/tmp"}"

DISTRO_VERSION="1.72.2"
DISTRO_COMMIT="038eb4c6f64ae16a82dfc477463563d32f4d6d87"
DISTRO_QUALITY="stable"
DISTRO_VSCODIUM_RELEASE="22289"

# # # ... Cut for space ... # # #

[Trace  - 21:44:16.229] Server install command stdout:
Server script is already running /home/REMOTE_USER/.vscodium-server/bin/038eb4c6f64ae16a82dfc477463563d32f4d6d87/bin/codium-server
Error server token file not found /home/REMOTE_USER/.vscodium-server/.038eb4c6f64ae16a82dfc477463563d32f4d6d87.token
ca4a8ce39a9a43cefe356ef9: start
exitCode==1==
listeningOn====
connectionToken====
logFile==/home/REMOTE_USER/.vscodium-server/.038eb4c6f64ae16a82dfc477463563d32f4d6d87.log==
osReleaseId==centos==
arch==x86_64==
platform==Linux==
tmpDir==/run/user/1007==
ca4a8ce39a9a43cefe356ef9: end

[Error  - 21:44:16.230] Error resolving authority
Error: Couldn't install vscode server on remote server, install script returned non-zero exit status
	at t.installCodeServer (/Users/LOCAL_USER/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.18-universal/out/extension.js:1:404085)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async /Users/LOCAL_USER/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.18-universal/out/extension.js:1:375723

The .vscodium-server folder is placed on the remote server, although no log file is being generated. It does 5 identical attempts before failing completely.

Apologies if this has already been addressed - I looked through the other similar issues but couldn't find anything that would help.

oren-weiss avatar Oct 23 '22 21:10 oren-weiss

@oren-weiss For some reason the token file wasn't generated :thinking:, do you get this same error every time? To ensure the script can run successfully in you system you can copy the installation script from the log output and save it in a install_script.sh file and run it manually in your remote machine.

Error server token file not found /home/REMOTE_USER/.vscodium-server/.038eb4c6f64ae16a82dfc477463563d32f4d6d87.token

jeanp413 avatar Oct 24 '22 00:10 jeanp413

Same error:

Server script is already running /home/REMOTE_USER/.vscodium-server/bin/038eb4c6f64ae16a82dfc477463563d32f4d6d87/bin/codium-server
Error server token file not found /home/REMOTE_USER/.vscodium-server/.038eb4c6f64ae16a82dfc477463563d32f4d6d87.token
3e0e2fda7f810295ce33ba1b: start
exitCode==1==
listeningOn====
connectionToken====
logFile==/home/REMOTE_USER/.vscodium-server/.038eb4c6f64ae16a82dfc477463563d32f4d6d87.log==
osReleaseId==centos==
arch==x86_64==
platform==Linux==
tmpDir==/run/user/1007==
3e0e2fda7f810295ce33ba1b: end

For what it's worth, on the previous release (v0.0.17), I was getting the server token generated but I was getting the GLIB error #24 . Unlike in that issue, I was unable to connect/edit remote files.

oren-weiss avatar Oct 24 '22 15:10 oren-weiss

Ah then maybe, as reported in that other issue, the vscode process is still running from that last time you tried to connect, you can check if it's running and kill the process manually and try to connect again, in any case it would be better to wait for vscodium to fix the native dependencies so the server doesn't hang

jeanp413 avatar Oct 24 '22 16:10 jeanp413

I had the same error (again) and the solution "close all vscode instances, then ssh to the server and kill all node processes" solved the server token issue.

Is there anything the extension could do? If not, possibly extending the "Error server token file not found" message to hint at old server instances would help.

GitMensch avatar Dec 12 '22 20:12 GitMensch

Note: this may also happen after SSH connection drop; you then get a client-side question "connection lost, reconnect?" and when answering with "yes" the client restarts, connects and then tries to start a new reh instance.

Wouldn't it be possible to actually reconnect (instead of/before starting a new instance)?

GitMensch avatar Dec 12 '22 20:12 GitMensch

If the Server script is already running and Error server token file not found, grep and kill @GitMensch?

lex-ibm avatar Jun 08 '23 20:06 lex-ibm

This was the exact problem I had, only that for me the server log was generated (similar to @oren-weiss). I addressed my issue in the referenced issue above.

Icemole avatar Jan 29 '24 07:01 Icemole