Git Product home page Git Product logo

Comments (18)

nicedevil007 avatar nicedevil007 commented on August 17, 2024

ok... maybe I missed that I have to install the headers on the host?

sudo apt install raspberrypi-kernel-headers

from docker-wireguard.

nicedevil007 avatar nicedevil007 commented on August 17, 2024

There error still persists :(

image

from docker-wireguard.

aptalca avatar aptalca commented on August 17, 2024

What is the kernel? uname -a

from docker-wireguard.

nicedevil007 avatar nicedevil007 commented on August 17, 2024

root@DietPi:~# uname -a Linux DietPi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux

from docker-wireguard.

aptalca avatar aptalca commented on August 17, 2024

looks like the raspberrypi-kernel-headers package now only installs headers for the 5.4.51 kernel, but you're still on 4.19.118

Try a full apt update && upgrade then reboot and see if it updates your kernel

from docker-wireguard.

nicedevil007 avatar nicedevil007 commented on August 17, 2024

thank you so far... to get the pi up to kernel 5 I need a rpi-update!

doing this right now. will report back!

from docker-wireguard.

nicedevil007 avatar nicedevil007 commented on August 17, 2024
root@DietPi:~# uname -a
Linux DietPi 5.4.51-v7l+ #1328 SMP Mon Jul 27 16:57:05 BST 2020 armv7l GNU/Linux

Ok that worked for this issue... now I have a new one....

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.,
[s6-init] ensuring user provided files have correct perms...exited 0.,
[fix-attrs.d] applying ownership & permissions fixes...,
[fix-attrs.d] done.,
[cont-init.d] executing container initialization scripts...,
[cont-init.d] 01-envfile: executing... ,
[cont-init.d] 01-envfile: exited 0.,
[cont-init.d] 10-adduser: executing... ,
,
-------------------------------------,
          _         (),
         | |  ___   _    __,
         | | / __| | |  /  \ ,
         | | \__ \ | | | () |,
         |_| |___/ |_|  \__/,
,
,
Brought to you by linuxserver.io,
-------------------------------------,
,
To support the app dev(s) visit:,
WireGuard: https://www.wireguard.com/donations/,
,
To support LSIO projects visit:,
https://www.linuxserver.io/donate/,
-------------------------------------,
GID/UID,
-------------------------------------,
,
User uid:    1000,
User gid:    1000,
-------------------------------------,
,
[cont-init.d] 10-adduser: exited 0.,
[cont-init.d] 30-config: executing... ,
RTNETLINK answers: Operation not permitted,
**** The wireguard module is not active, will attempt kernel header install and module compilation. ****,
**** Attempting kernel header install ****,
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease [242 kB],
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB],
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB],
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease [88.7 kB],
Get:5 http://ports.ubuntu.com/ubuntu-ports bionic/universe armhf Packages [11.0 MB],
Get:6 http://ports.ubuntu.com/ubuntu-ports bionic/multiverse armhf Packages [157 kB],
Get:7 http://ports.ubuntu.com/ubuntu-ports bionic/main armhf Packages [1,277 kB],
Get:8 http://ports.ubuntu.com/ubuntu-ports bionic/restricted armhf Packages [12.5 kB],
Get:9 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main armhf Packages [841 kB],
Get:10 http://ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse armhf Packages [4,407 B],
Get:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe armhf Packages [1,175 kB],
Get:12 http://ports.ubuntu.com/ubuntu-ports bionic-updates/restricted armhf Packages [11.0 kB],
Get:13 http://ports.ubuntu.com/ubuntu-ports bionic-backports/main armhf Packages [8,247 B],
Get:14 http://ports.ubuntu.com/ubuntu-ports bionic-backports/universe armhf Packages [8,101 B],
Get:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main armhf Packages [573 kB],
Get:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted armhf Packages [5,504 B],
Get:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe armhf Packages [697 kB],
Get:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse armhf Packages [1,849 B],
Fetched 16.2 MB in 5s (3,051 kB/s),
Reading package lists...,
**** Raspbian kernel naming convention detected, attempting to install raspbian kernel headers ****,
Warning: apt-key output should not be parsed (stdout is not a terminal),
OK,
Hit:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease,
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB],
Hit:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease,
Hit:4 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease,
Hit:5 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease,
Get:6 http://archive.raspberrypi.org/debian buster/main Sources [93.7 kB],
Get:7 http://archive.raspberrypi.org/debian buster/main armhf Packages [330 kB],
Fetched 457 kB in 2s (252 kB/s),
Reading package lists...,
Reading package lists...,
Building dependency tree...,
Reading state information...,
The following NEW packages will be installed:,
  raspberrypi-kernel-headers,
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.,
Need to get 26.2 MB of archives.,
After this operation, 171 MB of additional disk space will be used.,
Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200723-1 [26.2 MB],
Fetched 26.2 MB in 2s (10.9 MB/s),
Selecting previously unselected package raspberrypi-kernel-headers.
,
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 17288 files and directories currently installed.)
,
Preparing to unpack .../raspberrypi-kernel-headers_1.20200723-1_armhf.deb ...
,
Unpacking raspberrypi-kernel-headers (1.20200723-1) ...
,
Setting up raspberrypi-kernel-headers (1.20200723-1) ...
,
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51+
,
 * dkms: running auto installation service for kernel 5.4.51+        
