Service Failed to ping DB err;dial tcp

Summary

After reboot, service doesn’t start (Service Failed to ping DB err;dial tcp) but manual start of the program works (sudo -u mattermost ./platform)

Steps to reproduce

Version 3.9.0, Centos 7 x64, Hyper-V gen 2 virtualized

Expected behavior

The service used to start correctly, no change in configuration

Observed behavior

Can’t start the service manually:

systemctl start mattermost
Failed to start mattermost.service: Unit not found.

Status of the service:

systemctl status mattermost -l

mattermost.service - Mattermost
Loaded: loaded (/etc/systemd/system/mattermost.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-06-26 10:11:24 EDT; 23min ago
Main PID: 785 (code=exited, status=102)

Jun 26 10:11:23 platform[785]: [2017/06/26 10:11:23 EDT] [INFO] Current version is 3.9.0 (3.9.0/Mon May 15 20:26:34 UTC 2017/)
Jun 26 10:11:23 platform[785]: [2017/06/26 10:11:23 EDT] [INFO] Enterprise Enabled: true
Jun 26 10:11:23 platform[785]: [2017/06/26 10:11:23 EDT] [INFO] Current working directory is /opt/mattermost/bin
Jun 26 10:11:23 platform[785]: [2017/06/26 10:11:23 EDT] [INFO] Loaded config file from /opt/mattermost/config/config.json
Jun 26 10:11:23 platform[785]: [2017/06/26 10:11:23 EDT] [INFO] Server is initializing…
Jun 26 10:11:23 platform[785]: [2017/06/26 10:11:23 EDT] [INFO] Pinging SQL master database
Jun 26 10:11:23 platform[785]: [2017/06/26 10:11:23 EDT] [CRIT] Failed to ping DB err:dial tcp XXX.XXX.XX.XX:3306: getsockopt: connection refused
Jun 26 10:11:24 systemd[1]: mattermost.service: main process exited, code=exited, status=102/n/a
Jun 26 10:11:24 systemd[1]: Unit mattermost.service entered failed state.
Jun 26 10:11:24 systemd[1]: mattermost.service failed.

Have you seen this before?
Thank you for any help you can provide, it’s a test-drive environment so now big deal.

Hi @innohn,

Thanks for your feedback!

Does this issue seem similar to yours?

Hi @lindy65
Thank you very much for jumping into this.
I saw this post prior to create a new one and here’s what I have:

“DataSource”: “mmuser:xxxxx@tcp(192.168.1.8:3306)/mattermost?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=30s”,

I will double check if the user can still access the db

Thanks @innohn,

Let us know whether you’re still having issues and we can troubleshoot further…