-
Notifications
You must be signed in to change notification settings - Fork 68
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
Error 500 when visiting /machines endpoint #41
Comments
Do you have any machines added to Headscale currently? |
These are a bit weird to troubleshoot... I need to figure out how to get the futures threads to log to console or something. I'm pretty sure it's failing there somewhere -- The only thing I can think of right off the bat is no machines in Headscale. If that's the case, it should be a pretty easy fix. |
Yes there's about 40 machines added to the setup. |
Another possibility: Lines 369 to 390 in 110ee90
I think I know an ok-ish way of doing some troubleshooting. It will require a new build though. |
Ok. At a glance, all tags have at most a ":" (colon) character, while machines are standard (although some phones have a whitespace in their name). |
I was checking the code and noted that the section you pointed above is before the future threads execution, while in my log the "Finished futures" message is being printed correctly and the issue might lie around line 425. |
From experience it's usually caused by a failure in futures. You should see a log for each future that ran. It doesn't populate sorted_machines properly. I'm redoing my builds at the moment. I should have a build ready for you to test in the next few hours. |
Apologies for the delay. Pull :v0.5.4 and set the environment variable |
No problem at all. Here's the log (spoiler: some date/time conversion from UTC gone wrong, maybe our headscale config is missing a parameter?)
|
What TZ do you have set? |
I'm setting Europe/Madrid via the podman run command.
|
Sweet -- I get the same error. Let me fiddle for a bit and I'll get back to you! |
I think I figured it out. |
So the problem was: Should be working now! |
Yep, it works indeed! |
Hi, I managed to run the webui container in a rootless podman setup / reverse proxy via caddy (I can pass you the details so that they can be added to documentation).
On visiting the machines page, it crashes constantly. Pasting the output here:
[2023-03-15 12:41:53,102] ERROR in app: Exception on /machines [GET] Traceback (most recent call last): File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 2528, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/server.py", line 115, in decorated return view_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/server.py", line 180, in machines_page cards = renderer.render_machines_cards() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/renderer.py", line 425, in render_machines_cards content = content+str(sorted_machines[index]) ~~~~~~~~~~~~~~~^^^^^^^ KeyError: 0
The text was updated successfully, but these errors were encountered: