Graylog2 / Graylog2/graylog-plugin-integrations
Error about missing SLF4J bindings
- Dominant language
- Java
- Stars
- 17
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
There should be no warning about failed logger bindings.
## Current Behavior
When accessing the `/api/system/inputs/types/all` API endpoint in Graylog (this happens when going to the "System / Inputs" page), I see the following error in the server log:
```
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
```
If I disable the AWS input in the integrations plugin bindings, this error doesn't show up. So it seems to be related to the AWS SDK. (see below)
## Steps to Reproduce (for bugs)
1. Download 3.2.0-beta.2 release
2. Start server
3. Navigate to "System / Inputs"
4. Check server logs
## Context
My suspicion is, that this is related to the AWS SDK bundle dependency we are using:
https://github.com/Graylog2/graylog-plugin-integrations/blob/c5cc696704559c4eb5b10229d4709cf82b53f73c/pom.xml#L53-L61
This bundle is including a shaded and relocated version of SLF4J.
I also noticed that while we include the "bundle" SDK, the kinesis-client is still using the regular SDK dependencies. That means it also includes the apache httpclient dependency, which apparently was the reason why we used the "bundle" SDK in the first place.
So as far as I understand from the comment in the `pom.xml`, we use the "bundle" SDK to avoid depending on the apache httpclient, but then the kinesis-client dependency is pulling the httpclient in anyway because it's not using the "bundle" SDK.
Also, we are using different versions of the SDK. We use `2.10.41` for the bundle, but the kinesis-client is using `2.10.0` versions of the SDK dependencies.
I don't know what the issue with the httpclient was, but we should try to clean this up and use the same versions for all AWS SDK related dependencies.
Not sure if that will fix the SLF4J error, but if we maybe don't need the "bundle" SDK, we can get rid of the SLF4J copy.
```
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ graylog-plugin-integrations ---
[INFO] org.graylog.plugins:graylog-plugin-integrations:jar:3.2.0-beta.3-SNAPSHOT
[INFO] +- software.amazon.awssdk:bundle:jar:2.10.41:compile
[INFO] | \- software.amazon.eventstream:eventstream:jar:1.0.1:compile
[INFO] +- software.amazon.kinesis:amazon-kinesis-client:jar:2.2.6:compile
[INFO] | +- software.amazon.awssdk:kinesis:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:aws-cbor-protocol:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:aws-json-protocol:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:protocol-core:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:sdk-core:jar:2.10.0:compile
[INFO] | | | \- software.amazon.awssdk:profiles:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:auth:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:http-client-spi:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:regions:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:annotations:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:utils:jar:2.10.0:compile
[INFO] | | +- software.amazon.awssdk:aws-core:jar:2.10.0:compile
[INFO] | | \- software.amazon.awssdk:apache-client:jar:2.10.0:runtime
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.4.11:runtime
[INFO] | +- software.amazon.awssdk:dynamodb:jar:2.10.0:compile
[INFO] | +- software.amazon.awssdk:cloudwatch:jar:2.10.0:compile
[INFO] | | \- software.amazon.awssdk:aws-query-protocol:jar:2.10.0:compile
[INFO] | +- software.amazon.awssdk:netty-nio-client:jar:2.10.0:compile
[INFO] | | +- io.netty:netty-codec-http2:jar:4.1.42.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.1.42.Final:compile
[INFO] | | +- com.typesafe.netty:netty-reactive-streams-http:jar:2.0.3:compile
[INFO] | | | \- com.typesafe.netty:netty-reactive-streams:jar:2.0.3:compile
[INFO] | | \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] | +- com.google.guava:guava:jar:26.0-jre:compile
[INFO] | | +- org.checkerframework:checker-qual:jar:2.5.2:compile
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] | | +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] | | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | \- io.reactivex.rxjava2:rxjava:jar:2.1.14:compile
```
## Your Environment
* Graylog Version: 3.2.0-beta.2
Contributor guide
Assessment
This issue has not been assessed yet.