Topic: 502 Bad Gateway (nginx) / uwsgi will not start
Fresh install of CentOS 7. Fresh install of iRedMail 0.9.2. Firewall rules were not applied correctly by the iRedMail installer, but I fixed that by adding the required services manually like this:
firewall-cmd --permanent --add-service=https
firewall-cmd --permanent --add-service=imaps
firewall-cmd --permanent --add-service=smtp
Roundcube works fine. Cannot access iRedMail web interface. Get 502 Bad Gateway error because uwsgi is not running. Reboot does not help. Try to start manually and it fails, like this:
[root@sf ~]# service uwsgi start
Redirecting to /bin/systemctl start uwsgi.service
[root@sf ~]# service uwsgi status -l
Redirecting to /bin/systemctl status -l uwsgi.service
uwsgi.service - uWSGI Emperor Service
Loaded: loaded (/usr/lib/systemd/system/uwsgi.service; enabled)
Active: failed (Result: start-limit) since Sun 2015-09-27 05:32:33 UTC; 2s ago
Process: 4166 ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini (code=exited, status=0/SUCCESS)
Process: 4163 ExecStartPre=/bin/chown uwsgi:uwsgi /run/uwsgi (code=exited, status=0/SUCCESS)
Process: 4162 ExecStartPre=/bin/mkdir -p /run/uwsgi (code=exited, status=0/SUCCESS)
Main PID: 4166 (code=exited, status=0/SUCCESS)
Status: "initializing uWSGI"
Sep 27 05:32:33 <edited> systemd[1]: Started uWSGI Emperor Service.
Sep 27 05:32:33 <edited> systemd[1]: uwsgi.service holdoff time over, scheduling restart.
Sep 27 05:32:33 <edited> systemd[1]: Stopping uWSGI Emperor Service...
Sep 27 05:32:33 <edited> systemd[1]: Starting uWSGI Emperor Service...
Sep 27 05:32:33 <edited> systemd[1]: uwsgi.service start request repeated too quickly, refusing to start.
Sep 27 05:32:33 <edited> systemd[1]: Failed to start uWSGI Emperor Service.
Sep 27 05:32:33 <edited> systemd[1]: Unit uwsgi.service entered failed state.
==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: N/A
====
Thanks,
artaxerxes99
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.