[SOLVED] 500 internal error after hard reset

Problem Description
Turning on the services by activating the app fails and returns status code 500.

Steps to Reproduce

  1. Login to FreedomBox.
  2. Go to application page.
  3. Click on the activation switch.
  4. Wait for the answer.

Expected Results
App should start and the WebView should return to the application page with an activated switch.

Actual results
WebView returns “500 Internal Error […]”
The statusprotocol after trying to activate Coturn app:

020-11-25 21:03:00 CET. --
Nov 25 20:59:57 odroidxu4 /usr/bin/plinth[1236]: # users get-user-groups homer77
Nov 25 20:59:57 odroidxu4 sudo[14951]:   plinth : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/users get-user-groups homer77
Nov 25 20:59:57 odroidxu4 sudo[14951]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 25 20:59:58 odroidxu4 sudo[14951]: pam_unix(sudo:session): session closed for user root
Nov 25 21:02:40 odroidxu4 /usr/bin/plinth[1236]: # coturn get-config
Nov 25 21:02:40 odroidxu4 sudo[15342]:   plinth : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/coturn get-config
Nov 25 21:02:40 odroidxu4 sudo[15342]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 25 21:02:40 odroidxu4 sudo[15342]: pam_unix(sudo:session): session closed for user root
Nov 25 21:02:40 odroidxu4 /usr/bin/plinth[1236]: # coturn get-config
Nov 25 21:02:40 odroidxu4 sudo[15345]:   plinth : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/coturn get-config
Nov 25 21:02:40 odroidxu4 sudo[15345]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 25 21:02:40 odroidxu4 sudo[15345]: pam_unix(sudo:session): session closed for user root
Nov 25 21:02:40 odroidxu4 /usr/bin/plinth[1236]: # coturn get-config
Nov 25 21:02:40 odroidxu4 sudo[15349]:   plinth : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/share/plinth/actions/coturn get-config
Nov 25 21:02:40 odroidxu4 sudo[15349]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 25 21:02:41 odroidxu4 sudo[15349]: pam_unix(sudo:session): session closed for user root
Nov 25 21:02:54 odroidxu4 /usr/bin/plinth[1236]: Internal Server Error: /plinth/apps/coturn/
                                                 Traceback (most recent call last):
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 41, in inner
                                                     response = get_response(request)
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 187, in _get_response
                                                     response = self.process_exception_by_middleware(e, request)
                                                   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 185, in _get_response
                                                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
                                                   File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 68, in view
                                                     return self.dispatch(request, *args, **kwargs)
                                                   File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 88, in dispatch
                                                     return handler(request, *args, **kwargs)
                                                   File "/usr/lib/python3/dist-packages/plinth/views.py", line 167, in post
                                                     return self.enable_disable_form_valid(form)
                                                   File "/usr/lib/python3/dist-packages/plinth/views.py", line 239, in enable_disable_form_valid
                                                     self.app.enable()
                                                   File "/usr/lib/python3/dist-packages/plinth/app.py", line 92, in enable
                                                     component.enable()
                                                   File "/usr/lib/python3/dist-packages/plinth/modules/firewall/components.py", line 56, in enable
                                                     firewall.try_with_reload(self._enable)
                                                   File "/usr/lib/python3/dist-packages/plinth/modules/firewall/__init__.py", line 167, in try_with_reload
                                                     operation()
                                                   File "/usr/lib/python3/dist-packages/plinth/modules/firewall/components.py", line 60, in _enable
                                                     internal_enabled_ports = firewall.get_enabled_services(zone='internal')
                                                   File "/usr/lib/python3/dist-packages/plinth/modules/firewall/__init__.py", line 190, in get_enabled_services
                                                     return zone_proxy.getServices('(s)', zone)
                                                   File "/usr/lib/python3/dist-packages/gi/overrides/Gio.py", line 295, in __call__
                                                     None)
                                                 gi.repository.GLib.GError: g-io-error-quark: GDBus.Error:org.fedoraproject.FirewallD1.Exception: INVALID_ZONE: internal (36)

Information

  • Problem occured first after a power loss. The forced restart let the system work properly.

  • I can start and stop services without any problems with systemd.

  • FreedomBox version: 20.18

  • Hardware: odroidxu4

  • How did you install FreedomBox?: on armbianOS with Debian10 base

OK, I guess I’ve solved this myself :smile:

Checked the firewalld (bc of the last line of the protocol) --> inactive!
Started it.
Everything works fine again :slight_smile:

Sometimes nothing is actually broken. You’re just not smart enough :smirk:

Please, mark the thread as [SOLVED] in the title. :innocent:
Thanks in advanced.

2 Likes

Unfortunately it’s broken again :confused:

After updating to 20.20 the machine hung and I had again to hard reset by unplugging and replugging power.
After that I again experienced the 500 error because of a non-running firewalld.

But now I receive this after trying to restart it (systemctl status excerpt):

Dez 26 10:46:04 odroidxu4 firewalld[10964]: WARNING: ipset not usable, disabling ipset usage in firewall.
Dez 26 10:46:04 odroidxu4 firewalld[10964]: ERROR: INVALID_ZONE

I tried to restore firewalld from a former backup but that didn’t change the unusable ipset.

What now? How can I fix or regain the ipset?