codecentric / helm-charts

A curated set of Helm charts brought to you by codecentric

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timeout reached before the port went into state "inuse"/cannot resolve host "keycloak-postgresql": lookup keycloak-postgresql on 10.96.0.10:53

ajmalkhalil opened this issue · comments

I am installing keycloak version keycloak:23.0.4-debian-11-r0 using codecentric helm charts

Issue: timeout reached before the port went into state "inuse"
Installation command: helm install keycloak bitnami/keycloak -f values.yaml -n keycloak

values.yaml:
ingress:
enabled: true

auth:
adminUser: admin
adminPassword: 260

postgresql:
auth:
username: postgres
password: postgres

tls:
enabled: false

extraEnv:

  • name: KEYCLOAK_DATABASE_PORT
    value: "5432" # Match this with the port PostgreSQL is exposed on
  • name: POSTGRES_PASSWORD
    valueFrom:
    secretKeyRef:
    name: keycloak-postgresql
    key: postgres-password

kubectl get all -n keycloak
NAME READY STATUS RESTARTS AGE
pod/keycloak-0 0/1 Running 175 (6m41s ago) 21h
pod/keycloak-postgresql-0 1/1 Running 0 22h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/keycloak ClusterIP 10.97.59.156 80/TCP 22h
service/keycloak-headless ClusterIP None 80/TCP 22h
service/keycloak-postgresql ClusterIP 10.103.76.83 5432/TCP 22h
service/keycloak-postgresql-hl ClusterIP None 5432/TCP 22h

NAME READY AGE
statefulset.apps/keycloak 0/1 22h
statefulset.apps/keycloak-postgresql 1/1 22h

Output of keycloak logs:
kubectl logs -f pod/keycloak-0 -n keycloak
keycloak 19:12:48.63 INFO ==>
keycloak 19:12:48.63 INFO ==> Welcome to the Bitnami keycloak container
keycloak 19:12:48.63 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers
keycloak 19:12:48.63 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
keycloak 19:12:48.64 INFO ==>
keycloak 19:12:48.64 INFO ==> ** Starting keycloak setup **
keycloak 19:12:48.65 INFO ==> Validating settings in KEYCLOAK_* env vars...
keycloak 19:12:48.66 INFO ==> Trying to connect to PostgreSQL server keycloak-postgresql...
cannot resolve host "keycloak-postgresql": lookup keycloak-postgresql on 10.96.0.10:53: dial udp 10.96.0.10:53: i/o timeout
cannot resolve host "keycloak-postgresql": lookup keycloak-postgresql on 10.96.0.10:53: dial udp 10.96.0.10:53: i/o timeout
timeout reached before the port went into state "inuse"
timeout reached before the port went into state "inuse"
timeout reached before the port went into state "inuse"
timeout reached before the port went into state "inuse"
timeout reached before the port went into state "inuse"
timeout reached before the port went into state "inuse"
timeout reached before the port went into state "inuse"

I checked on my host machines port 5432 is not in use.
Also port 5432 is mention in the values.yaml. Ideally my keycloak shoud connect to postgres and work.

Can anyone please help me as i am stuck. Thanks!

This issue has been marked as stale because it has been open for 30 days with no activity. It will be automatically closed in 10 days if no further activity occurs.