We're Hiring!

Mattermost, Inc.

Can't Start Mattermost

The IP addresses of the Mattermost server were static changed from DHCP and the server was restarted.

There is no response to the command below and it is not possible to access the Mattermost web interface. What could be the problem with this?

sudo systemctl start mattermost

Mattermost version: 5.23 or 5.24 (I’m not sure)

Thank you.

Hello, @Emsanator

Since you mentioned that the IP address was changed and server rebooted, may I know if you have reloaded the daemon and check on the status of the mattermost service?

sudo systemctl daemon-reload
sudo systemctl status mattermost.service

Once confirmed that it was loaded, can you start the service again and share the output?

sudo systemctl status mattermost.service

Also, what is the error that you are seeing on the web interface? That can also help us to identify the potential root cause to it.

Hallo Ahmad,

Thank you for your answer. I got the this result;

[root@chat ~]# sudo systemctl daemon-reload
[root@chat ~]# sudo systemctl status mattermost.service
● mattermost.service - Mattermost
   Loaded: loaded (/etc/systemd/system/mattermost.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2020-07-23 09:43:36 UTC; 39min ago
Main PID: 444 (code=exited, status=102)

Jul 23 09:43:15 chat.example.com mattermost[444]:     
{"level":"info","ts":1595497395.8934977,"caller":"sqlstore/supplier.go:221","msg":"Pinging     
SQL","database":"master"}
Jul 23 09:43:15 chat.example.com mattermost[444]:     
{"level":"error","ts":1595497395.8960922,"caller":"sqlstore/supplier.go:233","msg":"Failed to ping     
DB","error":"...conds":10}
Jul 23 09:43:25 chat.example.com mattermost[444]: 
{"level":"info","ts":1595497405.896245,"caller":"sqlstore/supplier.go:221","msg":"Pinging 
SQL","database":"master"}
Jul 23 09:43:25 chat.example.com mattermost[444]: 
 {"level":"error","ts":1595497405.9146867,"caller":"sqlstore/supplier.go:233","msg":"Failed to ping 
DB","error":"...conds":10}
Jul 23 09:43:35 chat.example.com mattermost[444]: 
{"level":"info","ts":1595497415.9148393,"caller":"sqlstore/supplier.go:221","msg":"Pinging 
SQL","database":"master"}
Jul 23 09:43:35 chat.example.com mattermost[444]: 
{"level":"error","ts":1595497415.917839,"caller":"sqlstore/supplier.go:229","msg":"Failed to ping DB, 
server wil... SSL off"}
Jul 23 09:43:36 chat.example.com systemd[1]: mattermost.service: main process exited, code=exited,     status=102/n/a
Jul 23 09:43:36 chat.example.com systemd[1]: Failed to start Mattermost.
Jul 23 09:43:36 chat.example.com systemd[1]: Unit mattermost.service entered failed state.
Jul 23 09:43:36 chat.example.com systemd[1]: mattermost.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@chat ~]# 

When I send a start request, it waits for a long time and I cancel the wait.

[root@chat ~]# sudo systemctl start mattermost     
[root@chat ~]#

Hello, @Emsanator

So, the error mentioned about the failure to ping the database. Can you please check again if the Mattermost Server can talk to the server hosting the database?

echo | telnet <ip_address> <database_port>

In which the database port can be 5432 for PostgreSQL or 3306 for MySQL (standard ports). Can you share the output here?

Additionally, can you also share the output of your mattermost.service too?

cat /lib/systemd/system/mattermost.service

Connection to PostgreSQL Database has been made.

[root@chat ~]# echo | telnet 192.168.128.210 5432
Trying 192.168.128.210...
Connected to 192.168.128.210.
Escape character is '^]'.
Connection closed by foreign host.
[root@chat ~]#

But, I didn’t get the mattermost.service data.

[root@chat ~]# cat /lib/systemd/system/mattermost.service
cat: /lib/systemd/system/mattermost.service: No such file or directory
[root@chat ~]#

Hello? I think I’m facing a difficult situation to solve.

I solved the problem.

Hello, @Emsanator

It was the weekend and I was pretty much occupied with family. May I know how did you solve the problem on your end? Your solution can potentially help other users who run into the same problem in the future too.