[ OK ]
,
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7+
,
 * dkms: running auto installation service for kernel 5.4.51-v7+        
[ OK ]
,
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v7l+
,
 * dkms: running auto installation service for kernel 5.4.51-v7l+        
[ OK ]
,
run-parts: executing /etc/kernel/header_postinst.d/dkms 5.4.51-v8+
,
 * dkms: running auto installation service for kernel 5.4.51-v8+        
[ OK ]
,
**** Kernel headers seem to be present, attempting to build the wireguard module. . . ****,
**** Generating signing key ****,
Generating a RSA private key,
..................++++,
................................................................................................................................................................................................................++++,
writing new private key to 'signing_key.pem',
-----,
**** Building the module ****,
make: Entering directory '/app/wireguard-linux-compat/src',
  CC [M]  /app/wireguard-linux-compat/src/main.o,
  CC [M]  /app/wireguard-linux-compat/src/noise.o,
  CC [M]  /app/wireguard-linux-compat/src/device.o,
  CC [M]  /app/wireguard-linux-compat/src/peer.o,
  CC [M]  /app/wireguard-linux-compat/src/timers.o,
  CC [M]  /app/wireguard-linux-compat/src/queueing.o,
  CC [M]  /app/wireguard-linux-compat/src/send.o,
  CC [M]  /app/wireguard-linux-compat/src/receive.o,
  CC [M]  /app/wireguard-linux-compat/src/socket.o,
  CC [M]  /app/wireguard-linux-compat/src/peerlookup.o,
  CC [M]  /app/wireguard-linux-compat/src/allowedips.o,
  CC [M]  /app/wireguard-linux-compat/src/ratelimiter.o,
  CC [M]  /app/wireguard-linux-compat/src/cookie.o,
  CC [M]  /app/wireguard-linux-compat/src/netlink.o,
  CC [M]  /app/wireguard-linux-compat/src/crypto/zinc/chacha20/chacha20.o,
  PERLASM /app/wireguard-linux-compat/src/crypto/zinc/chacha20/chacha20-arm.S,
  AS [M]  /app/wireguard-linux-compat/src/crypto/zinc/chacha20/chacha20-unrolled-arm.o,
  CC [M]  /app/wireguard-linux-compat/src/crypto/zinc/poly1305/poly1305.o,
  PERLASM /app/wireguard-linux-compat/src/crypto/zinc/poly1305/poly1305-arm.S,
  CC [M]  /app/wireguard-linux-compat/src/crypto/zinc/chacha20poly1305.o,
  CC [M]  /app/wireguard-linux-compat/src/crypto/zinc/blake2s/blake2s.o,
  CC [M]  /app/wireguard-linux-compat/src/crypto/zinc/curve25519/curve25519.o,
  AS [M]  /app/wireguard-linux-compat/src/crypto/zinc/curve25519/curve25519-arm.o,
  AS [M]  /app/wireguard-linux-compat/src/crypto/zinc/chacha20/chacha20-arm.o,
  AS [M]  /app/wireguard-linux-compat/src/crypto/zinc/poly1305/poly1305-arm.o,
  LD [M]  /app/wireguard-linux-compat/src/wireguard.o,
  Building modules, stage 2.,
  MODPOST 1 modules,
  CC [M]  /app/wireguard-linux-compat/src/wireguard.mod.o,
  LD [M]  /app/wireguard-linux-compat/src/wireguard.ko,
