Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Gilk260 opened this issue May 29, 2024 · 4 comments

Comments

@Gilk260
Copy link

Gilk260 commented May 29, 2024

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.

@AkihiroSuda AkihiroSuda changed the title Alpine: [rootlesskit:parent] error: failed to setup network Alpine: [rootlesskit:parent] error: failed to setup network (open: No such file or directory) Jun 1, 2024
@AkihiroSuda
Copy link
Member

open: No such file or directory

Please try sudo modprobe tun and sudo modprobe tap

@Gilk260
Copy link
Author

Gilk260 commented Jun 6, 2024

$ 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
Copy link
Author

Gilk260 commented Jun 10, 2024

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

@sbrivio-rh
Copy link
Contributor

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants