I created the mattermost.service file in /lib/systemd/system directory per the website documentations. However, the getting the following error:
[root@bde3 mattermost]# systemctl start mattermost
Job for mattermost.service failed because the control process exited with error code.
See “systemctl status mattermost.service” and “journalctl -xe” for details.
[root@bde3 mattermost]# systemctl start mattermost
Job for mattermost.service failed because the control process exited with error code.
See “systemctl status mattermost.service” and “journalctl -xe” for details.
[root@bde3 mattermost]# systemctl status mattermost
● mattermost.service - Mattermost
Loaded: loaded (/usr/lib/systemd/system/mattermost.service; enabled; vendor preset: disabled)
Active: activating (start) since Tue 2022-09-27 11:48:41 CDT; 6ms ago
Main PID: 2333 ((ttermost))
Tasks: 0 (limit: 49565)
CGroup: /system.slice/mattermost.service
└─2333 (ttermost)
Sep 27 11:48:41 bde3.bluedragon.local systemd[1]: Starting Mattermost…
OUTPUT OF journalctl -xe
– Subject: Automatic restarting of a unit has been scheduled
– Defined-By: systemd
– Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
– Automatic restarting of the unit mattermost.service has been scheduled, as the result for
– the configured Restart= setting for the unit.
Sep 27 11:49:22 bde3.bluedragon.local systemd[1]: Stopped Mattermost.
– Subject: Unit mattermost.service has finished shutting down
– Defined-By: systemd
– Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
– Unit mattermost.service has finished shutting down.
Sep 27 11:49:22 bde3.bluedragon.local systemd[1]: Starting Mattermost…
– Subject: Unit mattermost.service has begun start-up
– Defined-By: systemd
– Support:
– Unit mattermost.service has begun starting up.
Sep 27 11:49:22 bde3.bluedragon.local systemd[2368]: mattermost.service: Failed to execute command: Permission denied
Sep 27 11:49:22 bde3.bluedragon.local systemd[2368]: mattermost.service: Failed at step EXEC spawning /opt/mattermost/bin/mattermost: Pe>
– Subject: Process /opt/mattermost/bin/mattermost could not be executed
– Defined-By: systemd
– Support:
– The process /opt/mattermost/bin/mattermost could not be executed and failed.
– The error number returned by this process is 13.
Sep 27 11:49:22 bde3.bluedragon.local systemd[1]: mattermost.service: Main process exited, code=exited, status=203/EXEC
Sep 27 11:49:22 bde3.bluedragon.local systemd[1]: mattermost.service: Failed with result ‘exit-code’.
– Subject: Unit failed
– Defined-By: systemd
– Support:
– The unit mattermost.service has entered the ‘failed’ state with result ‘exit-code’.
Sep 27 11:49:22 bde3.bluedragon.local systemd[1]: Failed to start Mattermost.
– Subject: Unit mattermost.service has failed
– Defined-By: systemd
– Support:
– Unit mattermost.service has failed.
I’m not sure why there’s a permission error. User and group mattermost exist and the file has correct permissions to execute:
[root@bde3 mattermost]# ls -lah bin/mattermost
-rwxrwxr-x. 1 mattermost mattermost 86M Sep 14 07:33 bin/mattermost