Error 502 after upgrading to CentOS 7.8

I just update centos 7.7 to 7.8 and also indico 2.2.7 to 2.2.8 and i am getting same error. Can you help me?
My error is

2020/05/14 19:07:11 [error] 16809#0: *1 upstream prematurely closed connection while reading response header from upstream, client:, server:, request: "GET / HTTP/2.0", upstream: "uwsgi://unix:/opt/indico/w
eb/uwsgi.sock:", host: ""

Try this (as root):

mkdir -p /etc/systemd/system/uwsgi.service.d
cat > /etc/systemd/system/uwsgi.service.d/old-exec-start.conf <<'EOF'
ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini

and then (still as root):

systemctl daemon-reload
systemctl restart uwsgi.service

Why did this happen? Shortly before the release of CentOS 7.8 (so it was not caused by that update itself - it’s just the time where people are most likely to actually restart uWSGI or even reboot the server), an updated uWSGI package has been released which changed the start command for uWSGI:

-ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini
+ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini --pidfile /run/uwsgi/ --stats /run/uwsgi/stats.sock

When running it was the default user this would not be a problem, but since we are running uWSGI as the indico user, it now fails to create the stats socket file in /run/wsgi. By adding the custom config file in uwsgi.service.d this change is basically reverted, and everything works again.

Thanks for quick reply. It is fixed by your instruction


I just updated our indico server from Centos 7.7 to Centos 7.8 today and encountered similar error.

I found this page by google search “indico Centos 7.8” and resolved this problem by the above method.


Thanks to Takashi, I found this solution right at top of the page!
I ran into the same Error 502 immediately after migrating to 2.0.


That’s strange, because the current setup guide already contains this workaround (at the end of step 4)…