#Dagger quickstart tutorial

1 messages · Page 1 of 1 (latest)

rocky copper
#

I'm trying to do the Dagger quickstart tutorial as a first step before integrating Dagger with Jenkins. I'm trying below code in my jenkins node but it always timesout after running around 10 mins.

Error as below*
[jenkins@adxxxx hello-dagger]$ dagger init --sdk=python
✘ connect 10m17.3s
! start engine: new client: context deadline exceeded
✘ connecting to engine 10m0.0s
! new client: context deadline exceeded*

The dagger version is

[jenkins@adxxxx dagger-test]$ dagger version
dagger v0.11.6 (registry.dagger.io/engine) linux/amd64
18:01:38 WRN failed to open git repository err="getwd: no such file or directory"

[jenkins@adxxxx dagger-test]$ type dagger
dagger is hashed (/home/jenkins/.local/bin/dagger)

Any help is highly appreciated.
Thanks,

viral mirage
#

hm, could you share the results of docker ps?

#

and maybe check to see whether docker images contains a downloaded image

#

also, just to check, you haven't set _EXPERIMENTAL_DAGGER_RUNNER_HOST anywhere in the env?

#

generally, this kind of problem results from the engine failing to start, or immediately crashing, or something similar to that

umbral wing
#

cc @rocky copper

uncut sonnet
rocky copper
#

First of all thanks for the overwhelming and quick response @uncut sonnet @viral mirage @umbral wing and@rustic saddle.
Here are my answers for all 🙂
I'm curious how/where you're running Jenkins. All in one? Separate Controller and Agents? -I've setup docker and dagger in one of the running Jenkins node which is a linux VM. So basically its separate.
Locally on your laptop, on a remote server/cluster? -As mentioned above its a remote VM (AWS)
Using what kind of "cloud" for agents? Docker plugin or Kubernetes plugin? - Docker
Do you have a firewall or proxy server between Jenkins and the internet? - Not sure
Are you only able to use certain container registries, for example your corporate one? *Docker and containers are working in this VM. Issue is only with Dagger commands. let be it init, run, call all are getting stuck up.
@viral mirage PFA

umbral wing
#

If you docker ps with that user, does that work?

rocky copper
umbral wing
rocky copper
#

Also I noticed that ping google.com not receiving any packets back. So there is no internet connectivity right? Would that be an issue?

umbral wing
rocky copper
#

I ran ping in the same node as jenkins user ! BTW, the major error in container log is below(Unfortuantely I cannot share complete logs 😦

time="2024-06-05T01:56:51Z" level=info msg="auto snapshotter: using overlayfs"
time="2024-06-05T01:56:51Z" level=warning msg="failed to release network namespace "ixbeqod1h43s05hnl1gnnp47z" left over from previous run: plugin type="loopback" failed (delete): unknown FS magic on "/var/lib/dagger/net/cni/ixbeqod1h43s05hnl1gnnp47z": 58465342"
buildkitd: failed to create worker: failed to create network providers: CNI setup error: plugin type="bridge" failed (add): failed to list chains: running [/sbin/iptables -t nat -S --wait]: exit status 3: modprobe: can't change directory to '/lib/modules': No such file or directory
iptables v1.8.9 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

#!/bin/sh
set -e

umbral wing
#

Ok, I think I know what the error is. Could you try running sudo modprobe iptable_nat and try again?

#

Also please remove the dagger container with docker rm before running dagger call again

rocky copper
#

sure @umbral wing , I'll get back to you with results in sometime. Thanks a lot

rocky copper
#

Hello @umbral wing and team, Thank you, this fix seems working, sorry for taking longer time as I had to duplicate the same RHEL environment in a sandbox but faced same error. So just wondering if this step is mandatory as part of dagger installation and if it has any impact on the existing IP table configuration ?

rustic saddle