Topic: [SOLVED] os iredadmin gives 502 bad gateway - nginx
======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7 MARIADB edition
- Linux/BSD distribution name and version: Raspbian GNU/Linux 8 (jessie)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? : NO (OS iredadmin)
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Running: Roundcube (with a couple of addins; haven't dug into SOGo)
Running certbot-auto with a combine certificate (reasons for this in one of the other posts)
So I have a working email system with several issues (each posted separately). This issue is a 502 Bad Gateway error when trying to access iredadmin via https://<hostname>/iredadmin
I'm not sure when it stopped working as I don't log into it every day.
I'm at a loss...
I have tried running the upgrade script hoping to reset things. Didn't work
The following errors show up in the nginx error.log:
2017/09/20 11:13:42 [error] 1147#0: *656 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (111: Connection refused) while connecting to upstream, client: <client IP xx.xx.xx.xx>, server: _, request: "GET /iredadmin HTTP/1.1", upstream: "uwsgi://unix:/var/run/uwsgi_iredadmin.socket:", host: "<hostname>"
2017/09/20 11:47:59 [error] 1147#0: *656 upstream prematurely closed connection while reading response header from upstream, client: <client IP xx.xx.xx.xx>, server: _, request: "GET /iredadmin HTTP/1.1", upstream: "uwsgi://unix:/var/run/uwsgi_iredadmin.socket:", host: "<hostname>"
UWSGI ini:
root@<hostname>:/etc/uwsgi/apps-available# cat iredadmin.ini
[uwsgi]
plugins = python
vhost = true
#socket = /var/run/uwsgi/app/iredadmin/socket <I added this line trying to figure this out. It's commented because
it had no effect>
socket = /var/run/uwsgi_iredadmin.socket
#pidfile = /var/run/uwsgi_iredadmin.pid
chown-socket = www-data:www-data
chmod-socket = 660
uid = iredadmin
gid = iredadmin
enable-threads = true
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.