Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: index worker logging broken #154

Open
artntek opened this issue Dec 16, 2024 · 0 comments
Open

Bug: index worker logging broken #154

artntek opened this issue Dec 16, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@artntek
Copy link
Collaborator

artntek commented Dec 16, 2024

we noticed when deploying 3.1.0 that logging did not work, and saw only this in the index worker logs:

SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J(W): Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J(W): Ignoring binding found at [jar:file:/var/lib/dataone-indexer/dataone-index-worker-3.1.0-shaded.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J(W): See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.

Since logging worked in the version of indexer bundled with metacat (metacat/metacat-index), we copied the logging dependencies from the metacat-index pom file to the indexer pom file. This resulted in a different log message:

log4j:WARN No appenders could be found for logger (org.dataone.cn.indexer.IndexWorker).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

We resolved it by removing any log4j v1 dependencies (namely the slf4j-log4j12 dependency), and also renamed the k8s mount-point for the log4j properties file from log4j.properties to log4j2.properties

@artntek artntek added the bug Something isn't working label Dec 16, 2024
@artntek artntek self-assigned this Dec 16, 2024
@artntek artntek added this to the 3.1.0 milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant