500 Internal Server Error for /admin problem

Hi everyone!

Everything was running fine until last update.

I keep getting error 500 when I’m trying to access /admin.

My syslog is:

Dec 15 19:53:31 box Exception on / [GET]#012Traceback (most recent call last):#012 File "/usr/lib/python3/dist-packages/flask/app.py", line 1817, in wsgi_app#012 response = self.full_dispatch_request()#012 File "/usr/lib/python3/dist-packages/flask/app.py", line 1477, in full_dispatch_request#012 rv = self.handle_user_exception(e)#012 File "/usr/lib/python3/dist-packages/flask/app.py", line 1381, in handle_user_exception#012 reraise(exc_type, exc_value, tb)#012 File "/usr/lib/python3/dist-packages/flask/_compat.py", line 33, in reraise#012 raise value#012 File "/usr/lib/python3/dist-packages/flask/app.py", line 1475, in full_dispatch_request#012 rv = self.dispatch_request()#012 File "/usr/lib/python3/dist-packages/flask/app.py", line 1461, in dispatch_request#012 return self.view_functions[rule.endpoint](**req.view_args)#012 File "/usr/local/bin/mailinabox-daemon", line 100, in index#012 no_users_exist = (len(get_mail_users(env)) == 0)#012 File "/root/mailinabox/management/mailconfig.py", line 94, in get_mail_users#012 c = open_database(env)#012 File "/root/mailinabox/management/mailconfig.py", line 86, in open_database#012 conn = sqlite3.connect(env["STORAGE_ROOT"] + "/mail/users.sqlite")#012KeyError: 'STORAGE_ROOT'

And when I run sudo DEBUG=1 management/daemon.py

--------------------------------------------------------------------------------
INFO in daemon [management/daemon.py:621]:
API key: v3hyl4hIETouZXX2Tnf3px5qXWDFC3MAmyTVexD9XfA=
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "management/daemon.py", line 624, in <module>
    app.run(port=10222)
  File "/usr/lib/python3/dist-packages/flask/app.py", line 772, in run
    run_simple(host, port, self, **options)
  File "/usr/local/lib/python3.4/dist-packages/werkzeug/serving.py", line 674, in run_simple
    s.bind((hostname, port))
OSError: [Errno 98] Address already in use

Does anyone could help me?

Best regards,
Leonardo

Check that apache2 is NOT installed. This also has been asked multiple times with the same error in a few other posts, please use search next time :slight_smile:

Hi murgero! Thank you for your reply! :slight_smile:

I tried all the suggestions in other topics. But, it’s still not working. :confused:

Could you please, help me?

Best regards,
Leonardo

Actualy, now I have 502 Bad Gateway in /admin and 500 in /mail! :frowning:

hey sorry - remove apache2, re-run the install and reboot.