APP can't connect to the Database

Hi,

my mattermost docker app can’t connect to the postgres database. I tried my own postgres image and as well the provided within my yaml file.

In the logfile I get the following error:
{“level”:“error”,“ts”:1587831029.9178288,“caller”:“sqlstore/supplier.go:218”,“msg”:“Failed to open SQL connection to err.”,“error”:“default addr for network ‘db:5432’ unknown”}

here my posgtres string: postgres://username:password@db:5432/mattermostdb?sslmode=disable&connect_timeout=10

for my own posgres dock I entered the IP address from the server and as well the docker assigned ipaddress of the docker image. Both times the same error

Thanks in advance :slight_smile:

What Mattermost server version are you on? What OS and version are you on?

Hi

Version: Team Edition
OS: “Debian GNU/Linux 10 (buster)”

Hello

I have the same Problem.

Version: Team Edition (MM_VERSION=5.22.1)
OS: CentOS 7 GNU/Linux

@ahmaddanial @joewai.tye Would someone on support team be familiar with this issue?

Hello, @fendle

I believe that you are using the Deploy Mattermost on Docker documentation. Based on what we see here:

The docker app is unable to connect to the database server which is hosted on the mentioned port. May I know if you can go through the default steps mentioned in the documentation first to ensure that you are able to install it successfully first?

Since you mentioned that you are using your own PostgreSQL image, I just want to make sure if this is not a configuration issue. Thanks.

Hey, reverify your coding, it will help you

Have the same problem: cloned the project mattermost-docker and modified docker-compose.yml as described: only changed to team and removed the web container since i like to use my own nginx. After docker-compose build i started with “docker-compose up -d”. with docker logs i see the same error …

if i issue a “docker network ls” i see the network “mattermost-docker_default”, but with docker network inspect i can see that it contains only the db container… probably because its constantly rebooting. But why can it connect to db then?