Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitlab docker stop after few seconds because he can't reach postgres anymore

So I'm using Ansible and created the gitlab role a month ago. It worked perfectly. I'm now trying to use it again (it uses the most recent release of gitlab if I understood well) but it stops the docker anytime I start it because of :

PG::ConnectionBad: could not connect to server: Connection refused 
Is the server running on host "postgres" (172.18.0.3) and accepting TCP/IP connections on port 5432.

Thing is I added in ufw the rule to allow any proto to this port and it was working a month ago.

Any ideas ?

like image 826
Ayra Avatar asked Dec 19 '18 12:12

Ayra


1 Answers

I found. To anyone having the same issue, i'm gonna set you free x)

The package I install in my dockerfile (postgresql-plpython3-10) upgrade a package named "postgresql" ... and obviously not the same version as I had in my image so it broke everything.

It was working before because the package was by luck the same version as my postgres at this time but not anymore.

Fix : find a way around to disable this upgrade or upgrade your postgres version (minor version are compatible with each other)

like image 112
Ayra Avatar answered Sep 21 '22 03:09

Ayra