# Does Keycloak log errors regarding an external database connection?

**URL:** <https://forum.keycloak.org/t/does-keycloak-log-errors-regarding-an-external-database-connection/17673>\
**Category:** Configuring the server\
**Created:** [September 29, 2022, 1:50pm UTC](https://forum.keycloak.org/t/does-keycloak-log-errors-regarding-an-external-database-connection/17673 "2022-09-29T13:50:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mczxcxzc](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mczxcxzc](https://forum.keycloak.org/u/mczxcxzc)\
**Post date:** [September 29, 2022, 1:50pm UTC](https://forum.keycloak.org/t/does-keycloak-log-errors-regarding-an-external-database-connection/17673/1 "2022-09-29T13:50:49Z")

</div>

Hi,

I’m troubleshooting some issues with data being gone after my dockerized Keycloak instance is removed and I suspect a misconfiguration on my side. For troubleshooting purposes I have changed my  
`- DB_ADDR=postgresql`  
to something non existent:  
`- DB_ADDR=asjlkasfasffga`  
and the Keycloak container starts without issues but more important, it doesn’t output any errors regarding the database connection. Is this expected? I’m was expecting to see something along the lines of “could not connect to db” or similar. The Postgres bind mount does exist and gets filled with (default) data when the Postgres container is started. Postgres also doesn’t throw out any errors when it’s started.

Docker compose file:

```auto
services:
  postgresql:
    image: postgresql:latest
    environment:
      - POSTGRES_USER=keycloakdbuser
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=keycloak
    volumes:
      - /opt/project/postgresql:/var/lib/postgresql/data
    networks:
      - keycloaknet
  keycloak:
    image: quay.io/keycloak/keycloak:latest
    ports:
      - 8080:8080
    environment:
      - KEYCLOAK_ADMIN=keycloakadmin
      - KEYCLOAK_ADMIN_PASSWORD=adminpassword
      - DB_DATABASE=keycloak
      - DB_USER=keycloakdbuser
      - DB_PASSWORD=password
      - DB_ADDR=postgresql
      - DB_VENDOR=postgres
    entrypoint: '/opt/keycloak/bin/kc.sh --spi-login-protocol-openid-connect-legacy-logout-redirect-uri=true --spi-theme-static-max-age=-1 --spi-theme-cache-themes=false --spi-theme-cache-templates=false start --hostname hostname.tld'
    networks:
      - keycloaknet
    depends_on:
      - postgresql

  keycloaknet:
    driver: bridge
    name: keycloaknet

```
