[Solved] Server Upgrade Issue - 10.4

I recently upgrade Mattermost to 10.4 but it refuses to start and stuck at activating.

● mattermost.service - Mattermost
     Loaded: loaded (/lib/systemd/system/mattermost.service; enabled; vendor preset: enabled)
     Active: activating (start) since Sat 2025-01-25 00:03:52 UTC; 26s ago
   Main PID: 605169 (mattermost)
      Tasks: 9 (limit: 28734)
     Memory: 60.5M
     CGroup: /system.slice/mattermost.service
             └─605169 /opt/mattermost/bin/mattermost

The logs show that a license is required even though we have less than 25 users

 {"timestamp":"2025-01-20 21:08:23.859 Z","level":"warn","msg":"Failed to fetch post count","caller":"app/product_notices.go:329","error":"failed to count Posts: pq: canceling statement due to user request"}

{"timestamp":"2025-01-20 21:08:23.874 Z","level":"fatal","msg":"Failed to run app migration","caller":"app/migrations.go:697","migration":"First Admin Setup Complete Migration","error":"could not get posts count from the database: failed to count Posts: pq: canceling statement due to user request"}

{"timestamp":"2025-01-20 21:08:34.373 Z","level":"info","msg":"Successfully connected to cache backend","caller":"platform/service.go:189","backend":"lru","result":"OK"}

{"timestamp":"2025-01-20 21:08:34.373 Z","level":"info","msg":"Server is initializing...","caller":"platform/service.go:192","go_version":"go1.22.6"}

{"timestamp":"2025-01-20 21:08:34.376 Z","level":"info","msg":"Pinging SQL","caller":"sql/sql_utils.go:68","database":"master","dataSource":"postgres://%2A%2A%2A%2A:%2A%2A%2A%2A@localhost:5432/eve?connect_timeout=10&sslmode=disable"}

{"timestamp":"2025-01-20 21:08:34.396 Z","level":"info","msg":"License key has not been uploaded. Loading license key from disk.","caller":"utils/license.go:107","filename":"/opt/mattermost/config/mattermost.mattermost-license"}

{"timestamp":"2025-01-20 21:08:34.396 Z","level":"warn","msg":"Failed to get license from disk","caller":"platform/license.go:93","error":"We could not find the license key on disk at /opt/mattermost/config/mattermost.mattermost-license: stat /opt/mattermost/config/mattermost.mattermost-license: no such file or directory"}

{"timestamp":"2025-01-20 21:08:34.396 Z","level":"warn","msg":"License key from [https://mattermost.com](https://mattermost.com/) required to unlock enterprise features.","caller":"platform/license.go:105","error":"resource \"License\" not found, id: "}

{"timestamp":"2025-01-20 21:08:34.397 Z","level":"info","msg":"Starting websocket hubs","caller":"platform/web_hub.go:114","number_of_hubs":6}

{"timestamp":"2025-01-20 21:08:34.398 Z","level":"info","msg":"Loaded system translations","caller":"i18n/i18n.go:175","for locale":"en","from locale":"/opt/mattermost/i18n/en.json"}

{"timestamp":"2025-01-20 21:08:34.401 Z","level":"info","msg":"Ensuring the telemetry ID..","caller":"telemetry/telemetry.go:185"}

{"timestamp":"2025-01-20 21:08:34.401 Z","level":"info","msg":"telemetry ID is set","caller":"telemetry/telemetry.go:195","id":"1rhdymbhg3ykjyqeptfsy4dzsa"}

{"timestamp":"2025-01-20 21:08:34.408 Z","level":"info","msg":"Current version is 10.4.1 (12691749316/Thu Jan 9 14:23:39 UTC 2025/a64248ea029c3fdc190bf67bf5133da3d811e4e9/d5f3b1bb6bd4f060360ee274d43ef00fcdf4648b)","caller":"app/server.go:409","current_version":"10.4.1","build_number":"12691749316","build_date":"Thu Jan 9 14:23:39 UTC 2025","build_hash":"a64248ea029c3fdc190bf67bf5133da3d811e4e9","build_hash_enterprise":"d5f3b1bb6bd4f060360ee274d43ef00fcdf4648b","service_environment":"production"}

{"timestamp":"2025-01-20 21:08:34.408 Z","level":"info","msg":"Enterprise Build","caller":"app/server.go:419","enterprise_build":true,"is_trial":false}

{"timestamp":"2025-01-20 21:08:34.408 Z","level":"info","msg":"Printing current working","caller":"app/server.go:429","directory":"/opt/mattermost"}

{"timestamp":"2025-01-20 21:08:34.408 Z","level":"info","msg":"Loaded config","caller":"app/server.go:430","source":"file:///opt/mattermost/config/config.json"}

{"timestamp":"2025-01-20 21:08:34.410 Z","level":"info","msg":"License key has not been uploaded. Loading license key from disk.","caller":"utils/license.go:107","filename":"/opt/mattermost/config/mattermost.mattermost-license"}

{"timestamp":"2025-01-20 21:08:34.410 Z","level":"warn","msg":"Failed to get license from disk","caller":"platform/license.go:93","error":"We could not find the license key on disk at /opt/mattermost/config/mattermost.mattermost-license: stat /opt/mattermost/config/mattermost.mattermost-license: no such file or directory"}

{"timestamp":"2025-01-20 21:08:34.410 Z","level":"warn","msg":"License key from [https://mattermost.com](https://mattermost.com/) required to unlock enterprise features.","caller":"platform/license.go:105","error":"resource \"License\" not found, id: "}

{"timestamp":"2025-01-20 21:08:34.410 Z","level":"info","msg":"Starting workers","caller":"jobs/workers.go:48"}

{"timestamp":"2025-01-20 21:08:34.411 Z","level":"info","msg":"Starting schedulers.","caller":"jobs/schedulers.go:54"}

Please help with this upgrade issue

Heya Olu! It seems the issue might be related to a missing license file and database migration errors? Verify your config.json is set for the free tier, ensure the license file isn’t required, and check your database health and permissions. For more, see the Upgrade Mattermost Server guide.

I had the same issue. While I did the upgrade by simply doing an “apt upgrade” I still read through the upgrade guide to see if maybe there was some step missed. I found this:

Item 10: 3. If you want to use port 80 or 443 to serve your server, and/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 ports lower than 1024. For example:

sudo setcap cap_net_bind_service=+ep ./mattermost/bin/mattermost

After doing that mattermost would start.

1 Like

Ah ha! Thanks Scott for following up with the workaround! :raised_hands:t2:

Thanks John
I made some changes to the config for the db and cleared some bloated part of the db and it worked

1 Like

Yay! Glad to hear it’s working now. Thank you for following up, @olu!