1

Topic: internal server error after upgrading (iRedAdmin-Pro-SQL-4.0)

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: debian v7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): apache
- Manage mail accounts with iRedAdmin-Pro? yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

after working for several hours after the upgrade with the edit-user-issue here (https://forum.iredmail.org/post71349.html#p71349)

the whole iredadmin-pro is gone dark after logging in it presents an internal server error now.

logfile says this:
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1] Traceback (most recent call last):
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     return self.handle()
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     return self._delegate(fn, self.fvars, args)
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     return handle_class(cls)
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     return tocall(*args)
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/share/apache2/iredadmin/controllers/decorators.py", line 44, in proxyfunc
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     return func(self, *args, **kw)
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/share/apache2/iredadmin/controllers/sql/basic.py", line 289, in GET
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     num_smtp_outbound_sessions=num_smtp_outbound_sessions,
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 187, in render_template
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     return jinja_env.get_template(template_name).render(context)
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     return self.environment.handle_exception(exc_info, True)
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/share/apache2/iredadmin/libs/../templates/default/dashboard.html", line 4, in top-level template code
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     {% from "macros/msg_handlers.html" import success_info, error_info with context %}
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/share/apache2/iredadmin/libs/../templates/default/layout.html", line 197, in top-level template code
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     {% block main %}{% endblock %}
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]   File "/usr/share/apache2/iredadmin/libs/../templates/default/dashboard.html", line 175, in block "main"
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]     {% set _mail = s.mail |e %}
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)
[Fri Nov 01 05:10:33 2019] [error] [client 2a02::1]

so my question would be: what just happened?

----

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

2

Re: internal server error after upgrading (iRedAdmin-Pro-SQL-4.0)

well, to overcome this panic moment we had to remove this setting from iredadmin-pro:

AMAVISD_SHOW_NON_LOCAL_DOMAINS = True

stats for top receivers and senders are now well out of real data, but hey, at least we have a (half) working admin-pro again.

now if we only could solve the edit-user-profile-issue (here: https://forum.iredmail.org/post71349.html#p71349)

3

Re: internal server error after upgrading (iRedAdmin-Pro-SQL-4.0)

Sorry about this trouble.

hk@ wrote:

well, to overcome this panic moment we had to remove this setting from iredadmin-pro:
AMAVISD_SHOW_NON_LOCAL_DOMAINS = True

Could you help figure out which email address in SQL table "amavisd.maddr" caused this issue? We need the address for testing and fix the iRedAdmin-Pro.

4

Re: internal server error after upgrading (iRedAdmin-Pro-SQL-4.0)

ZhangHuangbin wrote:

Sorry about this trouble.

hk@ wrote:

well, to overcome this panic moment we had to remove this setting from iredadmin-pro:
AMAVISD_SHOW_NON_LOCAL_DOMAINS = True

Could you help figure out which email address in SQL table "amavisd.maddr" caused this issue? We need the address for testing and fix the iRedAdmin-Pro.

sorry, can't figure this one out as we still see in top sender and receiver only things like "1692    <>".

maybe this unicode-error could be handled in code without raising an exception?

thx.

5

Re: internal server error after upgrading (iRedAdmin-Pro-SQL-4.0)

hk@ wrote:

sorry, can't figure this one out as we still see in top sender and receiver only things like "1692    <>".

Only "<>"?

Please try this:

- Login to iRedAdmin-Pro as global admin
- Check quarantined mails, release all clean messages and delete spams.
- Login to MySQL server as SQL root user, run commands below:

USE amavisd;
TRUNCATE quarantine;
TRUNCATE msgrcpt;
TRUNCATE msgs;
TRUNCATE maddr;