Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to parse remote port from server output: bash: no job control in this shell

I am trying to use VSCode - Insiders to run code on a docker container in a remote AWS machine using the Remote - SSH plugin. I have opened a terminal and set up port forwarding like so: ssh -L 2201:localhost:2222 user@host -N -i ~/.ssh/id_rsa. Then in VSCode I try to connect to root@localhost and it starts up, but then gives me an error message:

> Found existing installation...
> Found running server...
>  
> bash: no job control in this shell
"install" terminal command done
Received install output: bash: no job control in this shell
Failed to parse remote port from server output: bash: no job control in this shell

I started doing this process a couple days ago and it worked. Yesterday it was in and out a bit, and today it's not working at all. I've tried turning it off and on again, but can't get it to work. In case it's relevant, I am on MacOS with the Mojave OS.

Edit:

Magically, it worked today (the following day) the first time. I would still be interested in knowing how to fix this next time it breaks. In case this helps, here's the output from when it is working:

SSH Resolver called for "ssh-remote+7b22686..."
SSH Resolver called for host: root@localhost
Setting up SSH remote "localhost"
Using commit id "473af338..." and quality "insider" for server
Using SSH config file "/Users/user/config"
Install and start server if needed
> Found existing installation...
> Found running server...
>  
> bash: no job control in this shell
> 368805d0-03...==38466==
"install" terminal command done
Received install output: 368805d0-03...==38466==
Server is listening on port 38466
Using SSH config file "/Users/user/config"
Spawning tunnel with: ssh -F /Users/user/config root@localhost -N -L localhost:39003:localhost:38466
Spawned SSH tunnel between local port 39003 and remote port 38466
Waiting for ssh tunnel to be ready
Tunneling remote port 38466 to local port 39003
Resolving "ssh-remote+7b22686f737..." to "localhost:39003", attempt: 1

Edit 2: And now (the following following day) it's not working again.

Edit 3: I have a config file at ~/config. Here are the contents:

Host *
     User root
     Port 2201
     IdentityFile ~/id_rsa
like image 892
jss367 Avatar asked May 10 '19 03:05

jss367


People also ask

How to fix failed to parse remote port from server output?

This can cause startup to fail and produce the "Failed to parse remote port from server output" error message. In this case the solution is to simply to delete the lockfiles: .vscode-server/bin/ [:xdigit:]*/vscode-remote-lock.* In my case it happened randomly after a disconnect, but thank you it worked!

What to do if ssh command fails to work?

Note: If the ssh command fails, you may need to AllowStreamLocalForwarding on your SSH host. Open /etc/ssh/sshd_config in an editor (like Vim, nano, or Pico) on the SSH host (not locally). Add the setting AllowStreamLocalForwarding yes.

How do I run remote-SSH from Visual Studio Code?

In VS Code, run Remote-SSH: Open Configuration File... in the Command Palette ( F1 ), select an SSH config file, and add (or modify) a host entry as follows: Tip: You can use / for Windows paths as well. If you use \ you will need to use two slashes. For example, C:\\path\\to\\my\\id_rsa.

Why doesn't the remote extension host log file appear in output?

This is because the log channel is created only after the log file is created, so if the remote extension host does not launch, the remote extension host log file was not created and is not shown in the Output view. This is still helpful information to include in your issue.


1 Answers

In the specific implementation shown above, you have User root in your config and are logging in with root@localhost, so you have your username twice. Leave the config file as is and just enter localhost in VSCode. This still doesn't solve the instability issue, but it does fix one problem.

like image 56
jss367 Avatar answered Oct 10 '22 23:10

jss367