You are not logged in.

#1 2024-01-01 13:50:18

cmonty14
Member
Registered: 2019-10-05
Posts: 58

systemd service wg-quick@interfacename.service fails

Hi,
I have deployed package wireguard-tools in order to setup Wireguard connection to my server.
For this connection I configured Wireguard file /etc/wireguard/interfacename.conf.

I can establish the Wireguard connection with this command:

wg-quick up interfacename

I verify this Wireguard connection using command:

sudo wg show

All looks good here.

However, when I try to start systemd service wg-quick@interfacename.service I get this error:

❯ sudo systemctl status wg-quick@interfacename.service
× wg-quick@interfacename.service - WireGuard via wg-quick(8) for interfacename
     Loaded: loaded (/usr/lib/systemd/system/wg-quick@.service; disabled; preset: disabled)
     Active: failed (Result: exit-code) since Mon 2024-01-01 14:30:34 CET; 1min 49s 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: 8175 ExecStart=/usr/bin/wg-quick up interfacename (code=exited, status=1/FAILURE)
   Main PID: 8175 (code=exited, status=1/FAILURE)
        CPU: 13ms

Jan 01 14:30:34 eliza systemd[1]: Starting WireGuard via wg-quick(8) for interfacename...
Jan 01 14:30:34 eliza wg-quick[8175]: wg-quick: `/etc/wireguard/interfacename.conf' does not exist
Jan 01 14:30:34 eliza systemd[1]: wg-quick@interfacename.service: Main process exited, code=exited, status=1/>
Jan 01 14:30:34 eliza systemd[1]: wg-quick@interfacename.service: Failed with result 'exit-code'.
Jan 01 14:30:34 eliza systemd[1]: Failed to start WireGuard via wg-quick(8) for interfacename.

The root cause for this failure is printed: wg-quick: `/etc/wireguard/interfacename.conf' does not exist
However this makes no sense because

wg-quick up interfacename

works as expected.

Could you please advise how to fix this issue?

THX

Offline

#2 2024-01-01 16:39:37

Locker999
Member
Registered: 2024-01-01
Posts: 4

Re: systemd service wg-quick@interfacename.service fails

can you provide

 sudo ls /etc/wireguard 

Last edited by Locker999 (2024-01-01 16:43:57)

Offline

#3 2024-01-01 19:51:05

cmonty14
Member
Registered: 2019-10-05
Posts: 58

Re: systemd service wg-quick@interfacename.service fails

Locker999 wrote:

can you provide

 sudo ls /etc/wireguard 
❯ sudo ls -l /etc/wireguard
insgesamt 4
-rw-r-----. 1 root root 368  1. Jan 14:20 interfacename.conf

If this file does not exist

wg-quick up interfacename

will fail, too.
But it's not.

Last edited by cmonty14 (2024-01-01 19:51:28)

Offline

#4 2024-01-01 20:21:54

Locker999
Member
Registered: 2024-01-01
Posts: 4

Re: systemd service wg-quick@interfacename.service fails

try
systemd start service wg-quick@interface*

if it doesnt work out

sudo chmod 755 /etc/wireguard/interfacename.conf

and try again

WHATEVER if chmod doesn't help it's a mess

Last edited by Locker999 (2024-01-02 05:14:29)

Offline

Board footer

Powered by FluxBB