rafaelmaiolla / remote-vscode

A package that implements the Textmate's 'rmate' feature for Visual Studio Code.
MIT License
259 stars 33 forks source link

Failed to start server, will try again in 10 seconds #50

Closed merefield closed 6 years ago

merefield commented 6 years ago

Hey, thank you for this extremely useful plug-in!

I'm having problems though! This was working, but then broke on a re-save of the user settings file.

Getting this repeatedly:

"Failed to start server, will try again in 10 seconds}"

In dev console is see this:

[Extension Host] [2018-02-21 10:06:31.390] [TRACE] Server - start true
console.ts:123 [Extension Host] [2018-02-21 10:06:31.390] [TRACE] Server - isOnline
console.ts:123 [Extension Host] [2018-02-21 10:06:31.390] [DEBUG] Server - isOnline? false
console.ts:123 [Extension Host] [2018-02-21 10:06:31.391] [TRACE] StatusBarItem - onStarting
console.ts:123 [Extension Host] [2018-02-21 10:06:31.391] [TRACE] Server - getPort 52698
console.ts:123 [Extension Host] [2018-02-21 10:06:31.391] [TRACE] Server - getHost NaN
console.ts:123 [Extension Host] [2018-02-21 10:06:31.391] [TRACE] Server - onServerError { Error: listen EADDRNOTAVAIL **MY-REMOTE-IP**:52698
    at Object.exports._errnoException (util.js:1050:11)
    at exports._exceptionWithHostPort (util.js:1073:20)
    at Server.setupListenHandle [as _listen2] (net.js:1247:19)
    at listenInCluster (net.js:1304:12)
    at doListen (net.js:1428:7)
    at _combinedTickCallback (internal/process/next_tick.js:83:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  code: 'EADDRNOTAVAIL',
  errno: 'EADDRNOTAVAIL',
  syscall: 'listen',
  address: '**MY-REMOTE-IP**',
  port: 52698 }
console.ts:123 [Extension Host] [2018-02-21 10:06:31.392] [TRACE] StatusBarItem - onError

Getting this repeated message. I know its not a machine-wide problem because Atom has a similar plug-in and this is working.

My settings are:

{
//-------- Remote VSCode configuration --------

// Port number to use for connection.
"remote.port": 52698,

// Launch the server on start up.
"remote.onstartup": true,

// Address to listen on.
"remote.host": "**MY-REMOTE-IP**",

// If set to true, error for remote.port already in use won't be shown anymore.
"remote.dontShowPortAlreadyInUseError": false,
}

btw, I note that equivalent for atom.io, https://atom.io/packages/remote-atom, doesn't require a host IP, thoughts? I'm not having any issue with the Atom implementation and rmate correctly brings up the remote file. I'm careful to close Atom before retrying VS Code (and in any case this occurred before I installed remote-atom in my copy of Atom).

rafaelmaiolla commented 6 years ago

You don't need to set the "remote.host". Remove it from your User Settings or set it to

  // Address to listen on.
  "remote.host": "127.0.0.1",
merefield commented 6 years ago

That fixed it, thank you for your swift response!

ruqianl commented 5 years ago

I'm having the same issue, and my remote host is set to 127.0.0.1. It reporting the same error "Failed to start server, will try again in 10 seconds"

image

image

ruqianl commented 5 years ago

Restarting my machine fixed it.