# Error 502 after upgrading to CentOS 7.8

**URL:** <https://talk.getindico.io/t/error-502-after-upgrading-to-centos-7-8/1818>\
**Category:** Administrators\
**Created:** [May 14, 2020, 5:02pm UTC](https://talk.getindico.io/t/error-502-after-upgrading-to-centos-7-8/1818 "2020-05-14T17:02:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ThiefMaster](https://talk.getindico.io/user_avatar/talk.getindico.io/thiefmaster/32/509_2.png) [@ThiefMaster](https://talk.getindico.io/u/ThiefMaster)\
**Post date:** [May 14, 2020, 5:12pm UTC](https://talk.getindico.io/t/error-502-after-upgrading-to-centos-7-8/1818/2 "2020-05-14T17:12:43Z")

</div>

Try this (as root):

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

```

and then (still as root):

```auto
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:

```diff
-ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini
+ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini --pidfile /run/uwsgi/uwsgi.pid --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.

---

_[View the full topic](https://talk.getindico.io/t/error-502-after-upgrading-to-centos-7-8/1818)._
