Mattermost Peer-to-Peer Forum

Service Unit File Needs Updating after Upgrading to Mattermost 5.0.0


#1

After upgrading to Mattermost 5.0.0 on Ubuntu 18.04, my systemd service for mattermost would start, and everything seemed to work correctly, but running systemctl status mattermost would show that the Active status was stuck at Activating. This stalled my upgrade script by causing problems with systemctl command line operations.

To fix this I updated the ExecStart directive in mattermost’s unit file located at /lib/systemd/system/mattermost.service to match version 5.0.0’s name change of the binary file:
Previous directive - ExecStart=/opt/mattermost/bin/platform
New directive - ExecStart=/opt/mattermost/bin/mattermost

Then I ran systemctl daemon-reload and sudo systemctl restart mattermost, and the service now shows as Activated.

There is still a ‘platform’ file that systemd can use, and running it from the command line does generate a message that it is deprecated, but if systemd uses it to start the service after upgrading to version 5.0.0, Mattermost will not notify systemd that the service has finished starting.

This was a minor annoyance, and hopefully future versions can make this edit automatically


Failing to start
#2

I had a similar issue upgrading 4.10 to 5.0.0. In my case running systemctl start mattermost.service (Ubuntu 16.04) would hang indefinitely. I was unable to start the mattermost service until I updated the /lib/systemd/system/mattermost.service file, ran systemctl daemon-reload and then attempted to start the service.


#3

I was lucky. Mine was functioning, and users could still use the service, but the service status would never change. I updated my original post to clarify the unit file’s location and the step of running systemctl daemon-reload since I forgot state those originally.


#4

Thanks @pixel1138 and @jomaxro for the early reports!

We’re updating our upgrade notes to include a recommendation to point your systemd service file at the new mattermost binary.

However, in most cases, using the platform binary should still work and is supported as far as I know.