rootlesskit icon indicating copy to clipboard operation
rootlesskit copied to clipboard

Alpine: [rootlesskit:parent] error: failed to setup network (`open: No such file or directory`)

Open Gilk260 opened this issue 1 year ago • 4 comments

Hello guys,

I'm currently trying to run docker daemon on an alpine image rootless.

dockerd-routless.sh is using rootlesskit but unfortunately I have this error:

/ # + exec rootlesskit '--state-dir=/tmp/dockerd-rootless' '--net=slirp4netns' '--mtu=65520' '--slirp4netns-sandbox=auto' '--slirp4netns-seccomp=auto' --disable-host-loopback '--port-driver=builtin' '--copy-up=/etc' '--copy-up=/run' '--propagation=rslave' /usr/bin/dockerd-rootless.sh
WARN[0000] Running RootlessKit as the root user is unsupported.
WARN[0000] The host root filesystem is mounted as "master:70". Setting child propagation to "rslave" is not supported.
open: No such file or directory
[rootlesskit:parent] error: failed to setup network &{logWriter:0xc0000a4020 binary:slirp4netns mtu:65520 ipnet:<nil> disableHostLoopback:true apiSocketPath: enableSandbox:true enableSeccomp:false enableIPv6:false ifname:tap0 infoMu:{w:{state:0 sema:0} writerSem:0 readerSem:0 readerCount:{_:{} v:0} readerWait:{_:{} v:0}} info:<nil>}: setting up tap tap0: executing [[nsenter -t 381 -n -m -U --preserve-credentials ip tuntap add name tap0 mode tap] [nsenter -t 381 -n -m -U --preserve-credentials ip link set tap0 up]]: exit status 1
/ # [rootlesskit:child ] error: parsing message from fd 3: EOF

As you can see it tries to run rootlesskit with some argument and fails. I have also tried to run the command with root permission (I know this is a non-sens), and there is still the same problem.

I have already tried this: 304,

If you need any more information, feel free to let me know.

Gilk260 avatar May 29 '24 15:05 Gilk260

open: No such file or directory

Please try sudo modprobe tun and sudo modprobe tap

AkihiroSuda avatar Jun 01 '24 15:06 AkihiroSuda

$ sudo modprobe tun
modprobe: can't change directory to '/lib/modules': No such file or directory

$ sudo modprobe tap
modprobe: can't change directory to '/lib/modules': No such file or directory

Gilk260 avatar Jun 06 '24 12:06 Gilk260

@AkihiroSuda , I don't know if it is related to the Alpine image, but it seems there are some missing files

Gilk260 avatar Jun 10 '24 13:06 Gilk260

@AkihiroSuda , I don't know if it is related to the Alpine image, but it seems there are some missing files

What version of Alpine are you using? Kernel modules are provided by the linux-lts package (or other flavours), see for example:

https://pkgs.alpinelinux.org/contents?file=tun.ko.gz&path=&name=linux-lts&branch=edge&repo=main&arch=x86_64

Do you have that package installed, or similar?

sbrivio-rh avatar Aug 16 '24 10:08 sbrivio-rh