Summary
A new installation on AWS with MySQL RDS, mattermost.service does not start
Steps to reproduce
This is my first time setting up Mattermost. I’ve never installed or ran it before, so I may have made every mistake in the book and some you’ve never heard of.
I’m attempting to install mattermost on a AWS ec2 and use AWS RDS MySQL database.
I’ve followed every step in Install Mattermost Server using the tarball — Mattermost documentation
Failure occurs when attempting to run
sudo systemctl start mattermost
Expected behavior
Mattermost runs.
Observed behavior
bitnami@ip-172-31-46-220:~$ sudo 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.
bitnami@ip-172-31-46-220:~$ systemctl status mattermost.service
● mattermost.service - Mattermost
Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-02-21 22:42:24 UTC; 347ms ago
Process: 20827 ExecStart=/opt/mattermost/bin/mattermost (code=exited, status=1/FAILURE)
Main PID: 20827 (code=exited, status=1/FAILURE)
CPU: 338ms
Feb 21 22:42:24 ip-172-31-46-220 systemd[1]: mattermost.service: Main process exited, code=exited, status=1/FAILURE
Feb 21 22:42:24 ip-172-31-46-220 systemd[1]: mattermost.service: Failed with result ‘exit-code’.
Feb 21 22:42:24 ip-172-31-46-220 systemd[1]: Failed to start Mattermost.
bitnami@ip-172-31-46-220:~$ journalctl -xe
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: export Export data from Mattermost
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: help Help about any command
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: import Import data.
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: jobserver Start the Mattermost job server
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: server Run the Mattermost server
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: version Display version information
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: Flags:
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: -c, --config string Configuration file to use.
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: -h, --help help for mattermost
Feb 21 22:45:12 ip-172-31-46-220 mattermost[20912]: Use “mattermost [command] --help” for more information about a command.
Feb 21 22:45:12 ip-172-31-46-220 systemd[1]: mattermost.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ An ExecStart= process belonging to unit mattermost.service has exited.
░░
░░ The process’ exit code is ‘exited’ and its exit status is 1.
Feb 21 22:45:12 ip-172-31-46-220 systemd[1]: mattermost.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ The unit mattermost.service has entered the ‘failed’ state with result ‘exit-code’.
Feb 21 22:45:12 ip-172-31-46-220 systemd[1]: Failed to start Mattermost.
░░ Subject: A start job for unit mattermost.service has failed
░░ Defined-By: systemd
░░ Support: Debian -- User Support
░░
░░ A start job for unit mattermost.service has finished with a failure.
░░
░░ The job identifier is 213759 and the job result is failed.
I believe the content of my mattermost.service file may be to blame, but I can’t find the culprit
bitnami@ip-172-31-46-220:~$ more /lib/systemd/system/mattermost.service
[Unit]
Description=Mattermost
After=network.target
[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
KillMode=mixed
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152
[Install]
WantedBy=multi-user.target
and here are the edits I made to config.json.
Under Service Settings, I set SiteURL this way
“ServiceSettings”: {
“SiteURL”: “http://172.31.46.220”,
Under SqlSettings I made these edits
“SqlSettings”: {
“DriverName”: “mysql”,
“DataSource”: “mysql://admin:<*******>@chatdatabase1.c5uemsg8swm9.us-east-2.rds.amazonaws.com:3306/chatdatabase1?sslmode=disable\u0026connect_timeout=10”,
These are all the edits I made. Please ask me anything you want.
Thank you for your help.