Hello,
We've been using XNAT 1.7.6 with Container Service 2.1.0 for a little over a year and had it working pretty well for our use case, mainly controlling the container service with commands sent via REST API. We decided to test out XNAT 1.8.1 using the
docker-compose repo, which we have left as mostly the default config. The only changes made to the default config have been to add path translation (/data/xnat in docker -> /xnat-data on localhost). I have verified that the paths line up correctly.
I've been trying to run the xnat/dcm2niix:latest docker using the
default command.json (this works on our old instance running XNAT 1.7.6 and CS 2.1.0). I've tried running the command manually from the XNAT UI, as an automatic command set via the plugin interface, as an event subscription when a scan is created, and via the REST API. All of the above result in the following error in /data/xnat/home/logs/containers-services-commandresolution.log:
2021-05-20 13:15:06,608 [DefaultMessageListenerContainer-10] ERROR org.nrg.containers.services.impl.CommandResolutionServiceImpl - Cannot derive input "scan-dicom". Parent input's XNAT object is null.
Likewise, this is the traceback in /data/xnat/home/logs/containers/log:
2021-05-20 13:15:06,630 [DefaultMessageListenerContainer-10] ERROR org.nrg.containers.services.impl.ContainerServiceImpl - Container command resolution failed for wfid 52.
org.nrg.containers.exceptions.CommandResolutionException: Input "scan-dicom" could not be resolved for this item. You might check the JSONPath matchers in command.json and confirm that this item has Scan data.
at org.nrg.containers.services.impl.CommandResolutionServiceImpl$CommandResolutionHelper.findResolvedValues(CommandResolutionServiceImpl.java:1699)
at org.nrg.containers.services.impl.CommandResolutionServiceImpl$CommandResolutionHelper.findResolvedValues(CommandResolutionServiceImpl.java:1666)
at org.nrg.containers.services.impl.CommandResolutionServiceImpl$CommandResolutionHelper.resolveInputTrees(CommandResolutionServiceImpl.java:335)
at org.nrg.containers.services.impl.CommandResolutionServiceImpl$CommandResolutionHelper.resolve(CommandResolutionServiceImpl.java:377)
at org.nrg.containers.services.impl.CommandResolutionServiceImpl$CommandResolutionHelper.access$200(CommandResolutionServiceImpl.java:248)
at org.nrg.containers.services.impl.CommandResolutionServiceImpl.resolve(CommandResolutionServiceImpl.java:245)
at org.nrg.containers.services.impl.ContainerServiceImpl.consumeResolveCommandAndLaunchContainer(ContainerServiceImpl.java:496)
at org.nrg.containers.jms.listeners.ContainerStagingRequestListener.onRequest(ContainerStagingRequestListener.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:180)
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:112)
at org.springframework.jms.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:104)
at org.springframework.jms.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:69)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:719)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:679)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:649)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:317)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1167)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1159)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1056)
at java.lang.Thread.run(Thread.java:748)
2021-05-20 13:20:35,583 [DefaultMessageListenerContainer-2] ERROR org.nrg.containers.services.impl.ContainerServiceImpl - Container command resolution failed for wfid 54.
None of these attempts show up in the command history in the plugin settings UI in XNAT.
This also happens while trying to run any of our other commands that work on the older instance, but I figured the dcm2niix command is the easiest to troubleshoot and ask for help with.
Did something change in either XNAT 1.8.1 or CS 3.0.0 regarding path translation or command resolution? I can't see anything we've done differently setting this instance up, but it looks like the container service isn't parsing the DICOM labels like it did in 2.1.0. When running the commands manually via the XNAT UI, the first pop up menu says something about running the command in bulk (screenshot attached), even though I am running the command on just one image. I'm also attaching a screenshot of the folder structure of the session I am working with.
Any help would be greatly appreciated!