-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Different OS incompatibility or flask crash when too many peers (Original Problem: Unable to see / add peers inside a configuration: TypeError: '<' not supported between instances of 'int' and 'str') #22
Comments
Hi! Could you please provide the |
Thanks for getting back to me! Here is a sample of the file since we have a lot of peers. The only fields I have changed are ID to protect the public keys and the private IP addresses.
|
Your database file seems normal, if you remove it and restart the dashboard, does it work or is still not working? |
Also did you have any content other than wireguard configuration in the |
Removing it and restarting the dashboard did not work. There is a Post Up and Post Down iptables entry in the conf file for the server. I spun up a test system running Ubuntu 18.04.5 and copied the conf over. I was running into the same issue until I removed the Post Up and Post Down sections. I'm guessing that is it? I changed:
to
Deleted the db json file, restarted the dashboard, and toggled the tunnel off then on. |
This is weird, because for myself is using post up and down too, but the dashboard is running no problem. and our configuration looks similar. I will look into this problem and will try to fix it. Thank you for telling me this problem! |
Thank you for your help! |
would you mind telling me does the user that run dashboard have privilege to execute |
I'm using the default admin user from the ini file. I haven't modified any permissions whatsoever. Having said that, I removed a bunch of entries from the conf file ~80 down to 3 and now the dashboard is running as expected. Could it be a memory issue? Seemed like the dashboard would get hosed up when I tried to look at the peers. |
Hmmmmm that might be an issue, I'm gonna test it on my side since i'm just using it with 10 or less peers |
Sounds good, top isn't showing a bunch of utilization but the web page seems to be timing out. |
Quick follow up. The error is not present in the test machine logs. I'm guessing it has to do with the OS or how I setup the other machine. The web interface works perfectly when the tunnel is not active but begins to become unresponsive when the tunnel is active. I'm gonna close the issue out since it has been fixed by changing to the required OS. |
Hi! Thank you for replying back, I'm gonna re-open this bug report since is gonna remind me to fix it lol. I'm gonna test on multiple OS and also simulate more peers running and figure out what is going on ;) |
Bug fixed on the newest release ;) Running 80+ peers now should be fine, please file another bug report if it is still causing bug in the newest version :) |
Describe The Problem
Installed the dashboard service on top of an existing wireguard server with multiple peers. I'm unable to see anything inside of the configuration. The log file shows a traceback: TypeError: '<' not supported between instances of 'int' and 'str'
Expected Error / Traceback
[22/Jun/2021 20:20:37] "GET /get_config/wg0 HTTP/1.1" 500 -
[2021-06-22 20:20:59,820] ERROR in app: Exception on /get_config/wg0 [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "dashboard.py", line 406, in get_conf
"peer_data": get_peers(config_name),
File "dashboard.py", line 186, in get_peers
result = sorted(result, key=lambda d: d['status'])
TypeError: '<' not supported between instances of 'int' and 'str'
To Reproduce
Please provide how you run the dashboard
Home page shows Wg0. When selecting Wg0 returns blank page with navigation on left still visible. Can activate / deactivate the interface.
OS Information:
Sample of your
.conf
file[Account]
username = ABCD
password = ABCD
[Server]
wg_conf_path = /etc/wireguard
app_ip = 0.0.0.0
app_port = 10086
auth_req = true
version = v2.0
The text was updated successfully, but these errors were encountered: