Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32444

Investigate Kafka client upgrade from 3.6.1 to 3.7.0 failing on missing JARs

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2023.x
    • Component/s: Streams

      Description

      The pull request created by Dependabot to upgrade Kafka client from 3.6.1 to 3.7.0 in 2023 makes the Docker image startup fail with:

      Starting process is taking too long - giving up.
      

      Indeed, starting a server with the upgraded lib fails with:

      # Running Nuxeo Preprocessor ...
      Preprocessing: /home/ataillefer/nuxeo/nuxeo-server-tomcat-2023.10-SNAPSHOT-kafka-3.7/nxserver
      Done.
      # Preprocessing done
      2024-03-25 15:50:52 AVERTISSEMENT [main] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Echec de recherche dans [file:/home/ataillefer/nuxeo/nuxeo-server-tomcat-2023.10-SNAPSHOT-kafka-3.7/lib/zstd-jni-1.5.5-6.jar] de la hiérarchie de chargeurs de classes
      	java.io.IOException: java.lang.reflect.InvocationTargetException
      		at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:209)
      		at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65)
      		at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49)
      		at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:387)
      		at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:322)
      		at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:274)
      		at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:237)
      ...
      	Caused by: java.lang.reflect.InvocationTargetException
      		at java.base/jdk.internal.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
      		at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      		at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
      		at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
      		at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:206)
      		... 51 more
      	Caused by: java.nio.file.NoSuchFileException: /home/ataillefer/nuxeo/nuxeo-server-tomcat-2023.10-SNAPSHOT-kafka-3.7/lib/zstd-jni-1.5.5-6.jar
      		at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
      		at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
      		at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
      		at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
      		at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
      		at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
      		at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
      		at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1264)
      		at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709)
      		at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
      		at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
      		at java.base/java.util.jar.JarFile.<init>(JarFile.java:347)
      		... 56 more
      2024-03-25 15:50:52 AVERTISSEMENT [main] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Echec de recherche dans [file:/home/ataillefer/nuxeo/nuxeo-server-tomcat-2023.10-SNAPSHOT-kafka-3.7/lib/lz4-java-1.8.0.jar] de la hiérarchie de chargeurs de classes
      	java.io.IOException: java.lang.reflect.InvocationTargetException
      		at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:209)
      		at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65)
      		at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49)
      		at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:387)
      		at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:322)
      		at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:274)
      		at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:237)
      ...
      	Caused by: java.lang.reflect.InvocationTargetException
      		at java.base/jdk.internal.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
      		at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      		at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
      		at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
      		at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:206)
      		... 51 more
      	Caused by: java.nio.file.NoSuchFileException: /home/ataillefer/nuxeo/nuxeo-server-tomcat-2023.10-SNAPSHOT-kafka-3.7/lib/lz4-java-1.8.0.jar
      		at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
      		at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
      		at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
      		at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
      		at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
      		at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
      		at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
      		at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1264)
      		at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709)
      		at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
      		at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
      		at java.base/java.util.jar.JarFile.<init>(JarFile.java:347)
      		... 56 more
      2024-03-25 15:50:52 AVERTISSEMENT [main] org.apache.tomcat.util.scan.StandardJarScanner.processURLs Echec de recherche dans [file:/home/ataillefer/nuxeo/nuxeo-server-tomcat-2023.10-SNAPSHOT-kafka-3.7/lib/snappy-java-1.1.10.5.jar] de la hiérarchie de chargeurs de classes
      	java.io.IOException: java.lang.reflect.InvocationTargetException
      		at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:209)
      		at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65)
      		at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49)
      		at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:387)
      		at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:322)
      		at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:274)
      		at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:237)
      ...
      	Caused by: java.lang.reflect.InvocationTargetException
      		at java.base/jdk.internal.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
      		at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      		at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
      		at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
      		at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:206)
      		... 51 more
      	Caused by: java.nio.file.NoSuchFileException: /home/ataillefer/nuxeo/nuxeo-server-tomcat-2023.10-SNAPSHOT-kafka-3.7/lib/snappy-java-1.1.10.5.jar
      		at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
      		at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
      		at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
      		at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
      		at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
      		at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
      		at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
      		at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1264)
      		at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709)
      		at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243)
      		at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172)
      		at java.base/java.util.jar.JarFile.<init>(JarFile.java:347)
      		... 56 more
      

      These JAR files seem to be missing in the server libs:

      • zstd-jni-1.5.5-6.jar
      • lz4-java-1.8.0.jar
      • snappy-java-1.1.10.5.jar

      Could this be related to NXP-32230, with https://github.com/nuxeo/nuxeo-lts/commit/5249a7d0fcefce8c951cd52100fb41fca23a59d4#diff-2fe71d62c1ae302010fbed3c4233606f16c1a2ffc0bd350a8a6bd1f358b332cdR171 putting the Kafka client JAR in both the lib and nxserver/lib directory?

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: