Hardware: VPS bought online YunoHost version: 4.3.6.3 (stable) I have access to my server : Through SSH | through the webadmin | Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
Greetings!
I have installed WireGuard on my VPS. I ran diagnosis to see if everything is running okay before attempting to use it. It indicates two issues:
Port 8095 is not reachable from outside. However when I check using āsudo yunohost firewall listā it lists this port as one of the open ports.
Service wg-quick@wg0 is failed.
I attempted restarting wg as instructed by typing yunohost service restart wg-quick@wg0 . If fails to start. The log states the following:
Jun 19 21:02:54 wg-quick[801]: wg-quick: `/etc/wireguard/wg0.confā does not exist
Upon inspection I see there is no wg0.conf at that location. However, my WireGuard web UI is running without any issues (from what I see). I am able to log in and navigate through its interface.
Should I create wg0.conf manually to be able to start WireGuard?
Please see below for the complete log:
journalctl:
- -- Logs begin at Sun 2022-06-19 21:02:52 CDT, end at Sun 2022-06-19 22:38:18 CDT. --
- Jun 19 21:02:54 systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
- Jun 19 21:02:54 wg-quick[801]: wg-quick: `/etc/wireguard/wg0.conf' does not exist
- Jun 19 21:02:54 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
- Jun 19 21:02:54 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
- Jun 19 21:02:54 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
- Jun 19 22:37:59 systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
- Jun 19 22:37:59 wg-quick[3535]: wg-quick: `/etc/wireguard/wg0.conf' does not exist
- Jun 19 22:37:59 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
- Jun 19 22:37:59 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
- Jun 19 22:37:59 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
I followed the steps. Created the client on my desktop as well.
I still get the yunohost diagnosis saying that :Service wg-quick@wg0 is failed :("
When I try to run yunohost service restart wg-quick@wg0 I get these messages:
journalctl:
- -- Logs begin at Mon 2022-06-20 05:03:34 CDT, end at Mon 2022-06-20 19:30:35 CDT. --
- Jun 20 18:58:44 wg-quick[15675]: [#] ip link delete dev wg0
- Jun 20 18:58:44 wg-quick[15675]: Cannot find device "wg0"
- Jun 20 18:58:44 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
- Jun 20 18:58:44 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
- Jun 20 18:58:44 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
- Jun 20 18:59:19 systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
- Jun 20 18:59:19 wg-quick[15701]: [#] ip link add wg0 type wireguard
- Jun 20 18:59:19 wg-quick[15701]: RTNETLINK answers: Operation not supported
- Jun 20 18:59:19 wg-quick[15701]: Unable to access interface: Protocol not supported
- Jun 20 18:59:19 wg-quick[15701]: [#] ip link delete dev wg0
- Jun 20 18:59:19 wg-quick[15701]: Cannot find device "wg0"
- Jun 20 18:59:19 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
- Jun 20 18:59:19 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
- Jun 20 18:59:19 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
- Jun 20 19:26:40 systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
- Jun 20 19:26:41 wg-quick[16280]: [#] ip link add wg0 type wireguard
- Jun 20 19:26:41 wg-quick[16280]: RTNETLINK answers: Operation not supported
- Jun 20 19:26:41 wg-quick[16280]: Unable to access interface: Protocol not supported
- Jun 20 19:26:41 wg-quick[16280]: [#] ip link delete dev wg0
- Jun 20 19:26:41 wg-quick[16280]: Cannot find device "wg0"
- Jun 20 19:26:41 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
- Jun 20 19:26:41 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
- Jun 20 19:26:41 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
- Jun 20 19:28:07 systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
- Jun 20 19:28:07 wg-quick[16564]: [#] ip link add wg0 type wireguard
- Jun 20 19:28:07 wg-quick[16564]: RTNETLINK answers: Operation not supported
- Jun 20 19:28:07 wg-quick[16564]: Unable to access interface: Protocol not supported
- Jun 20 19:28:07 wg-quick[16564]: [#] ip link delete dev wg0
- Jun 20 19:28:07 wg-quick[16564]: Cannot find device "wg0"
- Jun 20 19:28:07 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
- Jun 20 19:28:07 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
- Jun 20 19:28:07 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
- Jun 20 19:28:34 systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
- Jun 20 19:28:34 wg-quick[16614]: [#] ip link add wg0 type wireguard
- Jun 20 19:28:34 wg-quick[16614]: RTNETLINK answers: Operation not supported
- Jun 20 19:28:34 wg-quick[16614]: Unable to access interface: Protocol not supported
- Jun 20 19:28:34 wg-quick[16614]: [#] ip link delete dev wg0
- Jun 20 19:28:34 wg-quick[16614]: Cannot find device "wg0"
- Jun 20 19:28:34 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
- Jun 20 19:28:34 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
- Jun 20 19:28:34 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
- Jun 20 19:30:24 systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
- Jun 20 19:30:24 wg-quick[16654]: [#] ip link add wg0 type wireguard
- Jun 20 19:30:24 wg-quick[16654]: RTNETLINK answers: Operation not supported
- Jun 20 19:30:24 wg-quick[16654]: Unable to access interface: Protocol not supported
- Jun 20 19:30:24 wg-quick[16654]: [#] ip link delete dev wg0
- Jun 20 19:30:24 wg-quick[16654]: Cannot find device "wg0"
- Jun 20 19:30:24 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
- Jun 20 19:30:24 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
- Jun 20 19:30:24 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
I rebooted the server. I still get errors. Is this because I have misconfigured something on the server?:
Could not start the service 'wg-quick@wg0'
Recent service logs:-- Logs begin at Mon 2022-06-20 23:59:38 CDT, end at Tue 2022-06-21 00:02:58 CDT. -- Jun 20 23:59:40 systemd[1]: Starting WireGuard via wg-quick(8) for wg0... Jun 20 23:59:40 wg-quick[588]: [#] ip link add wg0 type wireguard Jun 20 23:59:40 wg-quick[588]: RTNETLINK answers: Operation not supported Jun 20 23:59:40 wg-quick[588]: Unable to access interface: Protocol not supported Jun 20 23:59:40 wg-quick[588]: [#] ip link delete dev wg0 Jun 20 23:59:40 wg-quick[588]: Cannot find device "wg0" Jun 20 23:59:40 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE Jun 20 23:59:40 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'. Jun 20 23:59:40 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0. Jun 21 00:02:58 systemd[1]: Starting WireGuard via wg-quick(8) for wg0... Jun 21 00:02:58 wg-quick[2027]: [#] ip link add wg0 type wireguard Jun 21 00:02:58 wg-quick[2027]: RTNETLINK answers: Operation not supported Jun 21 00:02:58 wg-quick[2027]: Unable to access interface: Protocol not supported Jun 21 00:02:58 wg-quick[2027]: [#] ip link delete dev wg0 Jun 21 00:02:58 wg-quick[2027]: Cannot find device "wg0" Jun 21 00:02:58 systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE Jun 21 00:02:58 systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'. Jun 21 00:02:58 systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
**While processing the action the server said:**
Could not execute the command 'systemctl start wg-quick@wg0'
The automatic diagnosis alerted me today that āThe system has 199 MiB (20%) RAM available (out of 986 MiB). Be carefulā. The only change Iāve made to the server recently was installing WireGuard. So I uninstalled it for the time being, and rebooted the server.
Memory consumption has returned to normal (reasonable?) levels. I donāt have prior experience with WireGuard. So I donāt know if it consumes that much of memory.
I am aborting my attempt to run WireGuard for the time being. I will get back to it at a later point. Thanks very much @tituspijean for looking into it this far.
It should indeed not consume that much memory. My guess it was another service, but who knows. If that happens again, use the command sudo htop to see whatās consuming resources on your system. (sudo apt install htop if it complains about missing the command).