Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting client failed: Error: spawn EBUSY #732

Closed
radeksimko opened this issue Aug 9, 2021 · 4 comments
Closed

Starting client failed: Error: spawn EBUSY #732

radeksimko opened this issue Aug 9, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@radeksimko
Copy link
Member

Originally posted by @TylerHaigh in #504 (comment)

Launching language server: c:\Users\tyler\.vscode\extensions\hashicorp.terraform-2.14.0\lsp\terraform-ls.exe serve
[Error - 9:11:30 AM] Starting client failed
Error: spawn EBUSY
	at ChildProcess.spawn (internal/child_process.js:403:11)
	at Object.spawn (child_process.js:562:9)
	at c:\Users\tyler\.vscode\extensions\hashicorp.terraform-2.14.0\node_modules\vscode-languageclient\lib\node\main.js:383:40

After a VSCode restart, it seems to start fine

@radeksimko radeksimko changed the title Starting client failed: "Error: spawn EBUSY" Starting client failed: Error: spawn EBUSY Aug 9, 2021
@radeksimko
Copy link
Member Author

@TylerHaigh I suspect this may be caused by the installation logic.

I know you said that it resolves after restart (presumably once LS is already installed). With that in mind - can you try to reproduce this by:

  • stopping VS Code
  • deleting the LS from c:\Users\tyler\.vscode\extensions\hashicorp.terraform-2.14.0\lsp\terraform-ls.exe
  • starting VS Code and letting it re-install LS again

I will try to reproduce this myself in a Windows VM.

@radeksimko radeksimko added the bug Something isn't working label Aug 9, 2021
@TylerHaigh
Copy link

@radeksimko
Yep - seems to be related to installation

Followed instructions as follows:

  1. Closed all VS Code windows
  2. Deleted terraform-ls.exe from c:\Users\tyler\.vscode\extensions\hashicorp.terraform-2.14.0\lsp\
  3. Started VS Code
  4. Terraform extension installed Language server (I assume by installed it unzipped it from the available language servers under c:\Users\tyler\.vscode\extensions\hashicorp.terraform-2.14.0\lsp\ ) ( v0.19.1 and v0.20.1 )
  5. VS Code reported error "Couldn't start client Terraform LS"
  6. Output terminal displays the following
Launching language server: c:\Users\tyler\.vscode\extensions\hashicorp.terraform-2.14.0\lsp\terraform-ls.exe serve
[Error - 12:23:13 PM] Starting client failed
Error: spawn EBUSY
	at ChildProcess.spawn (internal/child_process.js:403:11)
	at Object.spawn (child_process.js:562:9)
	at c:\Users\tyler\.vscode\extensions\hashicorp.terraform-2.14.0\node_modules\vscode-languageclient\lib\node\main.js:383:40

After initial LS fails to start

  1. Close VS Code
  2. Re-open VS Code
  3. Terraform Language server starts as expected
Launching language server: c:\Users\tyler\.vscode\extensions\hashicorp.terraform-2.14.0\lsp\terraform-ls.exe serve
2021/08/10 12:26:43 serve_command.go:150: Starting terraform-ls 0.20.1
2021/08/10 12:26:43 service.go:81: Preparing new session ...
2021/08/10 12:26:51 watcher.go:281: watching for changes ...
2021/08/10 12:26:51 langserver.go:94: Starting server (pid 29368; concurrency: 4) ...
2021/08/10 12:26:51 server.go:591: Received 1 new requests
2021/08/10 12:26:51 server.go:175: Processing 1 requests
2021/08/10 12:26:51 server.go:266: Checking request for "initialize": {"processId":38332,"clientInfo":{"name":"vscode","version":"1.59.0"},
...

@vboyk
Copy link

vboyk commented Nov 26, 2021

I had the same issue.
It appeared i had old version of NodeJS (10) installed on my PC, which doesn't handle this main.js script properly (something changed in child process spawn method).
I uninstalled NodeJS 10 and this solved my issue with Terraform LS extention.

@jpogran
Copy link
Contributor

jpogran commented Jan 5, 2022

We believe we have resolved the issue with permissions to write files on installation in the linked PR and issue.

Since this has been open for a long time, I'm going to lock and close this issue now. This is not an indication we are ignoring the issue, but rather an attempt to gauge if there are any new occurrences and to gain new diagnostic information. Please do open a new issue if problems persist for you.

@jpogran jpogran closed this as completed Jan 5, 2022
@hashicorp hashicorp locked and limited conversation to collaborators Jan 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants