1

Topic: 502 Bad Gateway

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


Iredmail page gives 502 Bad Gateway. php-fpm and uwsgi are running

#  ps aux | grep php-fpm
root      1169  0.0  0.1 404816 14752 ?        Ss   08:44   0:00 php-fpm: master process (/etc/php-fpm.conf)
nginx     1495  0.0  0.0 404816  6348 ?        S    08:44   0:00 php-fpm: pool www
nginx     1496  0.0  0.0 404816  6348 ?        S    08:44   0:00 php-fpm: pool www
nginx     1497  0.0  0.0 404816  6352 ?        S    08:44   0:00 php-fpm: pool www
nginx     1498  0.0  0.0 404816  6352 ?        S    08:44   0:00 php-fpm: pool www
nginx     1499  0.0  0.0 404816  6352 ?        S    08:44   0:00 php-fpm: pool www
root      2224  0.0  0.0 112652   964 pts/0    S+   08:52   0:00 grep --color=auto php-fpm



# ps aux | grep uwsgi
mlmmj     1243  0.0  0.1 231060 14352 ?        Ss   08:44   0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj     1481  0.0  0.1 231060  9644 ?        S    08:44   0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj     1482  0.0  0.1 231060  9644 ?        S    08:44   0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj     1483  0.0  0.1 231060  9640 ?        S    08:44   0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj     1484  0.0  0.1 231060  9640 ?        S    08:44   0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj     1485  0.0  0.1 231060  9644 ?        S    08:44   0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
root      2233  0.0  0.0 112652   960 pts/0    S+   08:53   0:00 grep --color=auto uwsgi

----

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

2

Re: 502 Bad Gateway

Looks like uwsgi doesn't start automatically on boot. How to do that ?

3

Re: 502 Bad Gateway

Restart uwsgi service should fix it:

service uwsgi restart

Note: mlmmjadmin is ran by uwsgi "program" (/usr/sbin/uwsgi) too, but it's not controlled by uwsgi "service" ("service uwsgi restart").