#issue running engine v0.3.12
1 messages · Page 1 of 1 (latest)
I am trying to run the examples in the doc, it worked a few days aga and today it does not. I did upgrade podman but it was just a patch. Here is what I see when I run the pipeline:
$ go run ci/main.go
Error: resolving image digest: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io: i/o timeout
panic: EOF: Error: resolving image digest: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io: i/o timeout
Please visit https://dagger.io/help#go for troubleshooting guidance.
goroutine 1 [running]:
main.main()
/Users/tgilkerson/github/hello-dagger/ci/main.go:19 +0xe05
exit status 2
I notice the engine container is not running in the background, so I manually run it but that did not fix it.
Any advice is appreciated
I am on a Mac running Podman with go version go1.19.5 darwin/amd64
👋 is there a reason why you're trying to start the engine manually?
this seems to fail because the engine needs --privileged to work
I am very new to dagger, I did podman ps and it looked like the engine was stopped so I tried to restart it with a podman run. I also did a podman rm on the engine container and then ran my ci job hoping the client would magically restart it, but no luck there. Basically I don't know what I am doing 🙂 I tried starting the engine with --privileged but that did not work. I feel like it has something to do with Podman. I ran a podman helper that attempts to share the docker socket, let me see if I can undo that and set the DOCKER_HOST manually like I did before.... also do you think I need to set podman as rootful? podman machine set --rootful
I tried setting podman as rootful and starting the engine with --privileged
Mounting volume... /Users/tgilkerson:/Users/tgilkerson
API forwarding listening on: /var/run/docker.sock
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully
$ podman run -it --rm --privileged ghcr.io/dagger/engine:v0.3.12 # start interactive to watch logs
$ go run ci/main.go
Error: resolving image digest: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io: i/o timeout
panic: EOF: Error: resolving image digest: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io: i/o timeout
here are the engine startup logs:
$ podman run -it --rm --privileged ghcr.io/dagger/engine:v0.3.12
INFO[2023-02-11T16:00:29Z] auto snapshotter: using native
WARN[2023-02-11T16:00:29Z] using host network as the default
INFO[2023-02-11T16:00:29Z] found worker "2byr46ostcxmnapjzb7pqpjah", labels=map[org.mobyproject.buildkit.worker.executor:oci org.mobyproject.buildkit.worker.hostname:a3ced82ab9f8 org.mobyproject.buildkit.worker.network:host org.mobyproject.buildkit.worker.oci.process-mode:sandbox org.mobyproject.buildkit.worker.selinux.enabled:false org.mobyproject.buildkit.worker.snapshotter:native], platforms=[linux/amd64 linux/amd64/v2 linux/amd64/v3 linux/386]
WARN[2023-02-11T16:00:29Z] skipping containerd worker, as "/run/containerd/containerd.sock" does not exist
INFO[2023-02-11T16:00:29Z] found 1 workers, default="2byr46ostcxmnapjzb7pqpjah"
WARN[2023-02-11T16:00:29Z] currently, only the default worker can be used.
INFO[2023-02-11T16:00:29Z] running server on /run/buildkit/buildkitd.sock
just trying different things, still same result:
$ dagger query <<EOF | jq -r .container.from.withExec.stdout
{
container {
from(address:"alpine:latest") {
withExec(args:["uname", "-nrio"]) {
stdout
}
}
}
}
EOF
failed to resolve image digest: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io: i/o timeout
falling back to leftover engine
Error: no fallback container found
interesting, I can podman machine ssh into the vm, install the dagger sdk and it works! So my issue has something to do with running podman from my Mac host. I feel like this is NOT a dagger issue, but if you have any suggestions let me know. I am sure it has something to do with the host network or mounting sock files, which I am a bit confused on...
@quick urchin do you also have docker installed by any chance?
Dagger sdk's try to start an engine through docker run when they initialize
No, I am using podman
so you need to have that podman <> docker link so when you do docker run it's actually running podman
do you have a symlink to the podman binary as docker?
In the podman VM I thing the symlinks exist, an dagger is working there, on my Mac I don’t have the symlinks and it does not work. But it did work at one time in the past with a hack workaround, I created a script in my path called “docker” that just calls podman
yep, that's what you need in your local mac
since the dagger SDK (which runs in your machine) expects the docker binary (or a symlink) to be present to start the engine
Is it just one symlink?
yep ln -s $(which podman) ~/bin/docker.
^ something like that
I am not sure I know how to create it, is there an examples
anywhere docker can be accessible in your PATH
I'll open an issue to update the docs 🙌 LMK if that works
Yes, and thanks again
sure! np! have a nice Sunday!