Keycloak unable to connect to SQL Server running on Windows

246 views
Skip to first unread message

Nawaz Ali

unread,
Apr 19, 2021, 2:35:02 PM4/19/21
to Keycloak User

Keycloak container is unable to establish connection to a remote SQL Server database and is stuck in a boot loop.

Output from container logs:

{"logs":"Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: \"Certificates do not conform to algorithm constraints\". ClientConnectionId:8c3fca80-a572-4014-abe0-6e55adf39c44 {"logs":"Caused by: javax.net.ssl.SSLHandshakeException: Certificates do not conform to algorithm constraints 
{"logs":"Caused by: java.security.cert.CertificateException: Certificates do not conform to algorithm constraints {"logs":"Caused by: java.security.cert.CertPathValidatorException: Algorithm constraints check failed on keysize limits. RSA 1024bit key used with certificate: CN=SSL_Self_Signed_Fallback. Usage was tls server 
{"logs":"\u001B[0m\u001B[31m12:14:07,280 FATAL [org.keycloak.services] (ServerService Thread Pool -- 56) java.lang.RuntimeException: Failed to connect to database

I’m running Keycloak version 10.0.1 in a docker container on a Linux machine and the SQL Server 2012 DB is hosted on a Windows machine. I've enabled TCP/IP protocol on the SQL Server and configured it to listen on all addresses.

Works absolutely fine when I point the container to SQL Server running on another Linux machine.

Reply all
Reply to author
Forward
0 new messages