1

Topic: Going to 3.2 of LDAP Pro, uwsgi causes iRedAdmin-Pro to no longer work

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
version of iRedMail: 0.9.9
deployed with: often upgraded, manually
Ubuntu 16.04LTS
LDAP
Nginx
iRedAdmin-Pro

Immediately after boot, surf to {mail server}/iredadmin, nginx log file spouts:
tail -n 1 error.log
2018/12/30 16:25:29 [crit] 1496#1496: *5 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 10.166.130.12, server: mail.mobydog.net, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://unix:/var/run/uwsgi_iredadmin.socket:", host: "mailsrv.mobydog.net"

And /var/log/uwsgi/apps/iredadmin.log has:
[uWSGI] getting INI configuration from /usr/share/uwsgi/conf/default.ini
realpath() of /etc/uwsgi/apps-enabled/iredadmin.ini failed: No such file or directory [core/utils.c line 3619]

2

Re: Going to 3.2 of LDAP Pro, uwsgi causes iRedAdmin-Pro to no longer work

- iredadmin is now a standalone service (named "iredadmin"). uwsgi config file for iredadmin should be removed by iredadmin upgrade script during upgrading.
- Do you use /etc/nginx/conf.d/default.conf or /etc/nginx/sites-enabled/00-default-ssl.conf for the catch-all/default web host?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Going to 3.2 of LDAP Pro, uwsgi causes iRedAdmin-Pro to no longer work

I use the default.conf but with a 301 to https.  Both Roundcube and SOGo work fine.

Your mention of the service sent me to check "ps", and there is no "iredadmin" running, though uwsgi is using a pidfile for its six processes: /var/run/iredadmin/iredadmin.pid

4

Re: Going to 3.2 of LDAP Pro, uwsgi causes iRedAdmin-Pro to no longer work

Further, I tried manually enabling and starting iredadmin, :

> sudo systemctl enable iredadmin
> sudo systemctl start iredadmin
> sudo systemctl status iredadmin
● iredadmin.service - iRedAdmin daemon service
   Loaded: loaded (/lib/systemd/system/iredadmin.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-01-01 10:38:45 PST; 38min ago
Main PID: 1105 (uwsgi)
   CGroup: /system.slice/iredadmin.service
           ├─1105 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           ├─1254 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           ├─1255 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           ├─1256 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           ├─1257 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           └─1258 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid

Jan 01 10:38:46 mailsrv uwsgi[1105]: WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x2248940 pid: 1105 (default app)
Jan 01 10:38:46 mailsrv uwsgi[1105]: *** uWSGI is running in multiple interpreter mode ***
Jan 01 10:38:46 mailsrv uwsgi[1105]: spawned uWSGI master process (pid: 1105)
Jan 01 10:38:46 mailsrv uwsgi[1105]: spawned uWSGI worker 1 (pid: 1254, cores: 1)
Jan 01 10:38:46 mailsrv uwsgi[1105]: spawned uWSGI worker 2 (pid: 1255, cores: 1)
Jan 01 10:38:46 mailsrv uwsgi[1105]: spawned uWSGI worker 3 (pid: 1256, cores: 1)
Jan 01 10:38:46 mailsrv uwsgi[1105]: spawned uWSGI worker 4 (pid: 1257, cores: 1)
Jan 01 10:38:46 mailsrv uwsgi[1105]: spawned uWSGI worker 5 (pid: 1258, cores: 1)
Jan 01 11:16:32 mailsrv systemd[1]: Started iRedAdmin daemon service.
Jan 01 11:17:08 mailsrv systemd[1]: Started iRedAdmin daemon service.

Browsing to <server>/iredadmin still throws a 500, error log from nginx:
2019/01/01 11:16:50 [crit] 1245#1245: *429 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 10.166.130.12, server: mail.mobydog.net, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://unix:/var/run/uwsgi_iredadmin.socket:", host: "mailsrv.mobydog.net"
2019/01/01 11:16:52 [crit] 1245#1245: *429 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 10.166.130.12, server: mail.mobydog.net, request: "GET /iredadmin HTTP/2.0", upstream: "uwsgi://unix:/var/run/uwsgi_iredadmin.socket:", host: "mailsrv.mobydog.net"

5

Re: Going to 3.2 of LDAP Pro, uwsgi causes iRedAdmin-Pro to no longer work

Sorry about this trouble.

Please try commands below:

cp -f /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak
perl -pi -e 's#uwsgi_pass unix:.*iredadmin.socket;#uwsgi_pass 127.0.0.1:7791;#g' /etc/nginx/conf.d/default.conf
service nginx restart

It backups /etc/nginx/conf.d/default.conf first, then modify the "uwsgi_pass" line in it, and restart nginx service.

Nginx should use network connection instead of socket to communicate with iredadmin.

Please let me know whether or not it works for you, i will include this in iRedAdmin-Pro upgrade script to fix it.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

6

Re: Going to 3.2 of LDAP Pro, uwsgi causes iRedAdmin-Pro to no longer work

You sir are awesome.  Works beautifully now.