Keycloak 16.1.1 and Postgres sql - Java Base Image Compatibility

138 views
Skip to first unread message

Balaji Ravindran

unread,
Feb 21, 2023, 11:48:11 AM2/21/23
to WildFly
Hi All,

We are trying to build keycloak - 16.1.1 image using base image amazoncorreto:17-al2-jdk(an amazon version of open-jdk) and we are using postgres sql instead of default H2 database.

While deploying this image in a kubernetes pod - We can see the following error in the pod logs and added to this keycloak UI is not loading.

ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 56) MSC000001: Failed to start service org.wildfly.clustering.jgroups.channel.ee: org.jboss.msc.service.StartException in service org.wildfly.clustering.jgroups.channel.ee: java.lang.IllegalStateException: javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory com.sun.jndi.dns.DnsContextFactory from classloader ModuleClassLoader for Module "org.wildfly.clustering.service" version 26.0.1.Final from local module loader @45a37759 (finder: local module finder @63611043 (roots: /keycloak-16.1.1/modules,/keycloak-16.1.1/modules/system/layers/keycloak,/keycloak-16.1.1/modules/system/layers/base)) [Root exception is java.lang.IllegalAccessException: class org.jboss.as.naming.InitialContext cannot access class com.sun.jndi.dns.DnsContextFactory (in module jdk.naming.dns) because module jdk.naming.dns does not export com.sun.jndi.dns to unnamed module @623c6b38]

       at org.wildfly.clu...@26.0.1.Final//org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:66)

       at org.wildfly.clu...@26.0.1.Final//org.wildfly.clustering.service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncServiceConfigurator.java:117)

Any pointers how to solve this would be helpful


Regards,

Balaji Ravindran.

Reply all
Reply to author
Forward
0 new messages