WireGuard Update failes Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Niwre
Posts: 36
Joined: Tue Apr 09, 2019 1:26 pm

WireGuard Update failes

Post by Niwre »

@Joulinar

I have installed the latest Wireguard update, unfortunately Wireguard does not start after that. The command dpkg -l wireguard shows version 1.0.20200319-1, although I had already installed version 1.0.20200401. I am currently still at 6.28, if I install 6.30, it will also install the latest version of WireGuard and I have the same error. What can I do?

Regards
Niwre
User avatar
Joulinar
Posts: 2081
Joined: Sat Nov 16, 2019 12:49 am

Re: WireGuard Update failes

Post by Joulinar »

Hi,

Latest version of Wireguard should be 1.0.20200506-1. Question is what do you installed and how did you do that?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Niwre
Posts: 36
Joined: Tue Apr 09, 2019 1:26 pm

Re: WireGuard Update failes

Post by Niwre »

@Joulinar

Yes, I installed the last version, which I did with G_AGUP and G_AGUG as always.
User avatar
Joulinar
Posts: 2081
Joined: Sat Nov 16, 2019 12:49 am

Re: WireGuard Update failes

Post by Joulinar »

ok I'm on v6.28 as well and today I was updating wireguard-dkms from 0.0.20200318-1 to 1.0.20200506-1 without issues. I used apt updated && apt upgrade which is nearly the same as using G_AGUP and G_AGUG. After reboot my wg-quick@wg0.service is running fine and I'm able to connect.

Code: Select all

root@DietPi4:~# systemctl status wg-quick@wg0.service
● wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
   Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/wg-quick@wg0.service.d
           └─dietpi.conf
   Active: active (exited) since Tue 2020-05-19 12:29:36 CEST; 2s ago
     Docs: man:wg-quick(8)
           man:wg(8)
           https://www.wireguard.com/
           https://www.wireguard.com/quickstart/
           https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
           https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
  Process: 967 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=0/SUCCESS)
 Main PID: 967 (code=exited, status=0/SUCCESS)
bzw Wireguard has more than 1 package and you would need to use the * on your command to display all of them. The package that is update is wireguard-dkms and not wireguard

Code: Select all

root@DietPi4:~# dpkg -l wireguard*
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name              Version        Architektur  Beschreibung
+++-=================-==============-============-===========================================================
ii  wireguard         1.0.20200319-1 all          fast, modern, secure kernel VPN tunnel (metapackage)
ii  wireguard-dkms    1.0.20200506-1 all          fast, modern, secure kernel VPN tunnel (DKMS version)
un  wireguard-modules <keine>        <keine>      (keine Beschreibung vorhanden)
ii  wireguard-tools   1.0.20200319-1 armhf        fast, modern, secure kernel VPN tunnel (userland utilities)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Niwre
Posts: 36
Joined: Tue Apr 09, 2019 1:26 pm

Re: WireGuard Update failes

Post by Niwre »

@Joulinar

I tried again with apt update && apt upgrade, after the installation the service is still running. Unfortunately, after a reboot, it no longer works. However, the installation was carried out.

Code: Select all

 root@WireGuardPi:~# dpkg -l wireguard*
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name                                       Version                    Architektur                Beschreibung
+++-==========================================-==========================-==========================-==========================================================================================
ii  wireguard                                  1.0.20200319-1             all                        fast, modern, secure kernel VPN tunnel (metapackage)
ii  wireguard-dkms                             1.0.20200506-1             all                        fast, modern, secure kernel VPN tunnel (DKMS version)
un  wireguard-modules                          <keine>                    <keine>                    (keine Beschreibung vorhanden)
ii  wireguard-tools                            1.0.20200319-1             amd64                      fast, modern, secure kernel VPN tunnel (userland utilities)

Code: Select all

 wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
   Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-05-19 12:18:32 BST; 10s ago
     Docs: man:wg-quick(8)
           man:wg(8)
           https://www.wireguard.com/
           https://www.wireguard.com/quickstart/
           https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
           https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
  Process: 1170 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=1/FAILURE)
 Main PID: 1170 (code=exited, status=1/FAILURE)

