#permission denied error when trying to use Dagger for the first time

1 messages · Page 1 of 1 (latest)

patent dock
#

Hello, I am trying out Dagger for the first time, but I get the following error:

PS C:\Users\Admin_jnesta\dagger> dagger init --sdk=typescript --source=./dagger
✔ connect 14.0s
✔ cache request: mkfile /schema.json 0.0s
✔ mkfile /schema.json 0.0s
✔ cache request: blob://sha256:3af7dee89d43f9a1fdd646da3f1bb07692a0d57512163bd5d00135e78ab4ceb9 0.0s
✔ blob://sha256:3af7dee89d43f9a1fdd646da3f1bb07692a0d57512163bd5d00135e78ab4ceb9 0.0s
✔ moduleSource(refString: "."): ModuleSource! 0.0s
✔ ModuleSource.kind: ModuleSourceKind! 0.0s
✔ ModuleSource.resolveContextPathFromCaller: String! 0.3s
✔ ModuleSource.withName(name: "dagger"): ModuleSource! 0.0s
✔ ModuleSource.withSDK(sdk: "typescript"): ModuleSource! 0.0s
✔ ModuleSource.withInit: ModuleSource! 0.0s
✔ ModuleSource.withSourceSubpath(path: "dagger"): ModuleSource! 0.0s
✘ ModuleSource.resolveFromCaller: ModuleSource! 6.4s
! failed to collect local module source deps: failed to load sdk: failed to load embedded sdk module "typescript": select: failed to create module from directory: select: failed to create module: select: failed to update codegen and runtime: failed to generate code: failed to get modified source directory for go module sdk codegen: select: process "codegen --output /src --module-context-path /src --module-name typescript-sdk --introspection-json-path /schema.json" did not complete successfully: exit code: 1

Error: failed to generate code: input: moduleSource.withName.withSDK.withInit.withSourceSubpath.resolveFromCaller resolve: failed to collect local module source deps: failed to load sdk: failed to load embedded sdk module "typescript": select: failed to create module from directory: select: failed to create module: select: failed to update codegen and runtime: failed to generate code: failed to get modified source directory for go module sdk codegen: select: process "codegen --output /src --module-context-path /src --module-name typescript-sdk --introspection-json-path /schema.json" did not complete successfully: exit code: 1
/usr/local/bin/runc did not terminate successfully: exit status 1: container does not exist


Stderr:
runc run failed: unable to start container process: unable to apply cgroup configuration: mkdir /sys/fs/cgroup/cpuset/buildkit: permission denied

I am on Windows. I tried re-running this command as Administrator, but it gave the same output. Any ideas?

silver girder
#

Oh huh that's odd - what are you using for docker on windows? Docker desktop?

patent dock
#

I can't use Docker Desktop for Windows AFAIK because it is not free for businesses.

silver girder
#

the permission denied issue is odd, i would suspect that that's happening because the dagger engine container wasn't started with --privileged

#

how did you end up starting the dagger engine? was it started manually, and configured with _EXPERIMENTAL_DAGGER_RUNNER_HOST?

patent dock
#

Does that automatically start the dagger engine?

opaque quartz
opaque quartz
#

test....

dagger -vvvv query <<EOF
{
 container {
   from(address:"hello-world") {
     withExec(args:["/hello"]) {
       stdout
     }
    }
  }
}
EOF
patent tulip
#

@patent dock IIRC podman starts its machine by defualt in rootless mode. Could you check running podman machine inspect podman-machine-default and check if the rootful setting is set?

#

Otherwise, you need to create the podman machien with the --rootful flag

lyric path
#

@patent tulip is this something for https://docs.dagger.io/integrations/podman ? if yes, can you specify what should change - is it just the pre-requisites need to be specified as podman in rootful mode? anything else?

patent tulip
lyric path
patent tulip
clever breach
#

Hello, same issue as @patent dock here, in the exact same conditions (Windows + Podman):
runc run failed: unable to start container process: unable to apply cgroup configuration: mkdir /sys/fs/cgroup/cpuset/buildkit: permission denied
I ran podman machine inspect podman-machine-default, and I can see "Rootful": true in the output.

clever breach
#

Update: I managed to get dagger init to run, but only with sudo.
Looks like my user in WSL does not have sufficient rights.

patent tulip
#

let us know if you run into other issues 🙏