1

Topic: internal server error, iredadminpro mysql

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  0.9.2
- Linux/BSD distribution name and version: Debian
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MYSQL
- Web server (Apache or Nginx):   APACHE2
- Manage mail accounts with iRedAdmin-Pro?  YES
- Related log if you're reporting an issue:
====

Can't login into iredadmin, seems like a python issue


Apache Error log

Tue Aug 25 13:41:55.429135 2015] [mpm_prefork:notice] [pid 2889] AH00163: Apache/2.4.16 (Debian) OpenSSL/1.0.2d mod_wsgi/4.3.0 Python/2.7.10 configured -- resuming normal operations

[Tue Aug 25 13:42:47.107872 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063] Traceback (most recent call last):
[Tue Aug 25 13:42:47.108049 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Tue Aug 25 13:42:47.108103 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     return self.handle()
[Tue Aug 25 13:42:47.108141 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Tue Aug 25 13:42:47.108172 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     return self._delegate(fn, self.fvars, args)
[Tue Aug 25 13:42:47.108202 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
[Tue Aug 25 13:42:47.108241 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     return handle_class(cls)
[Tue Aug 25 13:42:47.108273 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
[Tue Aug 25 13:42:47.108310 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     return tocall(*args)
[Tue Aug 25 13:42:47.108342 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/share/apache2/iredadmin/controllers/decorators.py", line 22, in proxyfunc
[Tue Aug 25 13:42:47.108378 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     return func(self, *args, **kw)
[Tue Aug 25 13:42:47.108410 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/share/apache2/iredadmin/controllers/sql/basic.py", line 236, in GET
[Tue Aug 25 13:42:47.108444 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     removeQuarantinedInDays=settings.AMAVISD_REMOVE_QUARANTINED_IN_DAYS,
[Tue Aug 25 13:42:47.108477 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 196, in render_template
[Tue Aug 25 13:42:47.108511 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     return jinja_env.get_template(template_name).render(context)
[Tue Aug 25 13:42:47.108542 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
[Tue Aug 25 13:42:47.108579 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     return self.environment.handle_exception(exc_info, True)
[Tue Aug 25 13:42:47.108618 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
[Tue Aug 25 13:42:47.108654 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     reraise(exc_type, exc_value, tb)
[Tue Aug 25 13:42:47.108686 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]   File "/usr/share/apache2/iredadmin/libs/../templates/default/macros/general.html", line 1218, in template
[Tue Aug 25 13:42:47.108714 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]     {% macro display_per_account_wblist(values=[], htmlInputName, label) -%}
[Tue Aug 25 13:42:47.108777 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063] TemplateSyntaxError: non-default argument follows default argument
[Tue Aug 25 13:42:47.108848 2015] [wsgi:error] [pid 2892] [remote 10.1.1.88:27063]

----

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, iredadminpro mysql

Ran cleaning Tool already

nm2:/var/log/apache2# python /usr/share/apache2/iRedAdmin-Pro-SQL-2.1.3/tools/cleanup_amavisd_db.py
* [2015-08-25 13:47:53] Backend: mysql
* [2015-08-25 13:47:53] Delete quarantined mails which older than 7 days
* [2015-08-25 13:47:53] Delete incoming/outgoing emails which older than 3 days
* [2015-08-25 13:47:53] [-] Deleting 96 records
* [2015-08-25 13:47:53] Delete unreferenced records from table `msgrcpt`.
* [2015-08-25 13:47:53] Delete unreferenced records from table `quarantine`.
* [2015-08-25 13:47:53] Delete unreferenced records from table `maddr`.
* [2015-08-25 13:47:53] Delete unreferenced records from table `mailaddr`.
* [2015-08-25 13:47:53] Log cleanup status.

3

Re: internal server error, iredadminpro mysql

Fixed here:
http://www.iredmail.org/forum/post41710.html#p41710

4

Re: internal server error, iredadminpro mysql

Please open file '/usr/local/www/iredadmin/templates/default/macros/general.html', find this line:

{% macro display_per_user_wblist(values=[], htmlInputName, label) -%}

Remove '=[]', save and try again.

{% macro display_per_user_wblist(values, htmlInputName, label) -%}

== UPDATE ==
Fixed in iRedAdmin (open source edition), this fix will be available in next iRedMail release.
https://bitbucket.org/zhb/iredadmin-ose … 675484c5e0


it worked