Hi, I’ve installed the Datadog metrics reporter plugin but I’m getting the following error in the graylog log:
2018-06-13T18:53:57.921Z ERROR [DatadogReporter] Error reporting metrics to Datadog
java.lang.NoClassDefFoundError: Could not initialize class org.apache.http.client.fluent.Executor
at org.apache.http.client.fluent.Request.execute(Request.java:143) ~[metrics-reporter-datadog-1.4.0.jar:?]
at org.coursera.metrics.datadog.transport.HttpTransport$HttpRequest.send(HttpTransport.java:120) ~[metrics-reporter-datadog-1.4.0.jar:?]
at org.coursera.metrics.datadog.DatadogReporter.report(DatadogReporter.java:109) [metrics-reporter-datadog-1.4.0.jar:?]
at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162) [graylog.jar:?]
at com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117) [graylog.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_91]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_91]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
I’m running Graylog 2.0.3 and Java 1.8.0_91 which I believe should meet the requirements of the plugin. I am using the following config as well:
The class itself exists in the JAR archive of the plugin:
$ unzip -l metrics-reporter-datadog-1.4.0.jar org/apache/http/client/fluent/Executor.class
Archive: metrics-reporter-datadog-1.4.0.jar
Length Date Time Name
--------- ---------- ----- ----
8712 10-28-2016 15:25 org/apache/http/client/fluent/Executor.class
--------- -------
8712 1 file
Try upgrading to version 1.5.0 of the plugin:
In general, I’d also recommend upgrading Graylog to a more recent version. Graylog 2.0.3 was released pretty much exactly 2 years ago and it won’t receive any bug fixes.
I tried plugin version 1.5.0 but I encounter a different error unfortunately.
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:56)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.java:46)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:72)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFactory.java:84)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<clinit>(ManagedHttpClientConnectionFactory.java:59)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$InternalConnectionFactory.<init>(PoolingHttpClientConnectionManager.java:494)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:149)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:138)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:114)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.apache.http.client.fluent.Executor.<clinit>(Executor.java:94)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.coursera.metrics.datadog.transport.HttpTransport.<init>(HttpTransport.java:44)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.coursera.metrics.datadog.transport.HttpTransport.<init>(HttpTransport.java:25)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.coursera.metrics.datadog.transport.HttpTransport$Builder.build(HttpTransport.java:81)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.graylog.plugins.metrics.datadog.providers.TransportProvider.get(TransportProvider.java:54)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.graylog.plugins.metrics.datadog.providers.TransportProvider.get(TransportProvider.java:32)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:61)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:375)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:258)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:61)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at com.google.inject.Guice.createInjector(Guice.java:96)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.graylog2.shared.bindings.Hk2GuiceBridgeJitInjector.create(Hk2GuiceBridgeJitInjector.java:60)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.graylog2.shared.bindings.GuiceInjectorHolder.createInjector(GuiceInjectorHolder.java:32)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.graylog2.bootstrap.CmdLineTool.setupInjector(CmdLineTool.java:379)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:193)
Jun 13 20:22:56 aue3pgl2ap02 graylog-server[15117]: at org.graylog2.bootstrap.Main.main(Main.java:44)
We are on an older version of Graylog but our cluster is working fine otherwise. Do you believe an upgrade to Graylog will resolve the Datadog plugin issue?