0

I am trying to run apache ranger2.5.0 docker image built with jdk11 on kubernetes. Ranger process starts but the REST endpoint initialization fails with below logs in cataline.out

Pod logs

Installation of Ranger PolicyManager Web Application is completed. Starting Apache Ranger Admin Service Apache Ranger Admin Service with pid 5378 has started. 

Error log from catalina.out

Apr 02, 2025 1:11:42 AM org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath Apr 02, 2025 1:11:42 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext [EL Warning]: metadata: 2025-04-02 01:11:46.2--ServerSession(1762555952)--You have specified multiple ids for the entity class [org.apache.ranger.entity.view.VXXPrincipal] without specifying an @IdClass. By doing this you may lose the ability to find by identity, distributed cache support etc. Note: You may however use EntityManager find operations by passing a list of primary key fields. Else, you will have to use JPQL queries to read your entities. For other id options see @PrimaryKey. [11.770s][info ][gc] GC(12) Pause Young (Normal) (G1 Evacuation Pause) 667M->76M(1024M) 26.706ms Apr 02, 2025 1:12:08 AM com.sun.jersey.api.core.PackagesResourceConfig init INFO: Scanning for root resource and provider classes in the packages: org.apache.ranger.rest org.apache.ranger.common xa.rest Apr 02, 2025 1:12:08 AM org.apache.catalina.core.ApplicationContext log SEVERE: Servlet.init() for servlet [REST Service] threw exception java.lang.IllegalArgumentException at jersey.repackaged.org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) at jersey.repackaged.org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) at jersey.repackaged.org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) at com.sun.jersey.spi.scanning.AnnotationScannerListener.onProcess(AnnotationScannerListener.java:138) at com.sun.jersey.core.spi.scanning.uri.FileSchemeScanner$1.f(FileSchemeScanner.java:86) at com.sun.jersey.core.util.Closing.f(Closing.java:71) at com.sun.jersey.core.spi.scanning.uri.FileSchemeScanner.scanDirectory(FileSchemeScanner.java:83) at com.sun.jersey.core.spi.scanning.uri.FileSchemeScanner.scan(FileSchemeScanner.java:71) at com.sun.jersey.core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:226) at com.sun.jersey.core.spi.scanning.PackageNamesScanner.scan(PackageNamesScanner.java:142) at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:80) at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104) at com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:78) at com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:89) at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:696) at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:674) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:205) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:394) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:577) at javax.servlet.GenericServlet.init(GenericServlet.java:143) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1109) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1061) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:958) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4625) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4933) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1364) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1354) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Apr 02, 2025 1:12:08 AM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet [REST Service] in web application [] threw load() exception 

The above error points to the conflict between the ASM version bundled with Jersey and the ASM version required by JDK 11. Searching other similar issues I found that Jersey version supported for jdk11 starts from >2.29 but apache ranger 2.5.0 has 1.19.4 (pom.xml).

Steps followed.

  1. mvn package with ranger-jdk11, all profile and built a docker image with jdk11 and deployed the image in k8s. got the above error
  2. Updated the Pom.xml for 2.29 version for other jersey artifacts but this forces other changes in ranger code base as the import changes and also the method signature

What am I missing here? I am sure other people are using ranger with >jdk11 - how is this issue handled or if I am doing something wrong?

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.