Topic: [solved] uwsgi not working so iredadmin not working
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4
- Deployed with iRedMail Easy or the downloadable installer? /
- Linux/BSD distribution name and version: Debian 9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I have a problem with uwsgi,
my nginx configuration :
location /iredadmin {
# iRedAdmin: static files under /iredadmin/static
location ~ ^/iredadmin/static/(.*) {
alias /opt/www/iredadmin/static/$1;
}
# iRedAdmin: Python scripts
location ~ ^/iredadmin(.*) {
root /usr/share/nginx/html;
rewrite ^/iredadmin(/.*)$ $1 break;
include uwsgi_params;
# uwsgi_pass unix:/var/run/uwsgi_iredadmin.socket;
# uwsgi_pass unix:///var/run/uwsgi_iredadmin.socket;
uwsgi_pass unix:/var/run/uwsgi/app/uwsgi_iredadmin/socket;
uwsgi_param UWSGI_CHDIR /opt/www/iredadmin;
uwsgi_param UWSGI_SCRIPT iredadmin;
uwsgi_param SCRIPT_NAME /iredadmin;
}
# iRedAdmin: redirect /iredadmin to /iredadmin/
location = /iredadmin {
rewrite ^ /iredadmin/;
}
}
/etc/uwsgi/apps-enabled/uwsgi_iredadmin.ini file :
[uwsgi_iredadmin]
plugins = python,syslog
master = true
vhost = true
enable-threads = true
processes = 5
logger = syslog:uwsgi,local5
uwsgi-socket = /var/run/uwsgi_iredadmin.socket
uid = www-data
gid = www-data
chdir = /opt/www/iredadmin
wsgi-file = iredadmin.py
But /var/run/uwsgi_iredadmin.socket file doesn't exists.
But i have this file : /var/run/uwsgi/app/uwsgi_iredadmin/socket
But when i use it in nginx configuration, i have this error :
upstream prematurely closed connection while reading response header from upstream
$ ps aux | grep uwsgi
iredadm+ 473 0.0 0.2 126392 17488 ? Ss 2020 16:50 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
mlmmj 479 0.0 0.1 113524 14888 ? Ss 2020 16:39 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj 731 0.0 0.1 113524 10012 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj 732 0.0 0.1 113524 10012 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj 733 0.0 0.1 113524 10012 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj 734 0.0 0.1 113524 10012 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
mlmmj 735 0.0 0.1 113524 10012 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
iredadm+ 748 0.0 0.1 126392 12880 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
iredadm+ 749 0.0 0.1 126392 12880 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
iredadm+ 751 0.0 0.1 126392 12880 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
iredadm+ 752 0.0 0.1 126392 12880 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
iredadm+ 754 0.0 0.1 126392 12880 ? S 2020 0:00 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
www-data 28276 0.0 0.0 93180 3920 ? S 13:55 0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/uwsgi_iredadmin.ini --daemonize /var/log/uwsgi/app/uwsgi_iredadmin.log
www-data 28278 0.0 0.0 93180 920 ? S 13:55 0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/uwsgi_iredadmin.ini --daemonize /var/log/uwsgi/app/uwsgi_iredadmin.log
www-data 28279 0.0 0.0 93180 920 ? S 13:55 0:00 /usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/uwsgi_iredadmin.ini --daemonize /var/log/uwsgi/app/uwsgi_iredadmin.log
How can i fix it ?
Thank you.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.