0

I run my SpringBoot applications in minikube. Services connect to a PostgreSQL database running directly on the host machine. I installed a new router, and now services cannot connect to database, it throws

java.net.SocketTimeoutException: Connect timed out

JDBC url: jdbc:postgresql://host.docker.internal:5432/${databaseName}

pg_hba.conf:

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local   all             all                                     scram-sha-256
# IPv4 local connections:
host    all             all             127.0.0.1/32            scram-sha-256
# IPv6 local connections:
host    all             all             ::1/128                 scram-sha-256
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     scram-sha-256
host    replication     all             127.0.0.1/32            scram-sha-256
host    replication     all             ::1/128                 scram-sha-256
host all all 0.0.0.0/0 md5

postgresql.conf has listen_addresses = '*' added.

DB is definitely running, I can access it from the host's PgAdmin, but connection times out when trying to connect from a different device connecting to the same network (it also worked before)

If I use the host's IP address instead of host.docker.internal, pods can connect to the database.

I have already deleted and recreated minikube.

Where should I look?

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.