1 (edited by shafeeks 2018-11-29 06:28:30)

Topic: Apache wsgi Truncated or oversized response headers

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Debian Stretch 9.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL -> MariaDB
- Web server (Apache or Nginx): Apache2
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,

We are unable to connect to iredadmin-pro plateform.  We have upgraded Debian packages as usual and we are having the following errors in the /var/log/apache2/error.log:

[Thu Nov 29 01:31:44.366100 2018] [wsgi:error] [pid 6968] [client] Truncated or oversized response headers received from daemon process 'iredadmin': /usr/share/apache2/iredadmin/iredadmin.py
[Thu Nov 29 01:31:45.259981 2018] [core:notice] [pid 6926] AH00052: child pid 8143 exit signal Segmentation fault (11)

I have added the "WSGIApplicationGroup %{GLOBAL}" in /etc/apache2/conf-enabled/iredadmin.conf and restart apache2 services.  Still we cannot reach iredadmin login page and it says 500 internal server error. 

We are using: Apache/2.4.25 (Debian) mod_auth_pgsql/2.0.3 OpenSSL/1.0.2l mod_wsgi/4.5.11 Python/2.7

Your help will be much appreciated to resolve the problem. 
Thank you

Regards
Shafeek

----

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

2

Re: Apache wsgi Truncated or oversized response headers

I tried yesterday, but failed: https://forum.iredmail.org/post66460.html#p66460

it's more like a mod_wsgi bug to me. sad
Is it possible for you to downgrade mod_wsgi and try again?

3

Re: Apache wsgi Truncated or oversized response headers

Hello,

Thanks for your reply Zhang. 
I don't know if it is possible to downgrade as it was package update. 
How to downgrade it do you have any idea? I just remove apt-get remove libapache2-mod-wsgi and install an older one through dpkg -i package

Thanks

Shafeek

4

Re: Apache wsgi Truncated or oversized response headers

shafeeks wrote:

How to downgrade it do you have any idea? I just remove apt-get remove libapache2-mod-wsgi and install an older one through dpkg -i package

Yes this should work.

5

Re: Apache wsgi Truncated or oversized response headers

Hi,

I am actually on version 4.5.11-1 for libapache2-mod-wsgi.  I can't find an older version with Debian Stretch.  I can only find version for Jessie (4.3.0-1).  So I am unable to downgrade. 

Any help will be appreciated as I can't use iRedAdmin-Pro.
Thanks

Shafeek

6 (edited by lamagra 2018-12-04 22:59:39)

Re: Apache wsgi Truncated or oversized response headers

shafeeks wrote:

Hi,

I am actually on version 4.5.11-1 for libapache2-mod-wsgi.  I can't find an older version with Debian Stretch.  I can only find version for Jessie (4.3.0-1).  So I am unable to downgrade. 

Any help will be appreciated as I can't use iRedAdmin-Pro.
Thanks

Shafeek

Try this one --> https://packages.debian.org/search?keyw … ection=all
or this --> https://snapshot.debian.org/

7

Re: Apache wsgi Truncated or oversized response headers

Dear all,

We now have a perfect solution to fix this issue with the latest iRedAdmin release (either iRedAdmin or iRedAdmin-Pro):

- iRedAdmin-0.9.3 (open source edition)
- iRedAdmin-Pro-SQL-3.0
- iRedAdmin-Pro-LDAP-3.2

After you upgraded to either one, iRedAdmin(-Pro) will run as a standalone service named "iredadmin" and listening on port (127.0.0.1:)7791, it doesn't depend / rely on Apache mod_wsgi module although it still works with mod_wsgi. But if mod_wsgi doesn't work for you, here's another solution to fix it.

- Upgrade iRedAdmin(-Pro) first
- On Debian/Ubuntu, backup /etc/apache2/conf-enabled/iredadmin.conf first then replace its content by:

Alias /iredadmin/static/ "/usr/share/apache2/iredadmin/static/"

<Location "/iredadmin">
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [L]
</Location>

ProxyPass "/iredadmin/static/" "!"
ProxyPass "/iredadmin" "uwsgi://127.0.0.1:7791"

Note: some old Debian/Ubuntu system may use /etc/apache2/conf.d/iredadmin.conf instead, better move it to /etc/apache2/conf-available/ then enable it with command 'a2enconf iredadmin', do not use '/etc/apache2/conf.d/' anymore.

- Install and enable required Apache modules, then restart Apache service:

apt-get install libapache2-mod-proxy-uwsgi
a2enmod rewrite proxy proxy_uwsgi
service apache2 restart

I fixed this issue on one client's server with this solution. Let me know whether or not it works for you.

8

Re: Apache wsgi Truncated or oversized response headers

Hi Zhang,

Solution accepted and worked on debian Stretch 9.6 after the bug.
Thanks Zhang.

Shafeek