#dagger query fails with buildkit failed to respond: failed to list workers: Unavailable: connection

1 messages · Page 1 of 1 (latest)

fervent dirge
#

I am trying to use dagger query but I am getting an error.

$ echo '{ container { from(address: "hello-world") { stdout } } }' | dagger query -
Error: buildkit failed to respond: failed to list workers: Unavailable: connection error: desc = "error reading server preface: command [docker exec -i dagger-engine-98b68395a7eff25d buildctl dial-stdio] has exited with exit status 1, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=Error response from daemon: Container 51fd5f935186c7566f4f1362ed99f63c2dd70f836c1f25de12d760a80e70d0a3 is not running"

I am using the latest dagger version

$ dagger version
dagger 0.4.0 linux/amd64

Docker is running and up to date

$ docker version
Client: Docker Engine - Community
 Cloud integration: v1.0.29
 Version:           20.10.22
 API version:       1.41
 Go version:        go1.18.9
 Git commit:        3a2c30b
 Built:             Thu Dec 15 22:28:22 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Desktop
 Engine:
  Version:          20.10.22
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.9
  Git commit:       42c8b31
  Built:            Thu Dec 15 22:26:14 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.14
  GitCommit:        9ba4b250366a5ddde94bb7c9d1def331423aa323
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
#

Ok, if you have a stopped dagger engine container this happens. Seems like the command detects that the container exists but doesnt ensure its actually running.

#

I could solve this by either started the container manually or removing the container completely so that query will create a new one

red cargo
#

@lean oasis better error message potential ☝️

lean oasis
#

Definitely! I ran into this myself when I was first learning Dagger

warped verge
#

We came across the same behavior with @red stratus some time ago and I have the memory that Guillaume documented it in an issue but I'm not entirely sure.

warped verge
#

@red stratus gentle ping here 🙏

red stratus
warped verge
#

thx @red stratus ! seems like users are still being caught by this one. If we're already printing please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host. Why not adding to that message something like: and check if your dagger engine is running?

warped verge
#

@lean oasis from the DX side, anything to add here? Or shall we close?

red stratus