[Solved] Issue updating Mattermost-omnibus on self hosted server

Hi Guys,

Mattermost version: 9.6.1
OS version: Ubuntu 22.04
Isolated network (no internet)

I have deployed a brand new self hosted Mattermost-Omnibus few months ago and now tried to update it to 9.9.0 but it fails with following error messages. Spent quite some time to find a solution but nothing helped. Maybe someone here can give me a hit where to look?

Thank you in advance!

Setting up mattermost (9.9.0-0) ...
dpkg: error processing package mattermost (--configure):
installed mattermost package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of mattermost-omnibus:
mattermost-omnibus depends on mattermost (= 9.9.0-0); however:
  Package mattermost is not configured yet.
 
dpkg: error processing package mattermost-omnibus (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mattermost
mattermost-omnibus
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Are Nginx, Certbot & PostgreSQL already installed?

Yes, they are installed.

postgresql-13/now 13.14-1.pgdg22.04+1 amd64 [installed,local]
nginx/now 1.24.0-1~jammy amd64 [installed,local]
certbot/jammy,now 1.21.0-1build1 all [installed,automatic]

Hello Redragor,
just to be sure, does your /opt/mattermost/ directory exist?

If it does, perhaps you could check if the mattermost service is erroring out when trying to start, with journalctl -u mattermost. Also the output of systemctl mattermost may be useful.

The directory exist. I reverted back all changes and will have another service windows tomorrow and will share requested outputs.

At last I had time to take a deeper look into this.
In the journalctl -u mattermost I found this error:

Error: failed to initialize platform: failed to load config from file: unable to load on store creation: invalid config: Config.IsValid: Invalid value for TLS certificate file - Either use LetsEncrypt or set path to existing certificate file.

Remark: we are using our own SSL certificate.

To solve this issue I had to copy certificate and private key files to /etc/letsencrypt/live/"FQDN"/ folder and rename them to fullchain.pem and privkey.pem. After this change sudo apt upgrade was successful.

Mattermost Omnibus upgrade process executes mmomni reconfigure and it has a task to check if certificate already exists. And now it was able to find it.

1 Like

Woo hoo! Thanks so much for following up with the solution, Redragor! :tada: