donaldzou / WGDashboard

Simple dashboard for WireGuard VPN written in Python & Vue.js
https://donaldzou.github.io/WGDashboard-Documentation/
Apache License 2.0
1.61k stars 242 forks source link

Exception in worker process (No module named 'dashboard') #190

Open nicedevil007 opened 2 years ago

nicedevil007 commented 2 years ago

Describe The Problem Starting WGDashboard isn't working.

Expected Error / Traceback

[root@wireguard-01 log]# cat error_20220804171601.log
[2022-08-04 17:16:01 +0200] [1747] [INFO] Starting gunicorn 20.1.0
[2022-08-04 17:16:01 +0200] [1747] [INFO] Listening at: http://127.0.0.1:8000 (1747)
[2022-08-04 17:16:01 +0200] [1747] [INFO] Using worker: sync
[2022-08-04 17:16:01 +0200] [1748] [INFO] Booting worker with pid: 1748
[2022-08-04 17:16:01 +0200] [1748] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'dashboard'
[2022-08-04 17:16:01 +0200] [1748] [INFO] Worker exiting (pid: 1748)
[2022-08-04 17:16:01 +0200] [1747] [INFO] Shutting down: Master
[2022-08-04 17:16:01 +0200] [1747] [INFO] Reason: Worker failed to boot.

To Reproduce ./wgd.sh debug

OS Information:

Sample of your .conf file

[Account]
username = admin
password = KKLdoesntcare

[Server]
wg_conf_path = /etc/wireguard
app_ip = 0.0.0.0
app_port = 10086
auth_req = true
version = v3.1
dashboard_refresh_interval = 60000
dashboard_sort = status
dashboard_theme = light

[Peers]
peer_global_dns = 1.1.1.1
peer_endpoint_allowed_ip = 0.0.0.0/0
peer_display_mode = grid
remote_endpoint = 192.168.251.197
peer_mtu = 1420
peer_keep_alive = 21
nicedevil007 commented 2 years ago

I want to add that this issue seems to start if the VM get a 2nd interface on an other subnet

DaanSelen commented 3 weeks ago

Does this still happen?