1 (edited by Stubby066 2022-10-24 23:16:45)

Topic: Python issue after upgrade to 22.04

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.1
- Deployed with iRedMail Easy or the downloadable installer? Downloadable
- Linux/BSD distribution name and version: Ubuntu 22.04.1
- 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.
====

Problem: after upgrade to 22.04 from 20.04, mail and sogo stopped working. Connecting to IredAdmin on the web resulted in a 500 error. SOGo returns a 503. 


Investigation of log error:

[Mon Oct 24 10:49:20.516733 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954] mod_wsgi (pid=3292): Failed to exec Python script file '/opt/www/iredadmin/iredadmin.py'.
[Mon Oct 24 10:49:20.516864 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954] mod_wsgi (pid=3292): Exception occurred processing WSGI script '/opt/www/iredadmin/iredadmin.py'.
[Mon Oct 24 10:49:20.516999 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954] Traceback (most recent call last):
[Mon Oct 24 10:49:20.517031 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954]   File "/opt/www/iredadmin/iredadmin.py", line 8, in <module>
[Mon Oct 24 10:49:20.517037 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954]     from libs import iredbase
[Mon Oct 24 10:49:20.517043 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954]   File "/opt/www/iredadmin/libs/iredbase.py", line 18, in <module>
[Mon Oct 24 10:49:20.517048 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954]     from . import iredutils
[Mon Oct 24 10:49:20.517053 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954]   File "/opt/www/iredadmin/libs/iredutils.py", line 16, in <module>
[Mon Oct 24 10:49:20.517058 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954]     import simplejson as json
[Mon Oct 24 10:49:20.517074 2022] [wsgi:error] [pid 3292] [remote 69.248.110.50:37954] ModuleNotFoundError: No module named 'simplejson'

From here: https://stackoverflow.com/questions/260 … simplejson

simplejson was renamed to json

I re-installed iRedAPD (5.1) and IRedAdmin (1.8.1) latest versions, which fixed the missing web module error.

I then edited the iredutils.py and sysinfo.py to change from "import simplejson as json" to "import json as simplejson"

Began receiving email again, and could send email. 

PHP also updated from version 7.4 to 8.1.

Still running down a couple other issues such as SOGo not working/connecting to back end.

Python3 Version 3.10.6 is installed.

----

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

2

Re: Python issue after upgrade to 22.04

There is no jammy (22.04) version in the SOGO nightly.  I switched to the Jammy package of sogo and kept the original configuration file.  I was able to log in and SOGo appears to be working fine now.

3

Re: Python issue after upgrade to 22.04

Leave a message to push SOGo team to build packages for 22.04:
https://bugs.sogo.nu/view.php?id=5511

4

Re: Python issue after upgrade to 22.04

Jammy has its own sogo package, just not a nightly.

https://packages.ubuntu.com/jammy/sogo

5

Re: Python issue after upgrade to 22.04

Stubby066 wrote:

Jammy has its own sogo package, just not a nightly.

https://packages.ubuntu.com/jammy/sogo

OK, i will try to use this package instead. Stay tuned.