1 (edited by diespezialisten 2020-11-04 17:11:49)

Topic: [SOLVED] 500 internal Server Error after Upgrade to 1.3.2 / 4.6

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

After the Upgrading I get the Internal Server error when I want to access the webinterface.

Heres the log from the Apache:

[Tue Nov 03 16:06:35.335289 2020] mod_wsgi (pid=2014): Target WSGI script '/var/www/iredadmin/iredadmin.py' cannot be loaded as Python module.
[Tue Nov 03 16:06:35.335374 2020] mod_wsgi (pid=2014): Exception occurred processing WSGI script '/var/www/iredadmin/iredadmin.py'.
[Tue Nov 03 16:06:35.335485 2020] Traceback (most recent call last):
[Tue Nov 03 16:06:35.335541 2020] File "/var/www/iredadmin/iredadmin.py", line 8, in <module>
[Tue Nov 03 16:06:35.335624 2020] from libs import iredbase
[Tue Nov 03 16:06:35.335661 2020] File "/var/www/iredadmin/libs/iredbase.py", line 18, in <module>
[Tue Nov 03 16:06:35.335720 2020] from . import iredutils
[Tue Nov 03 16:06:35.335818 2020] File "/var/www/iredadmin/libs/iredutils.py", line 92
[Tue Nov 03 16:06:35.335849 2020] def is_auth_email(s) -> bool:
[Tue Nov 03 16:06:35.335896 2020] SyntaxError: invalid syntax


Packets installed which contain wsgi in the name:

rpm -qa |grep wsgi
uwsgi-plugin-python36-2.0.18-8.el7.x86_64
uwsgi-logger-syslog-2.0.18-8.el7.x86_64
uwsgi-plugin-common-2.0.18-8.el7.x86_64
uwsgi-2.0.18-8.el7.x86_64
mod_wsgi-3.4-18.el7.x86_64
uwsgi-plugin-python2-2.0.18-8.el7.x86_64

Any hints?

----

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

2

Re: [SOLVED] 500 internal Server Error after Upgrade to 1.3.2 / 4.6

You're still running Apache wsgi module for Python 2, please remove it and install/switch to wsgi module for Python 3.

3

Re: [SOLVED] 500 internal Server Error after Upgrade to 1.3.2 / 4.6

ZhangHuangbin wrote:

You're still running Apache wsgi module for Python 2, please remove it and install/switch to wsgi module for Python 3.

Ok, thank you.

Here's what I've done to resolve the problem:

yum install -q -y centos-release-scl
yum install -q -y rh-python36-mod_wsgi
ln -s /opt/rh/httpd24/root/usr/lib64/httpd/modules/mod_rh-python36-wsgi.so /lib64/httpd/modules
ln -s /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-rh-python36-wsgi.conf /etc/httpd/conf.modules.d
systemctl restart httpd