I can start the mattermost service with: “service mattermost start” but i can´t get it running on ubuntu autostart. The /lib/systemd/system/mattermost.service is the exact same as in the manual above.
“journalctl -u mattermost.service” says nothing
/var/log/syslog i see no problem there
/opt/mattermost/logs/mattermost.log stays empty after i clear it bevor reboot
After reboot:
root@mattermost-s:~# service mattermost status
● mattermost.service - Mattermost
Loaded: loaded (/lib/systemd/system/mattermost.service; enabled; vendor preset: enabled)
Active: inactive (dead)
I load it “systemctl daemon-reload” and the service is enabled: “systemctl enable mattermost.service”
The DB User has all privileges on the DB, the DB is on the same server.
It looks like it wouldn´t try to start?! I also tried to create a symlink in /etc/systemd/system
Did the manuel and i miss something? Does anyone have any idea what the problem could be?
When you mentioned that it does not run with Ubuntu autostart, do you mean that it does not automatically start when the server gets rebooted based on sudo systemctl enable mattermost.service ? Can you share the output of running the same command as you can see from the example I have below?
ahmaddanial@mattermost:~$ sudo systemctl status mattermost.service
● mattermost.service - Mattermost
Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2020-05-20 00:34:30 UTC; 1min 57s ago
Main PID: 16450 (mattermost)
Tasks: 12
Memory: 62.2M
CPU: 2.365s
CGroup: /system.slice/mattermost.service
└─16450 /opt/mattermost/bin/mattermost
May 20 00:34:30 mattermost mattermost[16450]: 2020-05-20T00:34:30.896Z info app/server.g
May 20 00:34:30 mattermost mattermost[16450]: 2020-05-20T00:34:30.897Z info app/server.g
May 20 00:34:30 mattermost mattermost[16450]: 2020-05-20T00:34:30.897Z info commands/ser
May 20 00:34:30 mattermost systemd[1]: Started Mattermost.
May 20 00:35:30 mattermost mattermost[16450]: 2020-05-20T00:35:30.813Z debug migrations/
May 20 00:35:30 mattermost mattermost[16450]: 2020-05-20T00:35:30.814Z debug migrations/
May 20 00:35:30 mattermost mattermost[16450]: 2020-05-20T00:35:30.819Z debug jobs/schedu
May 20 00:35:38 mattermost mattermost[16450]: 2020-05-20T00:35:38.944Z debug migrations/
May 20 00:35:39 mattermost mattermost[16450]: 2020-05-20T00:35:39.162Z info migrations/w
May 20 00:35:39 mattermost mattermost[16450]: 2020-05-20T00:35:39.163Z debug jobs/jobs.g
ahmaddanial@mattermost:~$ sudo systemctl enable mattermost.service
Created symlink from /etc/systemd/system/mysql.service.wants/mattermost.service to /lib/systemd/system/mattermost.service.
What happens when you try to start the service again using sudo systemctl restart mattermost.service since the status is showing Active: inactive (dead)?
Now that the systemctl status mattermost.service shows that the service is running, did you try run sudo systemctl enable mattermost.service again and reboot the server to confirm that the Mattermost Server is not started automatically after the system is up again?
Did you install your MySQL in the same server or dedicated server instead? If yes, did you check on the section in the installation article in step 10b?
If you have installed MySQL or PostgreSQL on a dedicated server, then you need to
remove After=postgresql.service and Requires=postgresql.service or After=mysql.service and Requires=mysql.service lines in the [Unit] section, and
replace the WantedBy=postgresql.service or WantedBy=mysql.service line in the [Install] section with WantedBy=multi-user.target
or the Mattermost service will not start.
Just want to make sure that we cover all the points there.