Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panel crash #384

Open
sohrabp72 opened this issue Sep 13, 2024 · 19 comments
Open

Panel crash #384

sohrabp72 opened this issue Sep 13, 2024 · 19 comments
Labels
bug Something isn't working

Comments

@sohrabp72
Copy link

Traceback (most recent call last):
File "/root/WGDashboard/src/dashboard.py", line 1412, in
DashboardConfig = DashboardConfig()
File "/root/WGDashboard/src/dashboard.py", line 1121, in init
"remote_endpoint": ifcfg.default_interface()['inet'],
File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/init.py", line 81, in default_interface
return Parser(ifconfig=ifconfig)._default_interface(route_output=route_output)
File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 34, in init
self.parse(self.ifconfig_data)
File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 76, in parse
raise RuntimeError(
RuntimeError: Got results that don't belong to a device

after a service restart this happened,
Ubuntu 22.04 TLS
python 3.10

@sohrabp72 sohrabp72 added the bug Something isn't working label Sep 13, 2024
@donaldzou
Copy link
Owner

donaldzou commented Sep 13, 2024 via email

@sohrabp72
Copy link
Author

sohrabp72 commented Sep 13, 2024

By service restart, do you mean running the dashboard with a service file? Get Outlook for iOShttps://aka.ms/o0ukef

________________________________ From: xtg @.> Sent: Saturday, September 14, 2024 2:41:04 AM To: donaldzou/WGDashboard @.> Cc: Subscribed @.> Subject: [donaldzou/WGDashboard] Panel crash (Issue #384) Traceback (most recent call last): File "/root/WGDashboard/src/dashboard.py", line 1412, in DashboardConfig = DashboardConfig() File "/root/WGDashboard/src/dashboard.py", line 1121, in init "remote_endpoint": ifcfg.default_interface()['inet'], File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/init.py", line 81, in default_interface return Parser(ifconfig=ifconfig)._default_interface(route_output=route_output) File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 34, in init self.parse(self.ifconfig_data) File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 76, in parse raise RuntimeError( RuntimeError: Got results that don't belong to a device after a service restart this happened, Ubuntu 22.04 TLS python 3.10 — Reply to this email directly, view it on GitHub<#384>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGARNUMCFCIDYOE3LTXZKYTZWMWUBAVCNFSM6AAAAABOF4WUW6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZDKNBUGQ2TENQ. You are receiving this because you are subscribed to this thread.Message ID: @.>

Yes systemd services. why should I install Outlook?

@donaldzou
Copy link
Owner

donaldzou commented Sep 13, 2024 via email

@sohrabp72
Copy link
Author

root@V2-WG:~/WGDashboard/src# ./wgd.sh debug

[WGDashboard] Starting WGDashboard in the foreground.
Traceback (most recent call last):
File "/root/WGDashboard/src/dashboard.py", line 1412, in
DashboardConfig = DashboardConfig()
File "/root/WGDashboard/src/dashboard.py", line 1121, in init
"remote_endpoint": ifcfg.default_interface()['inet'],
File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/init.py", line 81, in default_interface
return Parser(ifconfig=ifconfig)._default_interface(route_output=route_output)
File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 34, in init
self.parse(self.ifconfig_data)
File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 76, in parse
raise RuntimeError(
RuntimeError: Got results that don't belong to a device

root@V2-WG:~/WGDashboard/src#

@sohrabp72
Copy link
Author

Even a fresh install does not let me run the panel anymore, seems I need a VPS rebuild.
here is the error after fresh install:

root@V2-WG:~/WGDashboard/src# systemctl status wg-dashboard.service
● wg-dashboard.service
     Loaded: loaded (/etc/systemd/system/wg-dashboard.service; enabled; vendor preset: enabled)
     Active: activating (start) since Fri 2024-09-13 19:33:43 UTC; 14s ago
Cntrl PID: 4309 (wgd.sh)
      Tasks: 2 (limit: 4541)
     Memory: 1.6M
     CGroup: /system.slice/wg-dashboard.service
             ├─4309 /bin/bash /root/WGDashboard/src/wgd.sh start
             └─4335 sleep 2

Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/dashboard.py", line 1132, in __init__
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     "remote_endpoint": ifcfg.default_interface()['inet'],
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/__init__.py", line 81, in default_interface
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     return Parser(ifconfig=ifconfig)._default_interface(route_output=route_output)
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 34, in __init__
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     self.parse(self.ifconfig_data)
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 76, in parse
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     raise RuntimeError(
Sep 13 19:33:43 V2-WG wgd.sh[4323]: RuntimeError: Got results that don't belong to a device
Sep 13 19:33:43 V2-WG sudo[4322]: pam_unix(sudo:session): session closed for user root

@DaanSelen
Copy link
Collaborator

Even a fresh install does not let me run the panel anymore, seems I need a VPS rebuild. here is the error after fresh install:

root@V2-WG:~/WGDashboard/src# systemctl status wg-dashboard.service
● wg-dashboard.service
     Loaded: loaded (/etc/systemd/system/wg-dashboard.service; enabled; vendor preset: enabled)
     Active: activating (start) since Fri 2024-09-13 19:33:43 UTC; 14s ago
Cntrl PID: 4309 (wgd.sh)
      Tasks: 2 (limit: 4541)
     Memory: 1.6M
     CGroup: /system.slice/wg-dashboard.service
             ├─4309 /bin/bash /root/WGDashboard/src/wgd.sh start
             └─4335 sleep 2

Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/dashboard.py", line 1132, in __init__
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     "remote_endpoint": ifcfg.default_interface()['inet'],
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/__init__.py", line 81, in default_interface
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     return Parser(ifconfig=ifconfig)._default_interface(route_output=route_output)
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 34, in __init__
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     self.parse(self.ifconfig_data)
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 76, in parse
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     raise RuntimeError(
Sep 13 19:33:43 V2-WG wgd.sh[4323]: RuntimeError: Got results that don't belong to a device
Sep 13 19:33:43 V2-WG sudo[4322]: pam_unix(sudo:session): session closed for user root

Why did you install it in the root home directory?

@sohrabp72
Copy link
Author

Even a fresh install does not let me run the panel anymore, seems I need a VPS rebuild. here is the error after fresh install:

root@V2-WG:~/WGDashboard/src# systemctl status wg-dashboard.service
● wg-dashboard.service
     Loaded: loaded (/etc/systemd/system/wg-dashboard.service; enabled; vendor preset: enabled)
     Active: activating (start) since Fri 2024-09-13 19:33:43 UTC; 14s ago
Cntrl PID: 4309 (wgd.sh)
      Tasks: 2 (limit: 4541)
     Memory: 1.6M
     CGroup: /system.slice/wg-dashboard.service
             ├─4309 /bin/bash /root/WGDashboard/src/wgd.sh start
             └─4335 sleep 2

Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/dashboard.py", line 1132, in __init__
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     "remote_endpoint": ifcfg.default_interface()['inet'],
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/__init__.py", line 81, in default_interface
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     return Parser(ifconfig=ifconfig)._default_interface(route_output=route_output)
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 34, in __init__
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     self.parse(self.ifconfig_data)
Sep 13 19:33:43 V2-WG wgd.sh[4323]:   File "/root/WGDashboard/src/venv/lib/python3.10/site-packages/ifcfg/parser.py", line 76, in parse
Sep 13 19:33:43 V2-WG wgd.sh[4323]:     raise RuntimeError(
Sep 13 19:33:43 V2-WG wgd.sh[4323]: RuntimeError: Got results that don't belong to a device
Sep 13 19:33:43 V2-WG sudo[4322]: pam_unix(sudo:session): session closed for user root

Why did you install it in the root home directory?

Why should not I?

@DaanSelen
Copy link
Collaborator

For permissions' sake. It'd be more fitting to either install it in /usr/local/ or more prefferably /opt/. And make sure you have the permissions set for the correct user who executes the daemon. And make sure you have the requirements.txt installed.

@DaanSelen
Copy link
Collaborator

Did you manage to fix this?

@donaldzou
Copy link
Owner

I don't think so.. Still can't recreate the issue of Got results that don't belong to a device

@sohrabp72
Copy link
Author

Did you manage to fix this?

Yes, rebuilt the server.
Seems the error comes when you have python prior version 10, the offical repository on ubuntu has not python 10 or higher, for installing wgdashboard we need python 3.10 or higher which should be installed using adding extra repo on ubuntu and after upgrade python and reinstalling the wgdashboard, you will see this error.

@sc4rf4c3-al
Copy link

Hello,

Did anyone found any ways to fix this ?

@DaanSelen
Copy link
Collaborator

Hello,

Did anyone found any ways to fix this ?

We did not yet, as we can not effectively reproduce this. Do you perhaps have a way to recreate this?

@sohrabp72
Copy link
Author

Hello,

Did anyone found any ways to fix this ?

Just rebuild the VPS.

@sohrabp72
Copy link
Author

Hello,
Did anyone found any ways to fix this ?

We did not yet, as we can not effectively reproduce this. Do you perhaps have a way to recreate this?

No way as the dashboard is in production. I'm sure if I stop the dashboard and start it using debug mode, the dashboard will not run and needs a VPS reboot as like last time I did.

@DaanSelen
Copy link
Collaborator

Hello,
Did anyone found any ways to fix this ?

We did not yet, as we can not effectively reproduce this. Do you perhaps have a way to recreate this?

No way as the dashboard is in production. I'm sure if I stop the dashboard and start it using debug mode, the dashboard will not run and needs a VPS reboot as like last time I did.

Can you not clone the VPS? And then experiment or at least make a way so we can test with this?

@sohrabp72
Copy link
Author

Hello,
Did anyone found any ways to fix this ?

We did not yet, as we can not effectively reproduce this. Do you perhaps have a way to recreate this?

No way as the dashboard is in production. I'm sure if I stop the dashboard and start it using debug mode, the dashboard will not run and needs a VPS reboot as like last time I did.

Can you not clone the VPS? And then experiment or at least make a way so we can test with this?

The VPS is on Hetzner datacenter, is it possible to make a copy and transfer it to you on Hetzner? so you can test it, I would not stop the running machine.

@DaanSelen
Copy link
Collaborator

DaanSelen commented Oct 18, 2024 via email

@sohrabp72
Copy link
Author

Hi xtg, I'm sorry I do not have Hetzner. We have a couple options: - Can you try to recreate the issue yourself in a completely new VPS (Or server for that matter)? - Or can you send the exact details of your environment with a copy of the WGDashboard directory? - Perhaps create a file from the machine using some kind of Hypervisor/Manager portal/dashboard? I would like to help you, but I simply cannot recreate it to try and find the fix. Thanks in advance, Daan Selen.

---------------------------------------- From: "xtg" @.> Sent: 10/18/24 11:19 AM To: donaldzou/WGDashboard @.> Cc: dselen @.>, Comment @.> Subject: Re: [donaldzou/WGDashboard] Panel crash (Issue #384) Hello, Did anyone found any ways to fix this ? We did not yet, as we can not effectively reproduce this. Do you perhaps have a way to recreate this? No way as the dashboard is in production. I'm sure if I stop the dashboard and start it using debug mode, the dashboard will not run and needs a VPS reboot as like last time I did. Can you not clone the VPS? And then experiment or at least make a way so we can test with this? The VPS is on Hetzner datacenter, is it possible to make a copy and transfer it to you on Hetzner? so you can test it, I would not stop the running machine. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

Thank you, the panel is now working that's why I don't want the machine to go offline.
The second option makes sense, how to achieve that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants