Mattermost.service & user missing after upgrade to 10.5.1

I am running an instance of Mattermost on Ubuntu 24.04, originally installed via these instructions: Install Mattermost Server on Ubuntu - Mattermost documentation. I have also used the “Updates” instructions on that same page to upgrade successfully in the past.

Today I attempted an upgrade to 10.5.1 using the same method, and got an error at the end of the upgrade process that seemed to indicate the upgrade had not happened, but systemctl restart mattermost appeared to work. On attempting to reload in the app, I got an nginx 502 bad gateway error, which I’ve spent a couple of hours trying to troubleshoot from a bajillion directions, with zero luck.

I decided to stop Mattermost again and take a look at mattermost.service to see if something could be off there – and systemctl stop mattermost failed. Because mattermost.service is gone. As is the mattermost user. The postgres database and user seem to be intact.

I’m guessing that I need to re-run the installer somehow, but am nervous about whether that might cause additional issues. Any advice on how to proceed?

An update: I just held my breath and attempted to re-run the installer, and got the error again:

dpkg: error processing package mattermost (--configure):
 installed mattermost package post-installation script subprocess returned error exit status 1```

Another followup: the broken upgrade process apparently also reset config.json somehow – so there was no URL for the site and the db password was gone. After fixing those settings the instance is now working again – but of course all of the other configurations that I’d set for the community have been blown away too, including people’s avatars, etc.

Note to self: just because the last several upgrades went seamlessly doesn’t mean you should skip taking a snapshot before running apt upgrade. :woman_facepalming:

All does seem to be working now, thank goodness. Given that I’m running two instances of Mattermost, one on Ubuntu 22.04 (for which the upgrade was seamless, as expected) and one on Ubuntu 24.04 (which was very seamful), I’m wondering whether the .deb upgrade package has something that doesn’t like 24.04? In any case, all is now working, if with a lot more reconfiguring than hoped for.

@kfitz - Thanks for sharing your experience and persistence in solving this issue! It sounds like quite the troubleshooting journey, and your insights on the upgrade process will definitely help others in similar situations. For future upgrades, taking a snapshot beforehand is indeed a great precaution, and you might also find it helpful to review our Upgrade Troubleshooting Guide for additional tips!