We're Hiring!

Mattermost, Inc.

Fails after upgrade

Summary

After upgrade, can’t start Mattermost

Steps to reproduce

I started with a DigitalOcean Marketplace installation of Mattermost a few weeks. Got a notice today that it is way out of date. Went carefully through the upgrade instructions. After finishing that, tried to restart Mattermost. It fails. Log message says:
Error: listen tcp :443: bind: address already in use

Expected behavior

Mattermost should start successfully.

Observed behavior

Error: listen tcp :443: bind: address already in use

[Solved] The upgrade changed config.json in ways that were incompatible with using Nginx as a proxy. I changed these variables to the values shown and it started working again.

"ListenAddress": ":8065"
"UseLetsEncrypt": false
"Forward80To443": false
1 Like

Hello, @gauss256

If you don’t mind, can you please share the following information here as I want to understand the problem a little bit better?

  • The documentation you used to install and upgrade
  • Original Mattermost Server version and the version that you upgraded to
  • The values of ListenAddress, UseLetsEncrypt, and Forward80to443 that the upgrade changed before you fixed the value

If you followed the upgrade instructions properly and run into this issue, something is not right and I would like to know what it is.

@ahmaddanial Thanks for reaching out. So sorry I missed your message, my forum notifications were not as aggressive as they needed to be. (Fixed now, I think.)

Your questions are very reasonable but the answers are lost in the mists of history now. I’m about to do another upgrade. I’ll keep track of any problems. Good to know that someone cares.

Hi, @gauss256

You are most welcome. I try my best to keep tabs on the topics here, so feel free to share if you run into any roadblocks during your upgrade process. Good luck!

Side note: Backup is essential. So, don’t forget to do that.

Hi @ahmaddanial,

Just did the upgrade to 5.28.0. Here are notes that I took along the way as I worked through the upgrade instructions. It went pretty smoothly.

Suggestion: Remind people how to figure out what version they are currently running, so they know which Important Upgrade Notes are relevant.

  1. In a terminal window on the server that hosts Mattermost, change to your home directory. If any, delete files and directories that might still exist from a previous download.

This is a little confusing. The command is given as cd /tmp which of course is not my home directory. /tmp seems like a reasonable choice, but it is not the home directory.

    1. Back up your application by copying into an archive folder (e.g. mattermost-back-YYYY-MM-DD-HH-mm).
cd {install-path}
sudo cp -ra mattermost/ mattermost-back-$(date +'%F-%H-%M')/

The suggested command will back up into a subdirectory of {install-path}. Is that best practice? Seems a bit surprising, versus a different archive folder.

  1. If you want to use port 80 to serve your server, or if you have TLS set up on your Mattermost server, you must activate the CAP_NET_BIND_SERVICE capability to allow the new Mattermost binary to bind to low ports.

Do I want use port 80? I don’t know. What am I using now? This is an upgrade, and I probably don’t want to change this choice, so help me find whatever setting I was using before.