1

Topic: iRedAdmin Internal Server Error

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

Apache error.log:
SyntaxError: invalid syntax
mod_wsgi (pid=824): Target WSGI script '/opt/www/iredadmin/iredadmin.py' cannot be loaded as Python module.
mod_wsgi (pid=824): Exception occurred processing WSGI script '/opt/www/iredadmin/iredadmin.py'.
Traceback (most recent call last):
   File "/opt/www/iredadmin/iredadmin.py", line 9, in <module>
     from libs import iredbase
   File "/opt/www/iredadmin/libs/iredbase.py", line 202
     except Exception, e:
                     ^
SyntaxError: invalid syntax

====

Hi Guys,

Today i decide that i needed to update iRedMail to the latest version which meant i had to update Debian from version 8 to 9 so after a backup i proceeded to follow a guide to update Debian and it all is working well apart from access to the iredadmin page where i get an internal server error.  I did read that i had to install a new python version which i have done and i have updated WSGI to the python3 version but it hasn't fixed my issue. Could i be missing any python3 dependencies?

I am using mod_wsgi 4.5.11 with Python/3.5.

Any help getting iredadmin working again would be amazing.

Thanks.

----

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

2

Re: iRedAdmin Internal Server Error

iRedAdmin(-Pro) doesn’t work with Python 3 right now, you have to use Python 2.

Btw, we’re porting iRedAdmin(-Pro) to Python 3, it may take few months, please be patient.

3 (edited by slm858uk 2020-07-01 23:53:47)

Re: iRedAdmin Internal Server Error

so iRedAdmin uses python2 and iRedAPD uses python3?

As when i was upgrading i read the below

iRedAPD-4.0 and later releases require Python 3.5+, only listed distribution releases are qualified to upgrade:

CentOS 7 and later
Debian 9 and later
Ubuntu 18.04 and later
FreeBSD with latest ports tree
OpenBSD 6.6 and later
If you're running an old Linux/BSD release which doesn't have Python 3.5+, please stay with iRedAPD-3.6, it's the last release supports Python 2. if you need to upgrade to iRedAPD-3.6, please follow this upgrade tutorial instead: Upgrade iRedAPD from v1.4.0 or later releases to v3.6.

Is there any way i can get both to work at the same time?  Downgrade to pyhton2 and iRedMail to 3.6?  IF so how can i do this?

4

Re: iRedAdmin Internal Server Error

ok just as an update i still cant get ireadmin working even though i found a way for apache2 to use python 2, then uninstalled the mod_wsgi for python3 and install the wsgi debian package for python2.

These are the versions: [mpm_prefork:notice] [pid 25288] AH00163: Apache/2.4.25 (Debian) OpenSSL/1.0.2u mod_wsgi/4.5.11 Python/2.7 configured -- resuming normal operations

So still get the internal server error but the error from the apache2 error log is different:

[wsgi:info] [pid 26484] [remote nn.nn.nnn.nnn:0] mod_wsgi (pid=26484, process='iredadmin', application='<hostname>|/iredadmin'): Loading WSGI script '/opt/www/iredadmin/iredadmin.py'.
[wsgi:error] [pid 26404] [client nn.nn.nnn.nnn:54231] Truncated or oversized response headers received from daemon process 'iredadmin': /opt/www/iredadmin/iredadmin.py
[core:notice] [pid 26398] AH00052: child pid 26484 exit signal Segmentation fault (11)

I tried the version of wsgi from debian 8 which is 4.3.0 as i know this has worked previously but i get the same error - 'Truncated or oversized headers'.

5

Re: iRedAdmin Internal Server Error

slm858uk wrote:

I tried the version of wsgi from debian 8 which is 4.3.0 as i know this has worked previously but i get the same error - 'Truncated or oversized headers'.

If you're running Debian 9, you should use package "libapache2-mod-wsgi".

6

Re: iRedAdmin Internal Server Error

I receive the same error if i use the package "libapache2-mod-wsgi".


ZhangHuangbin wrote:
slm858uk wrote:

I tried the version of wsgi from debian 8 which is 4.3.0 as i know this has worked previously but i get the same error - 'Truncated or oversized headers'.

If you're running Debian 9, you should use package "libapache2-mod-wsgi".

7

Re: iRedAdmin Internal Server Error

Could you try this solution?
https://serverfault.com/questions/84476 … on-process

This issue was reported by other users before, and fixed few times in this forum.

8

Re: iRedAdmin Internal Server Error

Thanks for the link.  I have tried several of their suggestions to get it to work and none have worked as i still get the same error.

I notice that apache2 isnt supported anymore and im happy to change to nginx but i dont know how to configure it.  Is it possible to use one of the bash scripts inside the iredmail installer folder to install and configure nginx on its own after removing apache2?