I am using mattermost on a Digital Ocean Droplet with a Digital Ocean managed postgresql database. I am unable to ping that database.
this is the sql settings for my config.json
"DriverName": "postgres",
"DataSource": "postgres://mmuser:mmuser_password@do-server:5432/mattermost-db?sslmode=require&connect_timeout=10",
To connect sucessfully.
/opt/mattermost/bin/mattermost
{"level":"info","ts":1569666605.0298908,"caller":"utils/i18n.go:83","msg":"Loaded system translations for 'en' from '/opt/mattermost/i18n/en.json'"}
{"level":"info","ts":1569666605.0303125,"caller":"app/server_app_adapters.go:58","msg":"Server is initializing..."}
{"level":"info","ts":1569666605.033371,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL master database"}
{"level":"error","ts":1569666615.0344255,"caller":"sqlstore/supplier.go:236","msg":"Failed to ping DB retrying in 10 seconds err=dial tcp 159.65.176.240:25060: i/o timeout"}
{"level":"info","ts":1569666625.0348544,"caller":"sqlstore/supplier.go:224","msg":"Pinging SQL master database"}
{"level":"error","ts":1569666635.0353012,"caller":"sqlstore/supplier.go:236","msg":"Failed to ping DB retrying in 10 seconds err=dial tcp 159.65.176.240:25060: i/o timeout"}
Hi @Th3Whit3Wolf, would you be open to opening this issue on our troubleshooting forum as there may be other community member who have hit this issue and may be able to assist?
Would you also be open to sharing more details about your environment, such as your OS and Mattermost server version? Did you use this page for installing https://marketplace.digitalocean.com/apps/mattermost?
@Th3Whit3Wolf, can you successfully connect to your PostgreSQL instance from the droplet running your Mattermost server? There might be a networking issue here.
I think it may be related to issue 12327
@Th3Whit3Wolf, can you successfully connect to your PostgreSQL instance from the droplet running your Mattermost server? There might be a networking issue here.
Yes I can and I have multiple other projects hitting the same database
Hi @Th3Whit3Wolf, would you be open to opening this issue on our troubleshooting forum as there may be other community member who have hit this issue and may be able to assist?
Would you also be open to sharing more details about your environment, such as your OS and Mattermost server version? Did you use this page for installing https://marketplace.digitalocean.com/apps/mattermost?
I will ask in the forum as well and yes I am using the mattermost droplet.
OS Ubuntu 18.04
Mattermost Server Version 5.12.0
@Th3Whit3Wolf, to confirm, are you running a containerized environment like in https://github.com/mattermost/mattermost-server/issues/12327, or just running Mattermost directly on the machine in question?
Apologies I guess I didn't read it all. My problems are currently running it on baremetal.
Thanks for clarifying, @Th3Whit3Wolf -- can you invoke psql from the same box running Mattermost and successfully connect to your database instance? The pinging operation here is just an internal detail of the database driver proving that it can't connect to the database. This is very close to the edge of the application -- if there's a connectivity issue, it's usually at the host or networking level.
I found the error. I forgot to set my ip address in trusted sources in digital managed databases. Sorry for bothering you and thank you for your patience.
Most helpful comment
I found the error. I forgot to set my ip address in trusted sources in digital managed databases. Sorry for bothering you and thank you for your patience.