So I’m not quite clear how you are supposed to update to patch version 7.81. It shows its available but running sudo apt update && sudo apt upgrade seemingly does not update Mattermost (via Omnibus on Ubuntu 22.04)
Let me know if it’s OK for you to wait for the release to hit 7.8.1 or if you need help with manually updating the server. It’s not really complicated, all you have to do is replace the binary, everything else should stay the same for the patch releases, but if you’re not affected by a bug in 7.8.0 which got fixed in 7.8.1 or something like that I suggest you wait for the official release.
Hi @amy.blais@agriesser,
I have an identical Mattermost installed under the same environment as C137 and I’m wondering if Omnibus has been updated yet?
Even after running sudo apt update && sudo apt upgrade, my Mattermost instance is still stuck at 7.8.0.
Since then, it seems that Mattermost has been updated a few times (Latest 7.10) but I can’t find a way to update it.
Do you have any idea? Or maybe a reference to Mattermost Omnibus changelog? I would love to use the new features such as “Users now have the ability to see the history of edited messages” in 7.9
Hi @ledjay and welcome to the Mattermost forums (and sorry for the late reply, must have overlooked your question)!
The new version is already here, there’s no separate changelog for Omnibus and unfortunately it’s lagging behind for whatever reason with the versions, the whole packaging seems to be done manually if I’d have to guess and it happened a few times already in the past that the Omnibust packages have not been updated on the official release day or shortly after.
Right now, the following versions are available via apt, so just upgrading will give you 7.10.2-0:
Can you please post the output of your apt update and apt upgrade run? I’d like to see if some packages are maybe held back for whatever reason.
Also can you confirm that the repository is set up correctly? There should be a line like this in your /etc/apt/sources.list file:
deb [arch=amd64] https://deb.packages.mattermost.com jammy main
If you upgraded your Ubuntu, the sources.list needs to reflect the change for the new Ubuntu distribution (jammy).
Hit:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease
[114 kB]
Get:3 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu focal-backports InRelea
se [108 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Fetched 336 kB in 1s (255 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Output for sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libfwupdplugin1 libxmlb1 linux-aws-5.15-headers-5.15.0-1038
linux-headers-5.15.0-1038-aws linux-image-5.15.0-1038-aws
linux-modules-5.15.0-1038-aws
Use 'sudo apt autoremove' to remove them.
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
libmagickcore-6.q16-6-extra imagemagick libmagickwand-6.q16-6 python3-rsa
imagemagick-6.q16 libopenexr24 libmagickcore-6.q16-6 ansible
imagemagick-6-common
Learn more about Ubuntu Pro on AWS at https://ubuntu.com/aws/pro
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I can’t seem to find deb [arch=amd64] https://deb.packages.mattermost.com jammy main
in the /etc/apt/sources.list.
Yes, and that’s exactly the problem. For whatever reason, the Mattermost respository is not available anymore on your system and therefore you will not get new versions (only the one that’s installed).
You will need to add the following three lines to the bottom of your /etc/apt/sources.list file:
deb [arch=amd64] https://nginx.org/packages/ubuntu/ jammy nginx
deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main
deb [arch=amd64] https://deb.packages.mattermost.com jammy main
Then run apt update again and verify with apt-cache show mattermost that you’re seeing a newer version now.
I hope that you still have the gpg keys installed for these repositories, if not we will have to fix that too in the next step.
Hi @agriesser
Thx a lot for the help! I managed to upgrade to 7.10.3 after adding those 3 repositories in the sources.list file.
On another note, do you know if there’s a way to permanently increase the maximum file size? I have changed the number in system console, but it still doesn’t work. If I remember correctly, I have to keep changing client_max_body_size in /etc/nginx/conf.d
But this auto-refreshes every time the instance restarts.
Great to hear that.
I’m not aware of a good method of changing this parameter, since it’s hardcoded in the ansible templates.
Also the templates will be updated automatically every time you update the server I guess (they are in /opt/mattermost/mmomni/ansible/playbooks).
It would be good if this value could be made configurable though.
Noted. Yes, it would be great if it’s configurable.
Sorry Alex, one more thing. I have noticed that my bot stopped working after updating to 7.10.3. I have an apps script from Google Sheet which post changes to Mattermost users via direct message.
Exception: Request failed for https://example.com returned code 400. Truncated server response: {“id”:“api.channel.create_direct_channel.invalid_user.app_error”,“message”:“Invalid user ID for direct channel creation.”,“detailed_error”:“”,"requ… (use muteHttpExceptions option to examine full response)
at checkOrCreateDirectChannel(script:102:30)
at sendToMattermost(script:13:21)
I have checked the user ID and even created a new bot token and ID, but it still isn’t working. Any chance there has been a change with mattermost API? The one that I’m using is https://example.com/api/v4/posts
Alternatively I was told that there’s an option to specify a custom nginx template, which will help you in this situation. You can copy the existing template (/opt/mattermost/mmomni/ansible/playbooks/mattermost.conf) to some other location on your harddrive and change the values in there (leave everything else intact). Then add the following line to your /etc/mattermost/mmoni.yml:
nginx_template: "/path/to/your/mattermost.conf"
The next rebuild should then use your custom config and not overwrite the client_max_body_size again. You just need to regularly check the original template with yours to make sure you’re not missing out on upstream changes.
With regards to the API: I can’t tell without seeing the details.
The current API documentation can be found here: https://api.mattermost.com/#tag/posts
I suggest you look at the code of the bot and write all http requets into a debug log and find out which one is failing or is not working as expected.