Mattermost, Inc.

MM server d'ont start after reboot system

Summary

MM server d’ont start after reboot system

Steps to reproduce

Ubuntu 18.04 LTS, MM 5.22 server

Expected behavior

After reboot, MM don’t start.
Without errors in journalctl.
Without lines in mattermost.log
Without lines in notifications.log
No errors in systemctl status mattermost.service
mattermost.service is previously enable
after, systemctl start mattermost.service, run’s fine, no errors, serves pages, just to the next reboot

Observed behavior

No errors, simply MM don’t start.
ATER REBOOT

root@eol-uti-server:~# systemctl status mattermost.service
● mattermost.service - Mattermost
Loaded: loaded (/lib/systemd/system/mattermost.service; enabled; vendor preset: enabled)
Active: inactive (dead)

/opt/mattermost/logs/mattermost.log IS EMPTY (NO LINES)
/opt/mattermost/logs/notifications.log IS EMPTY (NO LINES)
mattermost.service DECLARED ENABLE

/lib/systemd/system/mattermost.service
[Unit]
Description=Mattermost
After=network.target
#After=postgresql.service
#Requires=postgresql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
#WantedBy=postgresql.service
WantedBy=multi_user.target

Would you be able to share more details on your TLS configuration you have applied on your instance?

Hello, @aballester

On top of the TLS configuration asked by @amy.blais, I took a look at the mattermost.service configuration and compared it with the default systemd unit file in the official documentation. I noticed a couple of differences here:

[Unit]
Description=Mattermost
After=network.target
After=postgresql.service
Requires=postgresql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=postgresql.service

When compared, I noticed the following lines were commented out. May I know if there is any specific reason behind that?

#After=postgresql.service
#Requires=postgresql.service
...
#WantedBy=postgresql.service
WantedBy=multi_user.target

Just want to make sure that we don’t miss out on the little details. Also, can you run steps 10 (c-g) based on here and share the results of each step that you see on the terminal? For example:

Ahmad-Danials-MacBook-Pro:~ ahmaddanialmohammad$ curl http://localhost:8065
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">

    <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0'>
    <meta name='robots' content='noindex, nofollow'>
    <meta name='referrer' content='no-referrer'>

    <title>Mattermost</title>

    <meta name='mobile-web-app-capable' content='yes'>
    <meta name='application-name' content='Mattermost'>
    <meta name='format-detection' content='telephone=no'>

    <link rel="icon" type="image/png" href="/static/images/favicon/favicon-16x16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="/static/images/favicon/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/static/images/favicon/favicon-96x96.png" sizes="96x96">

    <!-- CSS Should always go first -->
    <link rel='stylesheet' class='code_theme'>
    <style>
        .error-screen {
            font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
            padding-top: 50px;
            max-width: 750px;
            font-size: 14px;
            color: #333333;
            margin: auto;
            display: none;
            line-height: 1.5;
        }

        .error-screen h2 {
            font-size: 30px;
            font-weight: normal;
            line-height: 1.2;
        }

        .error-screen ul {
            padding-left: 15px;
            line-height: 1.7;
            margin-top: 0;
            margin-bottom: 10px;
        }

        .error-screen hr {
            color: #ddd;
            margin-top: 20px;
            margin-bottom: 20px;
            border: 0;
            border-top: 1px solid #eee;
        }

        .error-screen-visible {
            display: block;
        }
    </style>
<meta name="apple-mobile-web-app-title" content="Mattermost" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="default" /><link rel="apple-touch-icon" sizes="76x76" href="/static/icon_76x76.png" /><link rel="apple-touch-icon" sizes="72x72" href="/static/icon_72x72.png" /><link rel="apple-touch-icon" sizes="60x60" href="/static/icon_60x60.png" /><link rel="apple-touch-icon" sizes="57x57" href="/static/icon_57x57.png" /><link rel="apple-touch-icon" sizes="152x152" href="/static/icon_152x152.png" /><link rel="apple-touch-icon" sizes="144x144" href="/static/icon_144x144.png" /><link rel="apple-touch-icon" sizes="120x120" href="/static/icon_120x120.png" /><link rel="manifest" href="/static/manifest.json" /><meta http-equiv="Content-Security-Policy" content="script-src 'self' cdn.segment.com/analytics.js/"><link href="/static/main.689c23742b77be877b4b.css" rel="stylesheet"><script type="text/javascript" src="/static/main.733268fdb4187861f607.js"></script></head>
<body class='font--open_sans enable-animations'>
    <div id='root'>
        <div class='error-screen'>
            <h2>Cannot connect to Mattermost</h2>
            <hr/>
            <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p>
            <br/>
        </div>
        <div
            class='loading-screen'
            style='position: relative'
        >
            <div class='loading__content'>
                <div class='round round-1'></div>
                <div class='round round-2'></div>
                <div class='round round-3'></div>
            </div>
        </div>
    </div>
    <div id='root-portal'></div>
    <noscript>
        To use Mattermost, please enable JavaScript.
    </noscript>
</body>
</html>