1

Topic: Upgrading IredAdminPro from 4.2 to 4.7 - Server 500 error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.12
- Deployed with iRedMail Easy or the downloadable installer? Downloadable
- Linux/BSD distribution name and version: Ubuntu 18.04
- 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.
====
On upgrading from 1.1 Iredmail to Iredmail 1.2 - enabled Fail2ban.
Tried iRedAdminPro - Opend, then Show Banned IP address - Server error.
So upgraded IredAdminPro from 4.2 to 4.7 and now 500 Server error when opening IredAdmin

error.log
mod_wsgi (pid=1581): Target WSGI script '/opt/www/iredadmin/iredadmin.py' cannot be loaded as Python module.
mod_wsgi (pid=1581): Exception occurred processing WSGI script '/opt/www/iredadmin/iredadmin.py'.
Traceback (most recent call last):
   File "/opt/www/iredadmin/iredadmin.py", line 8, in <module>
     from libs import iredbase
   File "/opt/www/iredadmin/libs/iredbase.py", line 18, in <module>
     from . import iredutils
   File "/opt/www/iredadmin/libs/iredutils.py", line 92
     def is_auth_email(s) -> bool:
                          ^
SyntaxError: invalid syntax


Please advise.

----

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

2

Re: Upgrading IredAdminPro from 4.2 to 4.7 - Server 500 error

Sorted, using google as for ususal

to fix, from a previous post...

sudo apt-get install libapache2-mod-wsgi-py3

Thanks

3 (edited by mano 2021-02-14 20:14:43)

Re: Upgrading IredAdminPro from 4.2 to 4.7 - Server 500 error

mano wrote:

Sorted, using google as for ususal

to fix, from a previous post...

sudo apt-get install libapache2-mod-wsgi-py3

Thanks


Now iRedAdminPro loads..

However::Activities/Banned IP Addresses now reports as "internal server error" 

iredmail now on 1.2

Fail2Ban not running..
$ systemctl status fail2ban.service
● fail2ban.service - Fail2Ban Service
   Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-02-14 12:03:42 GMT; 6min ago
     Docs: man:fail2ban(1)
  Process: 908 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255)
  Process: 906 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS)
Main PID: 908 (code=exited, status=255)

Feb 14 12:03:42 thushy.co.uk systemd[1]: Starting Fail2Ban Service...
Feb 14 12:03:42 thushy.co.uk systemd[1]: Started Fail2Ban Service.
Feb 14 12:03:42 thushy.co.uk systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/n/a
Feb 14 12:03:43 thushy.co.uk fail2ban-server[908]:  Failed during configuration: While reading from '/etc/fail2ban/jail.d/dovecot.local' [line  9]: option 'action' in section 'dovecot-iredmail' already exists

Feb 14 12:03:43 thushy.co.uk fail2ban-server[908]:  Async configuration of server failed
Feb 14 12:03:42 thushy.co.uk systemd[1]: fail2ban.service: Failed with result 'exit-code'.

Fail2ban not running... may be the issue
Please advise...

4

Re: Upgrading IredAdminPro from 4.2 to 4.7 - Server 500 error

Fail2ban now running after sorting out the garbage on line 9.

5

Re: Upgrading IredAdminPro from 4.2 to 4.7 - Server 500 error

All sorted, Working... now..