Dear XNAT Discussion Group,
Environment
• XNAT running on Kubernetes (namespace: ais-xnat), plugin: Container Service
• Logs present: containers.log (+ rotated files)
• Problem: I added SLF4J statements in Container Service–related classes (e.g., log.debug("...")), but I cannot see any DEBUG lines in containers.log or other container-service logs. VS Code remote debugging has also not attached successfully yet.
What I have tried
Verified code uses SLF4J (org.slf4j.LoggerFactory) and the package is under org.nrg.containers....
Enabled loggers in $XNAT_HOME/config/logback.xml and restarted Tomcat/XNAT:
• org.nrg.containers at DEBUG
• org.nrg.containers.api at DEBUG
• org.nrg.containers.services at DEBUG
• org.nrg.containers.kubernetes at DEBUG
Confirmed appender routing: the same appender used for containers.log should capture these categories.
Reproduced the workflow (cache-recall / dcm2niix launch), but DEBUG lines did not appear.
Searched with grep -rni DEBUG containers.log* and monitored with tail -f containers.log.
Questions
Are there additional logger categories I should enable for Container Service (or command resolution) to surface DEBUG output? For example, org.nrg.framework, org.nrg.xnatx.plugins, or others used by the plugin?
Is there a recommended, up-to-date sample logback.xml snippet for enabling full Container Service DEBUG in XNAT 1.9.x?
For remote debugging on Kubernetes: is the approach below correct?
• Set JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" on the xnat-web container
• Expose containerPort 5005 and kubectl port-forward svc/xnat-web-debug 5005:5005
• Attach VS Code on localhost:5005 with sources matching the deployed JAR
Does the Container Service plugin route some logs through a different category or level (e.g., INFO only) during orchestration steps, which could explain why log.debug lines do not appear?
If there is a known interaction with shaded logging bindings in the plugin JAR, what is the recommended fix?
If helpful, I can share:
• A minimal code snippet with the log.debug call and its package/class name
• My current logback.xml relevant sections (logger + appender)
• The exact Container Service version and XNAT version
Many thanks for any guidance or a canonical logging/debug configuration.
Kind regards,
Chenxi (Richard) Guo
Rick Herrick
Senior Software Developer
--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/a3e2dbbe-b970-4b04-9545-b1703180cf53n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/CAFykhbC_MMbN31TLh2gB8igdMjOqQYO2reyAoC2JpXiut5UqKQ%40mail.gmail.com.
File: containers-logback.xml
Changes: raised org.nrg.containers
to DEBUG
and kept subsystem routing (CommandResolutionServiceImpl, Kubernetes client) as is.
Do I need to rebuild the plugin again?
Chenxi Guo
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/CADwXCSq5XLhcLt57GJJ4QxpDa8OaQJGgp-CbUbrHUzPbApDdQg%40mail.gmail.com.
jar
CLI tool, you could give that a try.To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/CAJD6T44ff3F4RO9j3tHybT4h79aQYtF4iqYmHkC_rmjVGJ92ww%40mail.gmail.com.
Hi John,
I’ve rebuilt the JAR file, moved it to the correct directory, and restarted the pod. However, the log output still looks like this:
2025-10-12 12:48:39,027 [http-nio-8080-exec-5] ERROR org.nrg.containers.api.DockerControlApi - Hub status check created exception.
java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [2] No such file or directory
at com.github.dockerjava.okhttp.UnixSocketFactory.createSocket(UnixSocketFactory.java:23)
...
As you can see, there’s no DEBUG
information appearing in the logs — only the same error messages as before.
Could you please let me know if there’s another configuration or environment variable I should check to enable debug-level logging?
Best regards,
Chenxi
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/CADwXCSpaco_hPEHr8AbbGDTg3yX1FdEQQGkkLMiLDU%2B%2ByD%2BQfA%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/xnat_discussion/CADwXCSpaco_hPEHr8AbbGDTg3yX1FdEQQGkkLMiLDU%2B%2ByD%2BQfA%40mail.gmail.com.