1

Topic: Error after upgrading iRedAdmin 1.0 -> 1.2

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (1.3.1):
- Deployed with iRedMail Easy or the downloadable installer? Downloaded installer
- Linux/BSD distribution name and version: Ubuntu 20.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I upgraded from iRedAdmin 1.0 to 1.2 and got a http 500 error. 

root@muninn:~/iRedAdmin-1.2/tools# bash upgrade_iredadmin.sh
* Detected Linux/BSD distribution: UBUNTU
* HTTP server root: /opt/www
* Found iRedAdmin directory: /opt/www/iredadmin, symbol link of iRedAdmin-1.0
* Found iRedAdmin config file: /opt/www/iredadmin/settings.py
* Copying new version to /opt/www/iRedAdmin-1.2
* Copy /opt/www/iredadmin/settings.py.
* Remove existing systemd service files.
* Copy systemd service file: /lib/systemd/system/iredadmin.service.
* Removing old symbol link /opt/www/iredadmin
* Creating symbol link /opt/www/iredadmin to /opt/www/iRedAdmin-1.2
* Enable mlmmj integration.
* Restarting service: mlmmjadmin.
* Check and install required packages.
Install package(s): uwsgi-core uwsgi-plugin-python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
uwsgi-core is already the newest version (2.0.18-11ubuntu1).
uwsgi-core set to manually installed.
uwsgi-plugin-python3 is already the newest version (2.0.18-11ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Collecting web.py>=0.61
  Downloading web.py-0.62.tar.gz (623 kB)
     |████████████████████████████████| 623 kB 16.1 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied, skipping upgrade: cheroot in /usr/local/lib/pytho                                                                                                                                              n3.8/dist-packages (from web.py>=0.61) (8.4.5)
Requirement already satisfied, skipping upgrade: jaraco.functools in /usr/local/                                                                                                                                              lib/python3.8/dist-packages (from cheroot->web.py>=0.61) (3.0.1)
Requirement already satisfied, skipping upgrade: more-itertools>=2.6 in /usr/lib                                                                                                                                              /python3/dist-packages (from cheroot->web.py>=0.61) (4.2.0)
Requirement already satisfied, skipping upgrade: six>=1.11.0 in /usr/lib/python3                                                                                                                                              /dist-packages (from cheroot->web.py>=0.61) (1.14.0)
Building wheels for collected packages: web.py
  Building wheel for web.py (PEP 517) ... done
  Created wheel for web.py: filename=web.py-0.62-py3-none-any.whl size=78567 sha                                                                                                                                              256=2df75ebbbb1d76b8cf5015b206a008ff573e1116ec353afd19523b82298ee5b8
  Stored in directory: /root/.cache/pip/wheels/d7/b5/8c/d4b298304a41865a1814e792                                                                                                                                              18f2a33963f735796bef785829
Successfully built web.py
Installing collected packages: web.py
  Attempting uninstall: web.py
    Found existing installation: web.py 0.51
    Uninstalling web.py-0.51:
      Successfully uninstalled web.py-0.51
Successfully installed web.py-0.62
* Check SQL tables, and add missed ones - if there's any
* Replace py2 by py3 in cron jobs.
* Clean up.
* Delete all existing sessions to force all admins to re-login.
* iRedAdmin has been successfully upgraded.
* Restarting apache2 service.
* Enable service: iredadmin
Created symlink /etc/systemd/system/multi-user.target.wants/iredadmin.service ->                                                                                                                                               /lib/systemd/system/iredadmin.service.
* Upgrading completed.
<<< NOTE >>> If iRedAdmin doesn't work as expected, please post your issue in
<<< NOTE >>> our online support forum: http://www.iredmail.org/forum/

Apache error log is below


[Sat Nov 28 05:03:53.790581 2020] [wsgi:error] [pid 545437]  mod_wsgi (pid=545437): Failed to exec Python script file '/opt/www/iredadmin/iredadmin.py'.
[Sat Nov 28 05:03:53.790624 2020] [wsgi:error] [pid 545437]  mod_wsgi (pid=545437): Exception occurred processing WSGI script '/opt/www/iredadmin/iredadmin.py'.
[Sat Nov 28 05:03:53.790641 2020] [wsgi:error] [pid 545437]  Traceback (most recent call last):
[Sat Nov 28 05:03:53.790658 2020] [wsgi:error] [pid 545437]    File "/opt/www/iredadmin/iredadmin.py", line 8, in <module>
[Sat Nov 28 05:03:53.790681 2020] [wsgi:error] [pid 545437]      from libs import iredbase
[Sat Nov 28 05:03:53.790687 2020] [wsgi:error] [pid 545437]    File "/opt/www/iredadmin/libs/iredbase.py", line 18, in <module>
[Sat Nov 28 05:03:53.790697 2020] [wsgi:error] [pid 545437]      from . import iredutils
[Sat Nov 28 05:03:53.790728 2020] [wsgi:error] [pid 545437]    File "/opt/www/iredadmin/libs/iredutils.py", line 54
[Sat Nov 28 05:03:53.790732 2020] [wsgi:error] [pid 545437]      def is_auth_email(s) -> bool:
[Sat Nov 28 05:03:53.790735 2020] [wsgi:error] [pid 545437]                           ^
[Sat Nov 28 05:03:53.790749 2020] [wsgi:error] [pid 545437]  SyntaxError: invalid syntax

----

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

2

Re: Error after upgrading iRedAdmin 1.0 -> 1.2

I have the exact same error/issue, after upgrading from 0.9 to 1.2. neutral

3

Re: Error after upgrading iRedAdmin 1.0 -> 1.2

Seems like its the apache wsgi module, check https://forum.iredmail.org/topic14227-i … error.html

Solved it for me. I upgraded to libapache2-mod-wsgi-py3  since I am using Python3 now, if you are at v2, remove libapache2-mod-wsgi-py3 and install libapache2-mod-wsgi

4

Re: Error after upgrading iRedAdmin 1.0 -> 1.2

Nedns wrote:

Seems like its the apache wsgi module, check https://forum.iredmail.org/topic14227-i … error.html

Solved it for me. I upgraded to libapache2-mod-wsgi-py3  since I am using Python3 now, if you are at v2, remove libapache2-mod-wsgi-py3 and install libapache2-mod-wsgi

I already have libapache2-mod-wsgi installed:

apt list --installed | grep libapache2-mod-wsgi*

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapache2-mod-wsgi/focal,now 4.6.8-1ubuntu3 amd64 [installed]

5

Re: Error after upgrading iRedAdmin 1.0 -> 1.2

You should install libapache2-mod-wsgi-py3.

iRedAPD, mlmmjadmin, iRedAdmin(-Pro) are now Python 3 only.

6

Re: Error after upgrading iRedAdmin 1.0 -> 1.2

Thanks, that fixed it.