make: Leaving directory '/app/wireguard-linux-compat/src',
make: Entering directory '/app/wireguard-linux-compat/src',
  INSTALL /app/wireguard-linux-compat/src/wireguard.ko,
  DEPMOD  5.4.51-v7l+,
Warning: modules_install: missing 'System.map' file. Skipping depmod.,
depmod -b "/" -a 5.4.51-v7l+,
make: Leaving directory '/app/wireguard-linux-compat/src',
**** Let's test our new module. ****,
RTNETLINK answers: Operation not permitted,
**** The module is not active, review the logs. Sleeping now. . . ****,

from docker-wireguard.

nicedevil007 avatar nicedevil007 commented on August 17, 2024

@aptalca I saw that the images was updated and there was hope that this will fix my problem, unfurtunately not... Just want to let you know in case you tried to fix this issue?

now I get a few different lines in the log at the end:

Warning: modules_install: missing 'System.map' file. Skipping depmod.
depmod -b "/" -a 5.4.51-v7l+
depmod: WARNING: could not open //lib/modules/5.4.51-v7l+/modules.order: No such file or directory
depmod: WARNING: could not open //lib/modules/5.4.51-v7l+/modules.builtin: No such file or directory
make: Leaving directory '/app/wireguard-linux-compat/src'
**** Let's test our new module. ****
RTNETLINK answers: Operation not permitted
**** The module is not active, review the logs. Sleeping now. . . ****

from docker-wireguard.

Patanouk avatar Patanouk commented on August 17, 2024

Hi!
I had the exact same issue as you, trying to run the container on a RaspberryPi

I had the following volumes on my docker-compose file

volumes:
  - config:/config
  - ./lib-modules:/lib/modules

After deploying the stack / docker-compose up, the lib-modules folder didn't contain some of the needed files (modules.order && modules.builtin).
It seems that the kernel headers installation done in the container is missing some of the files? Don't really have time to investigate further atm

The /lib/modules/5.4.51-v7l+ folder (populated with sudo apt install raspberrypi-kernel-headers) did contain these files

Long story short, you can try to

  • Remove your stack / docker-compose down
  • run sudo apt reinstall raspberrypi-kernel-headers
  • Double check that the previously missing files are now correctly there
  • Make sure that your container volume is linked to /lib/modules/
  • Restart your stack / docker-compose up

from docker-wireguard.

tobbenb avatar tobbenb commented on August 17, 2024

You didn't set the correct volume mount for /lib/modules. You did not map the host /lib/modules to the containers /lib/modules.

from docker-wireguard.

Patanouk avatar Patanouk commented on August 17, 2024

I know, and it does indeed work fine when I map the volume to the host one.

If you bind the container /lib/modules to an arbitrary empty folder (./lib-volumes in my case), the container will download the kernel headers at startup and populate the previously empty bind folder

