Closed jeffmax closed 12 years ago
PACS is dcm4chee 2.17.0, also tried with 2.15.0
Looking at the source code, the error happens when ruby-dicom tries to transmit a package:
@session.send(@outgoing.string, 0)
I think there are two possible explanations for what has happened:
If it is 1, the cause may be that ruby-dicom has done something to upset your PACS at an earlier stage, and thus it aborts the connection. If so, it may be a regression. It would be helpful if you could try to determine this by testing the same thing with different versions of ruby-dicom, e.g. 0.9.2, 0.9.1, 0.8, 0.7.
If it is 2, then this may be a problem specific to the Ruby version and your system (OSX version). To debug this it would be helpful if you could try different ruby versions on your system, e.g. 1.8.7 vs 1.9.2, or even try it on another OS, like Windows or Linux.
Just wanted to let you know how great my experience has been with using this library so far. The c-find api was so easy to use in comparison to other tools I have tried.
I am working on the scenarios you described. Just to give you some more info, this is the stack trace from the PACS. I don't know if you have any experience with dcm4chee, but it appears to be a fairly informative for a Java exception:
2011-10-25 13:22:22,008 INFO RUBY_DICOM->PACS (TCPServer-1-1) [org.dcm4chex.archive.dcm.storescp.StoreScpService] M-DELETE file:/data/d1/2011/10/25/13/28D15D36/B706D067/F6E5FA0E
2011-10-25 13:22:22,008 INFO RUBY_DICOM->PACS (TCPServer-1-1) [org.dcm4cheri.net.FsmImpl] sending [pc-3] 1:C_STORE_RSP
class: 1.2.840.10008.5.1.4.1.1.1/Computed Radiography Image Storage
inst: 1.2.840.113564.10.1.37323423423342334232610/?
status: 110
error comment: org.dcm4che.net.PDUException: Unrecognized PDU[type=254, length=
2011-10-25 13:22:22,009 WARN -> (TCPServer-1-1) [org.dcm4cheri.util.LF_ThreadPool] Exception thrown in TCPServer-1-1
java.lang.IllegalStateException
at org.dcm4cheri.net.FsmImpl$State.write(FsmImpl.java:920)
at org.dcm4cheri.net.FsmImpl.write(FsmImpl.java:601)
at org.dcm4cheri.net.DimseWriterImpl.flushPDataTF(DimseWriterImpl.java:106)
at org.dcm4cheri.net.DimseWriterImpl.write(DimseWriterImpl.java:97)
at org.dcm4cheri.net.AssociationImpl.write(AssociationImpl.java:327)
at org.dcm4che.net.DcmServiceBase.c_store(DcmServiceBase.java:122)
at org.dcm4cheri.net.ActiveAssociationImpl.run(ActiveAssociationImpl.java:223)
at org.dcm4cheri.util.LF_ThreadPool.join(LF_ThreadPool.java:174)
at org.dcm4cheri.net.ActiveAssociationImpl.run(ActiveAssociationImpl.java:157)
at org.dcm4cheri.server.DcmHandlerImpl.handle(DcmHandlerImpl.java:249)
at org.dcm4cheri.server.ServerImpl.run(ServerImpl.java:279)
at org.dcm4cheri.util.LF_ThreadPool.join(LF_ThreadPool.java:174)
at org.dcm4cheri.util.LF_ThreadPool$1.run(LF_ThreadPool.java:221)
at java.lang.Thread.run(Thread.java:619)
I upgraded ruby to 1.9.2 (was on 1.8.7) and it worked on both centos and Mac OS X.
Actually, I suspect this is an issue with ruby-dicom version 0.9.2 and ruby 1.8, as described here: https://groups.google.com/forum/#!topic/ruby-dicom/rU80DA_8HQ4
I suspect you'll be fine with ruby-dicom 0.9.1 on ruby 1.8.7, and as you've confirmed, gem version 0.9.2 on ruby 1.9.2.
Although, looking at your error log, Im somewhat mystified by the 'unrecognized PDU' message.
Thanks for your comments on the friendly API by the way!
Are there any existing known issues with the DClient 'send' functionality?
I wrote a little script to use send to send the contents of a directory, but I keep getting this result: