question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

couldn't start client language server (Windows)

See original GitHub issue

I am working from an airgapped environment so having the extension manage the language server is not a possibility. The only thing I can do is pull down go repositories basically.

I installed the latest version of terraform-ls using:

$ go get github.com/hashicorp/terraform-ls
$ terraform-ls --version
0.0.0-dev

The language server starts fine, and is in $GOBIN. ($GOBIN is also in $PATH)

$ echo $GOBIN # c:\Users\<user>\.go\bin
$ cd $GOBIN
$ terraform-ls.exe serve 
# ...
# langserver.go:69: Starting server (pid <pid>) ...

In my project, I initialize stuff with terraform init. And here is my vscode settings:

"terraform.languageServer": {
  "trace.server": "verbose",
  "external": true,
  "pathToBinary": "C:\\Users\\<user>\\.go\\bin\\terraform-ls.exe",
  "args": [
    "server"
  ],
},

And the errors I get are seen in this screenshot: image

Other information

  • I’m using git bash as my shell in vscode.
  • I’m getting my go pkgs from gocenter.io through artifactory
$ terraform version
Terraform version: v0.13.4
+ provider <hostname>/rancher/rancher2 v1.9.0

$ terraform-ls version
0.0.0-dev
# Even if I try pinning the terraform-ls version, it still outputs `0.0.0-dev`
$ go get github.com/hashicorp/terraform-ls@v0.5.4
$ terraform-ls
0.0.0-dev

Questions How can I see more verbose output for these errors? I enabled "trace.server": "verbose" but have no idea how to use it.

Thanks for your help!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

11reactions
wirdatrdcommented, Mar 5, 2021

I’m running into this problem too. Here is the output from the terraform-ls panel: Launching language server: c:\Users*.vscode\extensions\hashicorp.terraform-2.7.0/lsp/terraform-ls serve for folder: file:///c%3A/Users/*****/projects/ [Error - 8:38:18 AM] Starting client failed Error: spawn EBUSY at ChildProcess.spawn (internal/child_process.js:407:11) at Object.spawn (child_process.js:557:9) at c:\Users*.vscode\extensions\hashicorp.terraform-2.7.0\node_modules\vscode-languageclient\lib\node\main.js:383:40

I have tried uninstalling and upgrading/reinstalling the Terraform extension, uninstalling and upgrading/reinstalling VSCode with no joy. I’ve tried starting VSCode with normal perms as well as with elevated Administrator perms.

4reactions
BasBerkcommented, Dec 17, 2020

The last update seems to make it much more stable.

If it stays like this I shall retract review and give it 5 stars.

Cheers

On Wed, 16 Dec 2020 at 20:33, Audrey Eschright notifications@github.com wrote:

Hi @sugarraysam https://github.com/sugarraysam – Sorry you’re running into a problem there! You can see the full language server logs by opening the output panel and choosing the one that says “terraform-ls”.

If you need to install the language server manually, the best option is to download it from https://releases.hashicorp.com/terraform-ls/ It doesn’t need to be in your path as long as you have that pathToBinary setting.

if you want to share the logs from the output panel, we can look into why it might be failing to start.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hashicorp/vscode-terraform/issues/504#issuecomment-746888264, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORZKG465NEGCUM6I4S66YLSVEDQ7ANCNFSM4SZ5R3IQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 Couldn't start client Java Language Server even ...
When I open a java project in VSCode and click on a .java file, I get the error - "Couldn't start client Java...
Read more >
Couldn't start client Clang Language Server in VS Code
I just installed Visual Studio Code in my Windows 10 machine but I get the error "Couldn't start client Clang Language Server" ....
Read more >
Does anyone know how to fix this? I have all the ... - Reddit
A subreddit for working with Microsoft's Visual Studio Code. ... r/vscode - O Couldn't start client Java Language Server Source: Java.
Read more >
Couldn't start SonarLint Language Server in VS Code
If I understand correctly, this error arises when SonarLint tries to check that the correct version of Java is available (SonarLint for VSCode ......
Read more >
Language Server Extension Guide - Visual Studio Code
Explain how to run, debug, log, and test the Language Server extension. ... The HTML Language Client and PHP Language Client are normal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found