However, it seems that the kernel headers which are downloaded that way are missing some of the files (see #47 (comment)) for the detail of the missing files

Kernel headers downloaded via the package manager do contain the missing files

from docker-wireguard.

nicedevil007 avatar nicedevil007 commented on August 17, 2024

@Patanouk thank you for your response, unfurtunately it didn't work for me. tryed your solution with an empty directory but that leads to a rejected container all the time...

root@DietPi:/lib/modules/5.4.51-v7l+# ls -la
total 2276
drwxr-xr-x  4 root root   4096 Jul 29 15:41 .
drwxr-xr-x 10 root root   4096 Jul 27 16:06 ..
lrwxrwxrwx  1 root root     34 Jul 23 16:31 build -> /usr/src/linux-headers-5.4.51-v7l+
drwxr-xr-x  2 root root   4096 Jul 27 19:21 extra
drwxr-xr-x 11 root root   4096 Jul 27 19:17 kernel
-rw-r--r--  1 root root 559450 Jul 29 15:41 modules.alias
-rw-r--r--  1 root root 580883 Jul 29 15:41 modules.alias.bin
-rw-r--r--  1 root root  12786 Jul 27 19:17 modules.builtin
-rw-r--r--  1 root root  14039 Jul 29 15:41 modules.builtin.bin
-rw-r--r--  1 root root  59057 Jul 27 19:17 modules.builtin.modinfo
-rw-r--r--  1 root root 191737 Jul 29 15:41 modules.dep
-rw-r--r--  1 root root 264099 Jul 29 15:41 modules.dep.bin
-rw-r--r--  1 root root    324 Jul 29 15:41 modules.devname
-rw-r--r--  1 root root  63033 Jul 27 19:17 modules.order
-rw-r--r--  1 root root    355 Jul 29 15:41 modules.softdep
-rw-r--r--  1 root root 241906 Jul 29 15:41 modules.symbols
-rw-r--r--  1 root root 296965 Jul 29 15:41 modules.symbols.bin

Isn't the RTNET thing a problem that should be fixed as well?

from docker-wireguard.

JHenzi avatar JHenzi commented on August 17, 2024

I'm not able to get them from the host and when the container tries to get them from the repos I see this;

**** No kernel headers found in the Ubuntu or Debian repos!! Will try the headers from host (if mapped), may or may not work ****,
**** Kernel headers don't seem to be available, can't compile the module. Sleeping now. . . ****

from docker-wireguard.

j0nnymoe avatar j0nnymoe commented on August 17, 2024

@JHenzi please post more information about your setup (host/hardware/kernel version etc) and what you've done to deploy the container. We can't work our your issue just from the error.

from docker-wireguard.

JHenzi avatar JHenzi commented on August 17, 2024

Apologies. I'm running on a Debian buster host with this command line;

docker create --name=wireguard --cap-add=NET_ADMIN --cap-add=SYS_MODULE -e PUID=1000 -e PGID=1000 -e TZ=America/New_York -e SERVERURL=4qq.org#optional -e SERVERPORT=51820#optional -e PEERS=1#optional -e PEERDNS=auto#optional -e INTERNAL_SUBNET=10.13.13.0#optional -p 51820:51820/udp -v /home/john/wireguard:/config -v /lib/modules:/lib/modules --sysctl="net.ipv4.conf.all.src_valid_mark=1" --restart unless-stopped linuxserver/wireguard

Maybe my oddity is running on a Linode VMS and I'm using their kernel version. I've tried installing headers on the host but they aren't found. Seems we're looking for them on the host, with or without /lib/modules in the command line and then in the repos but none are found (in the container, per logs). Why are users above finding them with apt-get and able to proceed while others cannot and we end up sleeping the daemon on startup?

I'm more curious on why the container is looking for packages in the repos and not finding them - I'd rather not rely on the host having the files if possible.

Edit: Host kernel version; 5.4.10-x86_64-linode132

from docker-wireguard.

aptalca avatar aptalca commented on August 17, 2024

If you're using a custom kernel, and there are no headers in ubuntu/debian repos, then you need to find the headers and install them on the host. Once you do that, you need to map /usr/src:/usr/src. The readme explains that.

from docker-wireguard.

JHenzi avatar JHenzi commented on August 17, 2024

Confused, why doesn't the container find any packages to install inside itself?

from docker-wireguard.

aptalca avatar aptalca commented on August 17, 2024

Because you're using a custom kernel. The headers for that kernel are not published as a package in the ubuntu or debian repos

from docker-wireguard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.