listmonk icon indicating copy to clipboard operation
listmonk copied to clipboard

error connecting to DB

Open marcvandecoevering opened this issue 1 year ago • 9 comments

Hello everyone, i had listmonk running a few days ago - i installed it via terminal and LOVED it. I deleted the whole installation / folders / volumes etc.

Now i want to install Listmonk via Docker Compose for easier restarting etc. Im getting stuck at the database connection after starting up via docker compose.

Does anyone have a clue? I've tried everything - i believe.

Listmonk_DB-LOGS Listmonk_DB-LOGS

DockerCompose-Logs DockerCompose-Logs

DockerCompose-File DockerCompose-File

marcvandecoevering avatar Jul 12 '24 21:07 marcvandecoevering

I just hope i'm missing a simple thing.

marcvandecoevering avatar Jul 12 '24 22:07 marcvandecoevering

Firewall? https://github.com/knadh/listmonk/issues?q=is%3Aissue+connection+refused

https://github.com/knadh/listmonk/issues/21

MaximilianKohler avatar Jul 13 '24 14:07 MaximilianKohler

How could that be? It was running via terminal. Just locally.

marcvandecoevering avatar Jul 13 '24 18:07 marcvandecoevering

Docker interacts with the firewall differently. Did you check the 21 link?

MaximilianKohler avatar Jul 14 '24 14:07 MaximilianKohler

I did; cant figure out what is left for me to do. I even added this in my pg_hba.conf file.

--log

I might not be totally sure what to look for.

marcvandecoevering avatar Jul 15 '24 11:07 marcvandecoevering

@marcvandecoevering have you tried to delete the entire "docker compose" deployment and deploy it again? The first thing that comes to my mind would be have you had another username, password or database configured in the past, before this run?

Check if the username and password for the database match in config.toml match one that you have in the docker-compose.yml .

The command bellow will destroy your database and start over a new one:

docker compose rm demo-app demo-db
docker compose up demo-app demo-db

lmmendes avatar Jul 15 '24 20:07 lmmendes

This is my config.toml which is connected. The password/username matches with my docker compose file in the 'docker compose' which i have installed on Unraid. Config toml

I have zero old databases or volumes left right now. 350421758-b6045f93-1e0f-4a0d-9887-ce1e9769cb2f

The commands find nothing. 350422356-b83e3653-823d-412c-bc0c-eb1d89196df3

marcvandecoevering avatar Jul 19 '24 14:07 marcvandecoevering

The commands find nothing.

I'm unsure what your level of expertise is. Usually that happens when you don't cd to the location of the config.toml before running the commands. But you seem to know what you're doing. If you're a novice I'd suggest looking through the tutorials in the docs.

MaximilianKohler avatar Jul 21 '24 19:07 MaximilianKohler

What does docker ps return? What about docker networks ls / docker networks inspect listmonk/[xyz]

Seems possibly related to:

  1. Firewall
  2. Your nginx/web server config on your host with your docker containers (check container ip)
  3. Docker containers might not be open / wrong ports

H0BB5 avatar Jul 25 '24 01:07 H0BB5