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

500 Internal Server Error on startup #303

Open
themao opened this issue Jan 1, 2025 · 1 comment
Open

500 Internal Server Error on startup #303

themao opened this issue Jan 1, 2025 · 1 comment

Comments

@themao
Copy link

themao commented Jan 1, 2025

Hi there, thanks for such a nice software!

I am having some problems right there at the start - I've installed it as a dev package (Ubuntu 24.04), configured management console with pw-file (simply put the password into the file with that name) and then set password=mypassword in the config. But I am getting the 500 error and in the logs I see this:

[2025-01-01 01:07:32,705] [176605] [INFO] [default] Initiating TCP socket connection to localhost:5555
[2025-01-01 01:07:32,706] [176605] [INFO] [default] Sending openvpn management command: `version`
[2025-01-01 01:07:35,710] [176605] [ERROR] [default] Timeout receiving data
[2025-01-01 01:07:35,711] [176605] [ERROR] Exception on / [GET]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/flask/app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/flask/app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/flask/app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/openvpn_monitor/app.py", line 172, in handle_root
    vpn_data = VPNDataCollector(loaded_vpns, geoip_db.gi)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/openvpn_monitor/vpns/openvpn/data_collector.py", line 36, in __init__
    self.collect_data(vpn, gi)
  File "/usr/lib/python3/dist-packages/openvpn_monitor/vpns/openvpn/data_collector.py", line 44, in collect_data
    version = semver.parse_version_info(release.split(' ')[1])
                                        ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

What could be the problem here? Do I need to put password into pw-file in some specific format maybe? I didn't find any specifics in the docs about it.

@furlongm
Copy link
Owner

furlongm commented Jan 2, 2025

Can you try restarting the web server? I was able to reproduce your issue momentarily but when I restarted the web server after the config change, then the issue went away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants