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

Logstash-gelf is not supported in Java 11

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: _unsorted
    • Environment:
      Jenkins version: 2.190.3, 2.204.2
      OpenJDK 11
      Debian container
    • Similar Issues:

      Description

      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]

       

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          This seems to me like a request for help with configuration or as a request to answer a question about how to configure the logging on Java 11 so that it works with a custom logger.

          Please use the mailing lists or the chat channels for question and answer.

          Show
          markewaite Mark Waite added a comment - This seems to me like a request for help with configuration or as a request to answer a question about how to configure the logging on Java 11 so that it works with a custom logger. Please use the mailing lists or the chat channels for question and answer.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: