Chatwoot Postgres Connection Issue in Docker

TLDR parresoft9 encountered a connection issue with Postgres in Docker. ziekbaboon and givetimetolife provided possible solutions; setting POSTGRES_PASSWORD and deleting/rebuilding Postgres mirror resolved the issue.

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 11:09:34 UTC

Chatwoot cloid

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 11:29:35 UTC

more datails errors:

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 12:08:49 UTC

https://stackoverflow.com/questions/45122459/mounts-denied-the-paths-are-not-shared-from-os-x-and-are-not-known-to-docke

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 12:09:14 UTC

Respuesta 176:

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 13:50:44 UTC

Bundled gems are installed into `/gems` + BUNDLE='bundle check' + bundle check The Gemfile's dependencies are satisfied + exec bundle exec rails db:chatwoot_prepare rails aborted! ActiveRecord::ConnectionNotEstablished: connection to server at "172.21.0.2", port 5432 failed: FATAL: password authentication failed for user "postgres" /app/lib/tasks/db_enhancements.rake:21:in `block (3 levels) in

' /app/lib/tasks/db_enhancements.rake:18:in `each' /app/lib/tasks/db_enhancements.rake:18:in `block (2 levels) in
' Caused by: PG::ConnectionBad: connection to server at "172.21.0.2", port 5432 failed: FATAL: password authentication failed for user "postgres" /app/lib/tasks/db_enhancements.rake:21:in `block (3 levels) in
' /app/lib/tasks/db_enhancements.rake:18:in `each' /app/lib/tasks/db_enhancements.rake:18:in `block (2 levels) in
' Tasks: TOP => db:chatwoot_prepare (See full trace by running task with --trace)

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 13:51:14 UTC

linux

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 13:51:30 UTC

set password postgres in .env and dockerfile file

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:07:55 UTC

Tienes el sevidor de postgre instalado y configurado correctamente?

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:09:09 UTC

Try: POSTGRES_HOST=localhost

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:22:45 UTC

mmmm no he hecho nada respecto a esta variable

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:22:53 UTC

siguiendo la guia no dice que modifiques nada

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:24:24 UTC

+ pg_isready -h localhost -p 5432 -U postgres localhost:5432 - no response + sleep 2 + pg_isready -h localhost -p 5432 -U postgres localhost:5432 - no response + sleep 2 + pg_isready -h localhost -p 5432 -U postgres localhost:5432 - no response + sleep 2 + pg_isready -h localhost -p 5432 -U postgres localhost:5432 - no response + sleep 2 + pg_isready -h localhost -p 5432 -U postgres localhost:5432 - no response + sleep 2 + pg_isready -h localhost -p 5432 -U postgres localhost:5432 - no response + sleep 2 + pg_isready -h localhost -p 5432 -U postgres localhost:5432 - no response + sleep 2 + pg_isready -h localhost -p 5432 -U postgres localhost:5432 - no response + sleep 2

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:24:30 UTC

estas?

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:24:38 UTC

intentamos hacerlo en mi linux con docker si puedes

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:26:19 UTC

el postgres no parece que responde

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:26:20 UTC

HOLA

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:35:40 UTC

Responde o no responde?

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:39:35 UTC

no no responde

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:44:53 UTC

tas?

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:46:16 UTC

Lo haces con docker por algun motivo?

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:46:23 UTC

mmm si

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:46:28 UTC

para tener que instalarme el repo

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:46:28 UTC

Lo digo porque igual te va mejor instalarlo en linux

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:46:36 UTC

si eso ya lo he probado

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:46:42 UTC

y manejas directamente todos los procesos de instalacion, se te hará mas facil

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:46:47 UTC

pero en docker era para compartirlo con compañeros mas rapidamente

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:46:58 UTC

Ah vale

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:47:14 UTC

en el mac he podido arrancar la imagen docker sin probleas pero en linux parece que no funciona

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:47:17 UTC

Pues si postgre no responde es que no está instalado o no esta inicializado

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:47:27 UTC

en ambos caso no se instalará

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:47:30 UTC

no tienes algun compñaero que haya sido capaz de lecantarlo?

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:47:41 UTC

y como se inicializa o instala

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:47:50 UTC

en teoria no hay que hace nada sefun la guia

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:47:56 UTC

con el docker compose debe lecantarlo no?

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:48:25 UTC

Espera, voy a probar con un linux que tengo por ahi

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:48:40 UTC

vale gracias ahora me dices estoy pendiente

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:49:03 UTC

si te funciona me pasas tu docker-compose y el .env que hayas utilizado please

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:55:39 UTC

Prueba REDIS_URL=redis://localhost:6379

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:55:41 UTC

en el .env

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:57:59 UTC

en el yaml del compose tienes rellenado la parte de postgres correctamente?

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 14:58:01 UTC

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 14:59:03 UTC

has probado. y te funciona?

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:02:31 UTC

que tednra que ver REDIS si el que no responde es postgres

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:02:46 UTC

pasame los dos ficheros si te ha funcionado a tu y pruebo que lo dudo

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:02:51 UTC

no funciona

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:03:11 UTC

el proceso de arranque y preparacionde la base de datos docker en linux esta corrupto por lo que parece

Photo of ziekbaboon
ziekbaboon
Tue, 25 Oct 2022 15:03:30 UTC

A mi me ha funcionado perfectamente

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:03:55 UTC

pasame el docker-compose.yaml y el .env que has usado por fa

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:04:10 UTC

imagino que has lanzado el comando de preparacion de la base de datos antes de arrancar no?

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:11:08 UTC

jejeje era tema de permisos tio

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:11:13 UTC

joder que dolor de cabeza

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:20:11 UTC

q va sigue fallando esta mierda

Photo of parresoft9
parresoft9
Tue, 25 Oct 2022 15:20:19 UTC

tengo todo bien me imagino como tu

Photo of givetimetolife
givetimetolife
Wed, 26 Oct 2022 03:35:26 UTC

Encountered this problem, you did not set the postgres password, reference: https://www.chatwood.com/docs/contributing-guide/environment-setup/docker Set POSTGRES_PASSWORD field in .env and docker-compose.yml files. It is recommended to delete the postgres mirror and rebuild it

Photo of givetimetolife
givetimetolife
Wed, 26 Oct 2022 03:43:25 UTC

I successfully ran chatwoot via docker on a new mac yesterday, I think you should delete postgres:12 and rebuild

Photo of parresoft9
parresoft9
Wed, 26 Oct 2022 06:26:27 UTC

thnks