Mai 19 12:18:32 WireGuardPi systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Mai 19 12:18:32 WireGuardPi wg-quick[1170]: [#] ip link add wg0 type wireguard
Mai 19 12:18:32 WireGuardPi wg-quick[1170]: RTNETLINK answers: Operation not supported
Mai 19 12:18:32 WireGuardPi wg-quick[1170]: Unable to access interface: Protocol not supported
Mai 19 12:18:32 WireGuardPi wg-quick[1170]: [#] ip link delete dev wg0
Mai 19 12:18:32 WireGuardPi wg-quick[1170]: Cannot find device "wg0"
Mai 19 12:18:32 WireGuardPi systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
Mai 19 12:18:32 WireGuardPi systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
Mai 19 12:18:32 WireGuardPi systemd[1]: wg-quick@wg0.service: Unit entered failed state.
Mai 19 12:18:32 WireGuardPi systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
Something is going wrong.
User avatar
Joulinar
Posts: 2081
Joined: Sat Nov 16, 2019 12:49 am

Re: WireGuard Update failes

Post by Joulinar »

did you tried restarting the service wg-quick@wg0.service ??

Code: Select all

systemctl restart wg-quick@wg0.service
As well pls can you have a look to journalctl

Code: Select all

journalctl -u wg-quick@wg0.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Niwre
Posts: 36
Joined: Tue Apr 09, 2019 1:26 pm

Re: WireGuard Update failes

Post by Niwre »

@Joulinar

Code: Select all

 root@WireGuardPi:~# journalctl -u wg-quick@wg0.service
-- Logs begin at Tue 2020-05-19 15:39:05 BST, end at Tue 2020-05-19 15:39:34 BST. --
Mai 19 15:39:07 WireGuardPi systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Mai 19 15:39:08 WireGuardPi wg-quick[486]: [#] ip link add wg0 type wireguard
Mai 19 15:39:08 WireGuardPi wg-quick[486]: RTNETLINK answers: Operation not supported
Mai 19 15:39:08 WireGuardPi wg-quick[486]: Unable to access interface: Protocol not supported
Mai 19 15:39:08 WireGuardPi wg-quick[486]: [#] ip link delete dev wg0
Mai 19 15:39:08 WireGuardPi wg-quick[486]: Cannot find device "wg0"
Mai 19 15:39:08 WireGuardPi systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
Mai 19 15:39:08 WireGuardPi systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
Mai 19 15:39:08 WireGuardPi systemd[1]: wg-quick@wg0.service: Unit entered failed state.
Mai 19 15:39:08 WireGuardPi systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
root@WireGuardPi:~# 
Niwre
Posts: 36
Joined: Tue Apr 09, 2019 1:26 pm

Re: WireGuard Update failes

Post by Niwre »

@Joulinar

Code: Select all

 root@WireGuardPi:~# systemctl restart wg-quick@wg0.service
Job for wg-quick@wg0.service failed because the control process exited with error code.
See "systemctl status wg-quick@wg0.service" and "journalctl -xe" for details.
User avatar
Joulinar
Posts: 2081
Joined: Sat Nov 16, 2019 12:49 am

Re: WireGuard Update failes

Post by Joulinar »

hmm looks like the kernel module is not loaded correctly. Can you try following

Code: Select all

sudo dpkg-reconfigure wireguard-dkms
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Niwre
Posts: 36
Joined: Tue Apr 09, 2019 1:26 pm

Re: WireGuard Update failes

Post by Niwre »

@Joulinar

Code: Select all

 root@WireGuardPi:~# dpkg-reconfigure wireguard-dkms

------------------------------
Deleting module version: 1.0.20200506
completely from the DKMS tree.
------------------------------
Done.
Loading new wireguard-1.0.20200506 DKMS files...
Building for 4.9.0-9-amd64
Building initial module for 4.9.0-9-amd64
Error! Bad return status for module build on kernel: 4.9.0-9-amd64 (x86_64)
Consult /var/lib/dkms/wireguard/1.0.20200506/build/make.log for more information.
Post Reply