# Can not patch to 7.8.1

**URL:** <https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249>\
**Category:** Troubleshooting\
**Created:** [March 1, 2023, 10:28pm UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249 "2023-03-01T22:28:31Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![C137](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/c137/32/6476_2.png) [@C137](https://forum.mattermost.com/u/C137)\
**Post date:** [March 1, 2023, 10:28pm UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/1 "2023-03-01T22:28:31Z")

</div>

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)

 ![update](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/8/8db992dfacee8eabbadd106c8f1a3622061e9e07.png)

Is there a different process ot install said patch?

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [March 1, 2023, 11:32pm UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/2 "2023-03-01T23:32:47Z")

</div>

Omnibus hasn’t been updated to 7.8.1 yet but the DevOps team has a ticket open to update it.

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [March 2, 2023, 4:26am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/3 "2023-03-02T04:26:16Z")

</div>

Hi @C137 and welcome to the Mattermost forums!

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.

---

<div class="post-metadata">

**Author:** ![C137](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/c137/32/6476_2.png) [@C137](https://forum.mattermost.com/u/C137)\
**Post date:** [March 2, 2023, 2:57pm UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/4 "2023-03-02T14:57:56Z")

</div>

I can wait, its not a barn burner. Follow question how to you update an install with Omnibus?

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [March 2, 2023, 3:42pm UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/5 "2023-03-02T15:42:15Z")

</div>

It’s as simple as `apt update && apt upgrade` - everything else will be done by the `mattermost` package.

---

<div class="post-metadata">

**Author:** ![ledjay](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@ledjay](https://forum.mattermost.com/u/ledjay)\
**Post date:** [April 21, 2023, 4:02am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/6 "2023-04-21T04:02:45Z")

</div>

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

Thank you.

---

<div class="post-metadata">

**Author:** ![ledjay](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@ledjay](https://forum.mattermost.com/u/ledjay)\
**Post date:** [June 9, 2023, 5:02am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/7 "2023-06-09T05:02:42Z")

</div>

Hi @agriesser  
Any updates on this?

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [June 9, 2023, 5:15am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/8 "2023-06-09T05:15:48Z")

</div>

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

```auto
root@host:~# apt-cache show mattermost | grep ^Version
Version: 7.10.2-0
Version: 7.10.1-0
Version: 7.10.0-0
Version: 7.9.4-0
Version: 7.9.3-0
Version: 7.9.2-0
Version: 7.9.1-0
Version: 7.9.0-0
Version: 7.8.6-0
Version: 7.8.5-0
Version: 7.8.4-0
Version: 7.8.3-0
Version: 7.8.2-0
[...]

```

---

<div class="post-metadata">

**Author:** ![ledjay](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@ledjay](https://forum.mattermost.com/u/ledjay)\
**Post date:** [June 30, 2023, 4:55am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/9 "2023-06-30T04:55:15Z")

</div>

Hi @agriesser,  
Thank you for the reply. I have tried `sudo apt update && sudo apt upgrade` but it I’m still stuck at 7.8.0.

When I check `apt search mattermost-omnibus`, it also says

```auto
mattermost-omnibus/now 7.8.0-0 amd64 [installed,local]
Mattermost Omnibus Package

```

And `apt show mattermost-omnibus` says

```auto
Package: mattermost-omnibus
Version: 7.8.0-0
Status: install ok installed
Priority: optional
Section: base
Maintainer: Mattermost Team <info@mattermost.com>
Installed-Size: unknown
Depends: python3, python3-psycopg2, ansible, postgresql-13 (>= 13.1-1.pgdg20.04+1
), nginx (>= 1.18.0-1~focal), certbot (>= 0.40.0-1), python3-certbot-nginx (>= 0.
40.0-0ubuntu0.1), debconf, mattermost (= 7.8.0-0)
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: Mattermost Omnibus Package
 Metapackage to install Mattermost server and its dependencies

```

Is there something which must be done before I upgrade to get the latest version?

Environment:  
Ubuntu 22.04.6  
PostgreSQL database  
Files storage uses Amazon S3

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [June 30, 2023, 5:17am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/10 "2023-06-30T05:17:10Z")

</div>

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:

```auto
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).

---

<div class="post-metadata">

**Author:** ![ledjay](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@ledjay](https://forum.mattermost.com/u/ledjay)\
**Post date:** [June 30, 2023, 6:18am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/11 "2023-06-30T06:18:43Z")

</div>

Hi @agriesser, thank you for the quick reply

Output for `sudo apt update`:

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

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

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [June 30, 2023, 6:21am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/12 "2023-06-30T06:21:34Z")

</div>

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:

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

---

<div class="post-metadata">

**Author:** ![ledjay](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@ledjay](https://forum.mattermost.com/u/ledjay)\
**Post date:** [June 30, 2023, 7:12am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/13 "2023-06-30T07:12:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [June 30, 2023, 8:00am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/14 "2023-06-30T08:00:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ledjay](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@ledjay](https://forum.mattermost.com/u/ledjay)\
**Post date:** [June 30, 2023, 8:21am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/15 "2023-06-30T08:21:50Z")

</div>

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](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](https://example.com/api/v4/posts)

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [June 30, 2023, 10:24am UTC](https://forum.mattermost.com/t/can-not-patch-to-7-8-1/15249/16 "2023-06-30T10:24:02Z")

</div>

A ticket for this feature request has been created:  
[https://mattermost.atlassian.net/browse/MM-53459](https://mattermost.atlassian.net/browse/MM-53459)

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

```auto
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](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.
