1

Topic: System -> Admin Log not accessable. Provides an internal server error

==== Required information ====
- iRedMail version:  iRedMail-0.9.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: Ubuntu 14.04.2 LTS
- Related log if you're reporting an issue: See below.
====

When going to :
iRedAdmin database, admin can view the log under menu System -> Admin Log
it goes to the url : hxxps://domain/iredadmin/system/log
it gives the following error:
internal server error
Any idea how to fix this?

Below are the logs :

[Fri May 15 18:58:12.560361 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132] Traceback (most recent call last):
[Fri May 15 18:58:12.560432 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Fri May 15 18:58:12.560437 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]     return self.handle()
[Fri May 15 18:58:12.560441 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Fri May 15 18:58:12.560445 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]     return self._delegate(fn, self.fvars, args)
[Fri May 15 18:58:12.560448 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 416, in _delegate
[Fri May 15 18:58:12.560452 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]     mod = __import__(mod, None, None, [''])
[Fri May 15 18:58:12.560456 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]   File "/usr/share/apache2/iredadmin/controllers/panel/log.py", line 16, in <module>
[Fri May 15 18:58:12.560459 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]     from libs import __version_mysql__ as version
[Fri May 15 18:58:12.560463 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132] ImportError: cannot import name __version_mysql__
[Fri May 15 18:58:12.560473 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23132]
[Fri May 15 18:58:15.096408 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697] Traceback (most recent call last):
[Fri May 15 18:58:15.096452 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Fri May 15 18:58:15.096462 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]     return self.handle()
[Fri May 15 18:58:15.096470 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Fri May 15 18:58:15.096493 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]     return self._delegate(fn, self.fvars, args)
[Fri May 15 18:58:15.096499 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 416, in _delegate
[Fri May 15 18:58:15.096505 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]     mod = __import__(mod, None, None, [''])
[Fri May 15 18:58:15.096510 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]   File "/usr/share/apache2/iredadmin/controllers/panel/log.py", line 16, in <module>
[Fri May 15 18:58:15.096515 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]     from libs import __version_mysql__ as version
[Fri May 15 18:58:15.096521 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697] ImportError: cannot import name __version_mysql__
[Fri May 15 18:58:15.096534 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:45697]
[Fri May 15 18:58:16.862918 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388] Traceback (most recent call last):
[Fri May 15 18:58:16.862952 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Fri May 15 18:58:16.862956 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]     return self.handle()
[Fri May 15 18:58:16.862959 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Fri May 15 18:58:16.862963 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]     return self._delegate(fn, self.fvars, args)
[Fri May 15 18:58:16.862966 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 416, in _delegate
[Fri May 15 18:58:16.862973 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]     mod = __import__(mod, None, None, [''])
[Fri May 15 18:58:16.862980 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]   File "/usr/share/apache2/iredadmin/controllers/panel/log.py", line 16, in <module>
[Fri May 15 18:58:16.862988 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]     from libs import __version_mysql__ as version
[Fri May 15 18:58:16.862995 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388] ImportError: cannot import name __version_mysql__
[Fri May 15 18:58:16.863012 2015] [:error] [pid 2285] [remote xx.xx.xx.xx:23388]

----

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

2

Re: System -> Admin Log not accessable. Provides an internal server error

Sorry about this trouble, please fix it with below two commands:

# perl -pi -e 's#__version_mysql__#__version_sql__#g' controllers/panel/log.py
# perl -pi -e 's#__version_pgsql__#__version_sql__#g' controllers/panel/log.py

Restarting Apache or uwsgi service (if you're running Nginx) is required.

3

Re: System -> Admin Log not accessable. Provides an internal server error

Thanks for fixing, Zhang.