knadh / listmonk

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
https://listmonk.app
GNU Affero General Public License v3.0
14.46k stars 1.32k forks source link

error connecting to DB #1937

Open marcvandecoevering opened 1 month ago

marcvandecoevering commented 1 month ago

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 commented 1 month ago

I just hope i'm missing a simple thing.

MaximilianKohler commented 1 month ago

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

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

marcvandecoevering commented 1 month ago

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

MaximilianKohler commented 1 month ago

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

marcvandecoevering commented 1 month ago

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.

lmmendes commented 1 month ago

@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
marcvandecoevering commented 1 month ago

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

MaximilianKohler commented 1 month ago

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.

H0BB5 commented 1 month ago

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