1

Topic: Cannot access iRedadmin due to "Internal Server Error"

- iRedMail version (check /etc/iredmail-release): 1.8
- Deployed with iRedMail Easy or the downloadable installer? Downloadable, but reinstalled
- Linux/BSD distribution name and version: Ubuntu 22.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I reinstalled iRedmail on my server because some reasons. Everything went fine except for iRedadmin. When attempting accessing via https://DOMAIN/iRedadmin, it would only show an almost blank page of "Internal Server Error".

However, no errors were shown in Nginx log.

These logs of uwsgi were shown when I challenged iRedadmin.

May 27 11:12:16 mail iredadmin[109482]: WSGI app 1 (mountpoint='DOMAJN|/iredadmin') ready in 0 seconds on interprete>
May 27 11:12:16 mail iredadmin[109482]: [127.0.0.1] GET /iredadmin 500 84 "-"

Any idea please?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Cannot access iRedadmin due to "Internal Server Error"

Any relevant error in /var/log/syslog?

3 (edited by maxwell 2022-06-02 23:45:10)

Re: Cannot access iRedadmin due to "Internal Server Error"

ZhangHuangbin wrote:

Any relevant error in /var/log/syslog?

I went to /opt/www/iredadmin and tested iredadmin.py with python3, this is the logging of iredadmin:

127.0.0.1:58260 - - [02/Jun/2022 23:30:05] "HTTP/1.1 GET /" - 500 Internal Server Error

Traceback (most recent call last):

  File "/usr/local/lib/python3.8/dist-packages/web/application.py", line 278, in process

    return p(lambda: process(processors))

  File "/usr/local/lib/python3.8/dist-packages/web/session.py", line 98, in _processor

    self._cleanup()

  File "/usr/local/lib/python3.8/dist-packages/web/session.py", line 199, in _cleanup

    self.store.cleanup(timeout)

  File "/usr/local/lib/python3.8/dist-packages/web/session.py", line 375, in cleanup

    self.db.delete(self.table, where="$last_allowed_time > atime", vars=locals())

  File "/usr/local/lib/python3.8/dist-packages/web/db.py", line 1174, in delete

    db_cursor = self._db_cursor()

  File "/usr/local/lib/python3.8/dist-packages/web/db.py", line 743, in_db_cursor

    return self.ctx.db.cursor()

  File "/usr/local/lib/python3.8/dist-packages/web/db.py", line 683, in _getctx

    self._load_context(self._ctx)

  File "/usr/local/lib/python3.8/dist-packages/web/db.py", line 695, in_load_context

    ctx.db = self._connect(self.keywords)

  File "/usr/local/lib/python3.8/dist-packages/web/db.py", line 723, in _connect

    return self.db_module.connect(**keywords)

  File "/usr/lib/python3/dist-packages/pymysql/__init__.py", line 94, in Connect

    return Connection(*args, **kwargs)

  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 325, in__init__

    self.connect()

  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 599, in connect

    self._request_authentication()

  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 861, in_request_authentication

    auth_packet = self._read_packet()

  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 684, in_read_packet

    packet.check_error()

  File "/usr/lib/python3/dist-packages/pymysql/protocol.py", line 220, in check_error

    err.raise_mysql_exception(self._data)

  File "/usr/lib/python3/dist-packages/pymysql/err.py", line 109, in raise_mysql_exception

    raise errorclass(errno, errval)

pymysql.err.OperationalError: (1045, "Access denied for user 'iredadmin'@'localhost' (using password: YES)")

127.0.0.1:58260 - - [02/Jun/2022 23:30:05] "HTTP/1.1 GET /favicon.ico" - 500 Internal Server Error

It seems like something went wrong on the Database, I uses MariaDB for this instance. What should I do to troubleshoot it?

4

Re: Cannot access iRedadmin due to "Internal Server Error"

Problem solved by deleting the previous install of iRedadmin in /opt/www/.