Sometimes, when I launch VS Code on a folder that contains an Epsilon program, syntax error highlighting doesn't work and I can see an error message like the following in Output -> Epsilon Editor. When this happens, I need to:
Close VS Code
Go to my operating system's process manager
Kill any remnant Epsilon Language Server Java processes
Start VS Code again
I have not been able to reproduce this consistently as VS Code typically kills language server processes on exit and I'm not even sure why stray LS processes make a difference given that every time the extension starts it launches a fresh LS on a new port.
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Info - 11:36:34] Connection to server got closed. Server will restart.
true
[Error - 11:36:34] Server initialization failed.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Epsilon Editor client: couldn't create connection to server.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Info - 11:36:34] Connection to server got closed. Server will restart.
true
[Error - 11:36:34] Server initialization failed.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Epsilon Editor client: couldn't create connection to server.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Info - 11:36:34] Connection to server got closed. Server will restart.
true
[Error - 11:36:34] Server initialization failed.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Epsilon Editor client: couldn't create connection to server.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Restarting server failed
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Info - 11:36:34] Connection to server got closed. Server will restart.
true
[Error - 11:36:34] Server initialization failed.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Epsilon Editor client: couldn't create connection to server.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Restarting server failed
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Client Epsilon Editor: connection to server is erroring.
connect ECONNREFUSED 127.0.0.1:52029
Shutting down server.
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 11:36:34] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
at LanguageClient2.shutdown (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15677:17)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15654:21)
at LanguageClient2.stop (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:18137:22)
at LanguageClient2.handleConnectionError (/Users/dk135/.vscode/extensions/samharris.eclipse-epsilon-languages-2.0.0/out/main/extension.js:15897:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 11:36:34] The Epsilon Editor server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 11:36:34] Server initialization failed.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Epsilon Editor client: couldn't create connection to server.
Message: Socket closed before the connection was established
Code: -32099
[Error - 11:36:34] Restarting server failed
Message: Socket closed before the connection was established
Code: -32099
Sometimes, when I launch VS Code on a folder that contains an Epsilon program, syntax error highlighting doesn't work and I can see an error message like the following in
Output -> Epsilon Editor
. When this happens, I need to:I have not been able to reproduce this consistently as VS Code typically kills language server processes on exit and I'm not even sure why stray LS processes make a difference given that every time the extension starts it launches a fresh LS on a new port.