New install: keycloak client not found error

Hi, newbie OpenRemote user here. I just installed OR on a web-accessible server using the docker-compose.yml, with the modifications below to work with my domain and an existing wildcard SSL certificate. Everything appears to start up ok, but when I go to the site in my browser (after several seconds and occasionally timeouts) I see it try to redirect to the /manager page but then it goes to /auth and I get an error page with the keycloak logo and a message “We are sorry… Client not found”. The site is encrypted with my SSL cert so it looks like the proxy SSL part is working fine. Any ideas on how to troubleshoot this?

From keycloak log file:

03:43:09,497 WARN  [] (default task-2) type=LOGIN_ERROR, realmId=master, clientId=openremote, userId=null, ipAddress=, error=client_not_found

docker-compose.yml mods:

   command: start-with-certificate
      LOCAL_CERT_FILE: /etc/ssl/private/server.cert.pem
      DOMAINNAME: ${DOMAINNAME:-[mycustomdomain]}
      - /etc/ssl/private/server.cert.pem:/etc/ssl/private/server.cert.pem
      KEYCLOAK_FRONTEND_URL: ${EXTERNAL_URL:-https://[mycustomdomain]}/auth


Upon a quick look what you’ve shown looks OK, the error suggests the manager setup code hasn’t executed. Can you paste the logs of the manager container.

manager_logs_2021-05-01.txt (19.4 KB)

Thanks @rich docker-compose logs for the manager service attached here. Please let me know if you need anything else.

Hi @rich not sure if this is relevant, but you mentioned manager setup so I tried to bring the solution up with the SETUP_WIPE_CLEAN_INSTALL flag set to true (without deleting db), and it caused an error with the manager service (kept on restarting) and the proxy failed to be created. Logs for that install attached.
manager_logs_2021-05-01_reinstall_existing_db_clean.txt (59.0 KB)

Looks like the OpenRemote manager is having issues communicating with Keycloak, try clearing volumes and starting again.

  • stop all containers using docker-compose down (include project name ‘-p’ if specified)
  • docker volume prune (or prune specific volumes used by OpenRemote)
  • docker-compose up

Thanks @rich I got it working with the following steps:

  1. docker-compose down
  2. pruned volumes one by one (prune [all] didn’t delete anything)
  3. deleted contents of local drives mapped to volumes (sorry forgot to mention I have a separate data disk so I had mapped the volumes using local driver)
  4. docker-compose up

I think the db initialization got interrupted/corrupted somehow in an earlier install attempt, so #3 was required to force it to re-initialize. Maybe the db state also caused SETUP_WIPE_CLEAN_INSTALL=true to fail, not sure about that one.

All working perfectly now. Thanks for your help!