Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61176

Logstash-gelf is not supported in Java 11

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • _unsorted
    • Jenkins version: 2.190.3, 2.204.2
      OpenJDK 11
      Debian container

      I am running Jenkins on docker container based on OpenJDK 11. 
      I am using logstash-gelf plugin (https://github.com/mp911de/logstash-gelf) to redirect logs directly to Graylog.

      Before changing to Java 11 it was working on Java 8, but now during startup of container I got those logs:

       

      Can't load log handler "biz.paluch.logging.gelf.jul.GelfLogHandler"
      java.lang.ClassNotFoundException: biz.paluch.logging.gelf.jul.GelfLogHandler
      java.lang.ClassNotFoundException: biz.paluch.logging.gelf.jul.GelfLogHandler
      	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
      	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      	at java.logging/java.util.logging.LogManager.createLoggerHandlers(LogManager.java:1000)
      	at java.logging/java.util.logging.LogManager$4.run(LogManager.java:970)
      	at java.logging/java.util.logging.LogManager$4.run(LogManager.java:966)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.logging/java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:966)
      	at java.logging/java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:2417)
      	at java.logging/java.util.logging.LogManager$RootLogger.accessCheckedHandlers(LogManager.java:2511)
      	at java.logging/java.util.logging.Logger.getHandlers(Logger.java:2089)
      	at winstone.Launcher.main(Launcher.java:335)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at Main._main(Main.java:375)
      	at Main.main(Main.java:151)

       

      My handlers in logging.properties:

      handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler, biz.paluch.logging.gelf.jul.GelfLogHandler

       

      It seems like logs in Jenkins based on Java 11 has maybe another kind of format.
      I opened issue on this plugin page, but I got information that it issue is not related to logstash-gelf plugin, ([https://github.com/mp911de/logstash-gelf/issues/234)

      https://github.com/mp911de/logstash-gelf/issues/234]

       

            Unassigned Unassigned
            muniek12 Jakub Walder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: