donaldzou / WGDashboard

Simple dashboard for WireGuard VPN written in Python w/ Flask
Apache License 2.0
1.41k stars 207 forks source link

[WGDashboard] wg2 Error: '[Peer]' is not in list #328

Closed DaanSelen closed 2 weeks ago

DaanSelen commented 3 weeks ago

This error:

------------------------------------------------------------
[WGDashboard] Starting WGDashboard with Gunicorn in the background.
[WGDashboard] wg2 Error: '[Peer]' is not in list
[WGDashboard] wg1 Error: '[Peer]' is not in list
[WGDashboard] WGDashboard w/ Gunicorn will be running on 0.0.0.0:10086
[WGDashboard] Access log file is at ./log/access_2024_08_22_11_18_53.log
[WGDashboard] Error log file is at ./log/error_2024_08_22_11_18_53.log
[WGDashboard] Checking if WGDashboard w/ Gunicorn started successfully
[WGDashboard] WGDashboard w/ Gunicorn started successfully
------------------------------------------------------------

Gets thrown for a configuration file like these:

root@61ac0ba87325:/etc/wireguard# cat wg2.conf
[Interface]
PrivateKey = gDKd1e1QLxQyfUr+5YT6haE0Rig7wBE4kfox1NToT3c=
Address = 10.0.2.0/24
ListenPort = 51822
PreUp =
PreDown =
PostUp =
PostDown =
SaveConfig = true

But this is just a newly created or added interface so why is there an error reporting for the peers? An empty interface could also exist. Right?

donaldzou commented 3 weeks ago

Hi Daan, this is intended for debugging use.. I threw this error so that we know which one is empty :) and this error won't crash the dashboard.

DaanSelen commented 3 weeks ago

True.

DaanSelen commented 3 weeks ago

I just noticed because of this:

==> /opt/wireguarddashboard/src/log/error_2024_08_22_12_48_42.log <==
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list
[WGDashboard] wg0 Error: '[Peer]' is not in list

Is there a way you can remove this from wgd.sh start and put it into wgd.sh debug?

donaldzou commented 3 weeks ago

Yes, I can just have it to check if the flask app is ran in __main__, if not that means Gunicorn is running it.

DaanSelen commented 3 weeks ago

Thanks! Love to hear it when you have an update.

donaldzou commented 1 week ago

Fixed :)