0

Got a small question here. I suppose I've done something wrong at a moment but i can't find where and it's been +2 hours I'm turning around.

So Basically, I've created a docker-compose with Postgis (Postgres). I wanted to connect on it through Tableplus. However, I can't ...

2 kind of error keep appearing :

  1. When I try to connect basically on 127.0.0.1, it's keep telling me connection refused
could not connect to server: Connection refused
    Is the server running on host "127.0.0.1" and accepting
    TCP/IP connections on port 5432?

example

  1. When I try to use the docker IPAddress - 172.23.0.2 (docker inspect the image's ID to get the IP address of the image)
could not connect to server: Operation timed out
    Is the server running on host "172.23.0.2" and accepting
    TCP/IP connections on port 5432?

Here is my docker-compose.yml

version: '3.5'


services:
  db:
    image: kartoza/postgis:12.1
    environment:
      - POSTGRES_USER=user1
      - POSTGRES_PASSWORD=password1
      - POSTGRES_DB=database_db
    volumes:
      - data_db_volume:/var/lib/postgresql/12
    ports: 
      - "5432:5432"
    
volumes: 
  data_db_volume:

At first, when I tried to connect, it was telling me: role user1 doesn't exist.

So to stop this I ran: brew services stop postgresql on my machine

I think a psql was running locally on the same port because with lsof -n -i:5432 | grep LISTEN i keep having information (it stop since I ran stop Postgresql)

a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
fabien hell
  • 69
  • 1
  • 7

1 Answers1

0

Alright so after few days of research and trying on another computer, it seems it was coming from 2 points: the new docker software with a graphic interface that I didn't use before, once this running correctly and a prune done from this place everything started to work fine so I think something was causing error due to an outdated piece of software.

Thank's everyone

fabien hell
  • 69
  • 1
  • 7