Issue Connecting to PostgreSQL in Self-Managed Camunda 8.7 (Helm Chart 12.3.0)

Hi Team,

I’m setting up a self-managed Camunda 8.7 deployment using Helm chart version 12.3.0. Everything seems to be working fine except for the Camunda Identity service, which fails to start due to a PostgreSQL connection error.

Here’s the relevant stack trace:

Caused by: org.postgresql.util.PSQLException: Connection to camunda-platform-identity-postgresql:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:373)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:57)
	at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:277)

What I’ve Checked:

  • PostgreSQL pod is deployed and appears healthy.
  • Service camunda-platform-identity-postgresql exists.
  • Helm values for Identity and PostgreSQL seem correct:

Questions:

  • Is there anything specific to Camunda Identity’s PostgreSQL setup I might be missing?
  • Are there known issues with Helm chart 12.3.0 and Identity DB connectivity?
  • Any tips for debugging this further?

Hi there! :waving_hand:

I can help you troubleshoot this PostgreSQL connection issue with Camunda Identity in your self-managed deployment. This is a common issue that typically relates to configuration or network connectivity problems.

Classification

This is a Problem - your Identity service is failing to start due to a database connection issue.

Troubleshooting Steps

Based on the error message Connection to camunda-platform-identity-postgresql:5432 refused, here are the key areas to investigate:

1. Verify Database Configuration

First, check your values.yaml configuration. Are you using the internal PostgreSQL (Bitnami sub-chart) or an external database?

For internal PostgreSQL:

identityPostgresql:
  enabled: true

For external PostgreSQL:

identityPostgresql:
  enabled: false

identity:
  externalDatabase:
    enabled: true
    host: "your-postgres-host"
    port: 5432
    username: "postgres"
    existingSecret: "camunda-psql-db"
    existingSecretKey: "password"
    database: "identity"

2. Check Pod and Service Status

Verify that both the PostgreSQL pod and service are actually running and accessible:

# Check PostgreSQL pod status
kubectl get pods | grep postgresql

# Check if the service exists and has endpoints
kubectl get svc camunda-platform-identity-postgresql
kubectl get endpoints camunda-platform-identity-postgresql

3. Test Network Connectivity

From within the Identity pod, test connectivity to PostgreSQL:

# Get the Identity pod name
kubectl get pods | grep identity

# Exec into the Identity pod and test connection
kubectl exec -it <identity-pod-name> -- sh
# Inside the pod, try:
nc -zv camunda-platform-identity-postgresql 5432
# or
telnet camunda-platform-identity-postgresql 5432

4. Check Detailed Logs

Get more detailed logs from the Identity pod:

kubectl logs <identity-pod-name> --previous
kubectl describe pod <identity-pod-name>

5. Verify Kubernetes Secrets

If using external database, ensure the secret exists:

kubectl get secret camunda-psql-db -n <your-namespace>
kubectl describe secret camunda-psql-db -n <your-namespace>

6. Common Issues with Helm Chart 12.3.0

  • Ensure the database name matches what Identity expects (usually identity)
  • Check that the PostgreSQL user has proper permissions
  • Verify the PostgreSQL service is in the same namespace as Identity

Next Steps

Could you please share:

  1. Your relevant values.yaml configuration (sanitized)
  2. Output of kubectl get pods,svc | grep postgres
  3. Full Identity pod logs: kubectl logs <identity-pod-name>

This will help me provide more specific guidance for your setup.

References

Let me know what you find, and I’ll help you get this resolved! :rocket: