VSCode Remote Server stuck on initializing server - visual-studio-code

I'm currently trying to access a remote server using VS Code's Remote SSH extension. I haven't had a problem when using it before (that was around a month ago) but today when I tried to access the server I ran into some trouble.
I have the hostname and everything configured in a config file, and so I just click on that option and type in the password. However, VS Code seems to be stuck on "Opening Remote..." for the past hour or so. The dialogue I get in the terminal is as follows:
username#host's password:
Running remote connection script
Acquiring lock on /home/username/.vscode-server/bin/abcdefghijklmnop1234567989/
vscode-remote-lock.abcdefghijklmnop1234567989
Installing to /home/username/.vscode-server/bin/abcdefghijklmnop1234567989...
Downloading with wget
Does anybody know what the problem might be? Is this normal?
EDIT
As soon as I posted this the connection was successfully made. However, I would also like to still know what the problem was and if it normally takes around an hour, and what this process might be doing. I also believe it would be helpful to the community overall.
Thank you.

I've faced the same issue just now and realized that firewall protection has something to do with it.
As soon as I disabled it, the remote connection was established and I managed to see my code again.

Related

Is there a way to stop VS Code Remote SSH from failing after it is disconnected?

I find that if I leave my VS Code Remote SSH connection open it disconnects automatically after a certain amount of time. Following automatic disconnection I find the Remote SSH then fails: when I try to log in again I get repeated requests for my remote password and every time I enter my password I just get another password prompt.
My current workaround is to go to the Command Palette and do "Remote-SSH: Kill VS Code Server on Host". Sometimes I need to do this multiple times for it to take effect. Then when I next log in there is a lengthy VS Code installation script that needs to run before I can start coding again.
Is there a way of setting up VS Code Remote SSH that avoids this issue? I have tried some of the suggestions on this page - https://code.visualstudio.com/docs/remote/troubleshooting. However I feel like I am completely in the dark regarding what the underlying issue is. I do not even know how I could go about generating informative diagnostics / a log.
Maybe the problem is that the remote machine has a limited number of proccess to run at same time. When a automatic disconnection of vscode happen, the that session is still running, but you cannot create a new one because you are over the limit in number of process.
In my case, asking to the remote machine to kill my process (manually done by the technician working in that machine in this case) works.
A better solution will be close the vscode sessions from your machine, to be able to start a new one again.

Is there a way to reconnect to a disconnected VS Code Remote SSH connection?

When you're running VS Code Remote SSH and loose network connectivity over a long period of time and return to VS Code, the status on the bottom left show's "Disconnected from SSH: ". However, there doesn't seem to be a way to reconnect the session. I always have to revert to starting a new VS Code Remote SSH session. How can I reconnect?
You can reload the window. It keeps unsaved changes even.
Press F1 to search for commands, then search for:
Developer: Reload Window
Version of VSCode when trying this: 1.53.2.
EDIT: This does NOT work to reestablish the connection. It only helps to keep it alive. Thanks for the comments. I misinterpreted the question while looking for something similar for myself.
I'll leave the answer just in case it helps someone else.
You need to set a custom ssh file and add parameters to keep the connection to your host alive :
Host SomeRemoteHost
HostName MyRemoteHostName
User MyUsername
ServerAliveInterval 60
ServerAliveCountMax 30
Go to the SSH extension settings and set the new custom ssh config file path. This won't work if your machine goes into sleep mode, but it will keep the connection alive in the background while you work on other things.
PS: Make sure your ssh settings are correct for the host or you won't be able to log in.
It seems that there is something that drops your idle connection. As I know SSH doesn't have any configuration for dropping an idle connection but firewalls has. there might be some sort of firewall or monitoring software or hardware device which drops your connection. if you are using Linux OS the following command might help you:
ssh -o "ServerAliveInterval 60" <SERVER_ADDRESS>
this command sends keep alive request to ssh every 60 seconds.
In line with #PaulOmta answer, the easiest way is now adding this Reload button extension! It adds a Reload button to your status bar on the bottom right.
I found that ⌘-R shortcut didn't work on mine (maybe because I have other keybinders on)
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=natqe.reload

Cloud Foundry on Bluemix: No network connection when starting new app with binary-buildpack

First, I've finaly found out what the problem was but still, I decided to write this question+answer for others (because I spent 6 hours with this issue).
So, what's the problem...
I have a Cloud Foundry app (on public Bluemix) based on binary-buildpack. Two days ago, everything was OK. But not since yesterday. My app crashed (probably during restaging or something similar) and never started again. I tried to push the app again and still the same result. Really frustrating...
Something about the backend... There is a shell script in my instance that runs one binary application. Generaly, the application should connect to database server (also on public Bluemix).
The problem: Everytime I tried to start the app, it crashed immediately. This is what I found in logs: dial tcp: lookup databaseserverdomain.com on 0.0.0.0:53: server misbehaving.
There are a couple of similar problems on StackOverflow but no answer that would be helpful for me.
So, the error means that something went wrong with TCP connection. Ok, but what exactly? That's the question I'm going to answer myself...
Sounds like your binary isn't capable in properly handling connection problems. I would rather fix that part since I guess it will crash anyway when there is a connection issue.
The solution was actually simple...
I edited my shell script and add ping google.com -count 3 before launching the application to test if there is a stable network connection. This worked.
The application got 2 more seconds and it was enough for network/router/whatever to establish the connection.
Hmm.. It seems that there is something wrong with network routing on Cloud Foundry/Bluemix since yesterday.

"Authentication servers are down, please try again later." vanilla 1.8 MineOS

I have had a MineOS setup using the pre-packaged Turnkey bundle on a dedicated system and it worked at first, but recently the system kicked everyone off the server. Any attempt to reconnect give the message: "Authentication servers are down, try again later." and 4 days later, same issue.
From what I can tell this means that the server can't verify my user ID with Mojang's servers for some reason. I checked and there are no disruptions on Mojang's servers, so it must be my system. I tried disabling online-mode and it said "You are not whitelisted on this server." and still wouldn't let any one in. Im thinking this is an error in the firewall configuration but I dont know how or where to start with that. I have already verified that my router is not blocking access to Mojang's servers so it must be within my system configurations somewhere.
What confuses me is why it worked at first and then quit seemingly at random. Any thoughts on what is causing this and how to fix it? thanks in advance for any assistance
turns out the dns server had gotten messed up when changing a static ip. fixed that and everything started working again.

Source Any Where VSS, Error at recv(): An existing connection was forcibly closed by the remote host

I am using Source anywhere for vss and while getting the update it gives me following error
Error at recv(): An existing connection was forcibly closed by the
remote host.
from your screenshot, the software is trying to retrieve the project/file tree structure. this error could happen if the internet connection between the client and the server is unstable. you may try refreshing to see whether the problem remains
It was some log files issue with Source any where . System Restart does the work. It's happens every few days and system restart does work. But I am still looking for proper solution