Topic: 502 Bad Gateway trying to access iRedAdminPro
======== 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): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====
When trying to access the iredadmin page Nginx throws a 502 Bad Gateway.
/var/log/ngingx/error.log shows:
2015/06/26 18:21:50 [crit] 2598#0: *6 connect() to unix:/run/uwsgi/iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 88.9.98.185, server: _, request: "GET /iredadmin HTTP/1.1", upstream: "uwsgi://unix:/run/uwsgi/iredadmin.socket:", host: "email.xxxxxxxx.yy"
and running "service uwsgi status" gives
Redirecting to /bin/systemctl status uwsgi.service
uwsgi.service - uWSGI Emperor Service
Loaded: loaded (/usr/lib/systemd/system/uwsgi.service; enabled)
Active: failed (Result: start-limit) since Fri 2015-06-26 18:24:29 BST; 38s ago
Process: 2804 ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini (code=exited, status=0/SUCCESS)
Process: 2802 ExecStartPre=/bin/chown uwsgi:uwsgi /run/uwsgi (code=exited, status=0/SUCCESS)
Process: 2801 ExecStartPre=/bin/mkdir -p /run/uwsgi (code=exited, status=0/SUCCESS)
Main PID: 2804 (code=exited, status=0/SUCCESS)
Status: "initializing uWSGI"
Jun 26 18:24:29 email.xxxxxxxx.yy systemd[1]: Started uWSGI Emperor Service.
Jun 26 18:24:29 email.xxxxxxxx.yy systemd[1]: uwsgi.service holdoff time over, scheduling restart.
Jun 26 18:24:29 email.xxxxxxxx.yy systemd[1]: Stopping uWSGI Emperor Service...
Jun 26 18:24:29 email.xxxxxxxx.yy systemd[1]: Starting uWSGI Emperor Service...
Jun 26 18:24:29 email.xxxxxxxx.yy systemd[1]: uwsgi.service start request repeated too quickly, refusing to start.
Jun 26 18:24:29 email.xxxxxxxx.yy systemd[1]: Failed to start uWSGI Emperor Service.
Jun 26 18:24:29 email.xxxxxxxx.yy systemd[1]: Unit uwsgi.service entered failed state.
it's a fresh installation by the way (as part of test for upgrading an old version... yes, still)
nginx and php-fpm seem to be running fine, as roundcubemail is working
EDIT:
/etc/uwsgi.ini:
[uwsgi]
# Run in background and log to file
daemonize = /var/log/uwsgi/uwsgi.log
# try to autoload appropriate plugin if "unknown" option has been specified
autoload = true
# enable master process manager
master = true
# spawn 2 uWSGI worker processes
workers = 2
# automatically kill workers on master's death
no-orphans = true
# write master's pid in file
pidfile = /run/uwsgi/uwsgi.pid
# bind to UNIX socket file
socket = /var/run/uwsgi.socket
# set mode of created UNIX socket
chmod-socket = 660
# place timestamps into log
log-date = true
# user identifier of uWSGI processes
#uid = uwsgi
# group identifier of uWSGI processes
#gid = uwsgi
# multi-app deployment
emperor = /etc/uwsgi.d
emperor-tyrant = false
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.