Hi,
I do not know if others than me had this problem with the uwsgi stats socket. Or if I made a mistake following the documentation.
I installed Indico with Centos 7 and Apache.
In the uWSGI configuration section I see this option :
stats = /opt/indico/web/uwsgi-stats.sock
but in the default uwsgi service file /usr/lib/systemd/system/uwsgi.service
, there is a hard-coded socket and PIDfile entry :
ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini --pidfile /run/uwsgi/uwsgi.pid --stats /run/uwsgi/stats.sock
It seems that this option overwides the socket in the configuration file.
With this configuration, I am forced to create a /run/uwsgi/
directory with owner indico and group apache and then the service starts and I see the socket
# ls -l /run/uwsgi
total 4
srwxr-x---. 1 indico apache 0 jui 6 08:15 stats.sock
-rw-r-----. 1 root root 6 jui 6 08:15 uwsgi.pid
The socket /opt/indico/web/uwsgi-stats.sock
does not seems to be used
# ls -l /opt/indico/web/uwsgi-stats.sock
ls: cannot access /opt/indico/web/uwsgi-stats.sock: No such file or directory
The big problem with this is after a server reboot, the owner:group of /run/uwsgi/
changes to uwsgi:uwsgi and uwsgi can not start until I change the owner:group to indico:apache again.
To solve this problem, I created a new service indico-uwsgi.service
[Unit]
Description=uWSGI Emperor Service
After=syslog.target
[Service]
EnvironmentFile=-/etc/sysconfig/uwsgi
ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini --pidfile /opt/indico/web/uwsgi.pid --stats /opt/indico/web/uwsgi-stats.sock
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGINT
Restart=always
Type=notify
StandardError=syslog
NotifyAccess=all
[Install]
WantedBy=multi-user.target
disable the uwsgi default service and enable/start this one.
In addition to this, I think there is a typo in the SELinux configuration
(filecon "/opt/indico/web/**uwsgi\.sock**" socket (system_u object_r httpd_sys_rw_content_t ((s0)(s0))))
Should not be uwsgi-stats.sock instead ?
Regards
Juan Cabrera