Skip to content

SLF4J logging warnings and missing application logs on OKDP Spark jobs #26

@achraf-ibrah

Description

@achraf-ibrah

Hello,

SLF4J falls back to a no-operation logger implementation because no compatible provider is detected. In addition, legacy SLF4J bindings (1.7.x) are present on the classpath and ignored due to incompatibility with the SLF4J API used by Spark in the OKDP image.
As a result, application logs are not produced correctly:

Image

Environment

Image: quay.io/okdp/spark:spark-3.4.2-scala-2.13-java-17-2.0.2
Spark version in manifest: 3.4.2 (also seen with 3.5.0)
Main: org.apache.spark.examples.SparkPi
Jar: local:///opt/spark/examples/jars/spark-examples_2.13-3.4.2.jar

How to reproduce

Submit any minimal SparkApplication (e.g., SparkPi) with the image above via Spark Operator.
Watch the spark-submit logs.
The SLF4J warnings appear consistently.

Likely cause

Classpath mismatch: SLF4J 2.x API with a 1.7 binding artifact.

References

https://www.slf4j.org/codes.html#noProviders
https://www.slf4j.org/codes.html#ignoredBindings

regards,

@SBatais @lioneloh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions