Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

SFTP Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SFTP Error

    I have a channel defined, where it is reading an HL7 file using SFtp from one server, and relaying it to another SFtp server. I am seeing two types of errors intermittently. The first I'm guessing is due to a timeout on the SFtp server. It appears more frequently when there hasn't been any activity for a while.

    ERROR-409: SFTP Connector error
    ERROR MESSAGE: Error writing to Sftp
    4: java.lang.NullPointerException

    I'm not sure if anything can be done about that one, although it would be a nice feature if Mirth would try to resend it automatically some number of times if there were errors.

    The second is a little more confusing to me:

    ERROR-301: Transformer conversion error
    ERROR MESSAGE: Error adapting message
    com.webreach.mirth.model.converters.SerializerExce ption: Unable to parse, message is null or too short:

    To me, it appears that Mirth thinks that there is a file to pick for the reader, but there isn't one available.

    Any insight into either of those?

    Thanks,
    Vince Ciganik

  • #2
    Re:SFTP Error

    I think you are correct on the first one.

    For the second one, how is the "sending" application writing those files? Is it working on the files directly in the path that is available via SFTP or does it create the files and then move them to that path when they are ready to send??
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:SFTP Error

      The files are being written directly into the directory. I think you are suggesting that the Mirth server is attempting to pick up the files as they are being written to the directory, and failing at that point, which is a valid point, although the files are pretty small at around 30K, with the file information stored in a string and written out one time (not opening the file for write, looping and writing information on each loop etc.).

      I could try staging them in a different directory and then just moving them to the final destination. I suppose there is still the possibility that I will get the errors if the file is in the process of moving into the directory, but it should be less.

      In either case, I need to see if the verify if the file is actually being transferred. It seems to me that if I am seeing that error, with no raw message listed, that eventually the file does get written to the directory and processed at that time, and these errors, while valid, do not mean that information is being lost.

      Thanks,
      Vince

      Comment


      • #4
        Re:SFTP Error

        I also get error #1 a lot. Does anyone know if there is a plan to add this feature in to version 1.80?


        Thanks.

        Comment


        • #5
          I have been getting error #2 (Premature end of file; unable to parse, message is null or too short; using Mirth 1.7.1) on one my my channels only. It happens about 3 of every 4 times. I redirect the files to an error directory when problems happen. If I manually open the files and delete the final character in the message (a carriage return) and save it, it will process just fine.

          Mirth runs on a windows server in our environment.

          Perhaps it is related, but a previous channel we wrote refused to process file created on a linux machine. They made a change on their end to put the "windows-friendly" CR/LF line endings and it began working just fine for us.

          So, perhaps the fact that I am deleting that CR at the end of the file means nothing. Perhaps the fact that I am re-saving the file while in windows is reformatting the file into an always-compatible format. I'd really like to figure out a way not to have to manually re-save these files.

          Comment


          • #6
            Upgrade to 1.8 or Check "Convert LF to CR" on all inbound and outbound transformers.
            Daniel Svanstedt
            Software Engineer
            Mirth Corporation

            Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
            Mirth Support | Mirth Training | Mirth Appliances | Online Training | Developer Q&A

            Don't forget, Mirth Support gives you access to all of our online training videos, and silver support gives you access to developer Q&As!

            Comment


            • #7
              Here's a bigger version of the error (yes I convert LF to CR):
              [2009-07-06 16:54:10,613] ERROR (org.mule.impl.DefaultExceptionStrategy:231):
              ************************************************** ******************************
              Message : org.xml.sax.SAXParseException: Premature end of file. (com.webreach.mirth.model.converters.SerializerExc eption)
              Type : org.mule.umo.transformer.TransformerException
              Code : 64999
              JavaDoc : http://mule.codehaus.org/docs/apidoc...Exception.html
              Transformer : Transformer{name='8c82ae1c-92ea-453b-b3ea-06eb0ab97715_source_transformer', returnClass=false, returnClass=false, sourceTypes=[]}
              ************************************************** ******************************
              Exception stack is:
              1. Premature end of file. (org.xml.sax.SAXParseException)
              org.apache.xerces.util.ErrorHandlerWrapper:-1 (null)
              2. org.xml.sax.SAXParseException: Premature end of file. (com.webreach.mirth.model.converters.SerializerExc eption)
              com.webreach.mirth.model.converters.ER7Serializer: 195 (null)
              3. org.xml.sax.SAXParseException: Premature end of file. (com.webreach.mirth.model.converters.SerializerExc eption) (org.mule.umo.transformer.TransformerException)
              com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer:448 (http://mule.codehaus.org/docs/apidoc...Exception.html)
              ************************************************** ******************************
              Root Exception stack trace:
              org.xml.sax.SAXParseException: Premature end of file.

              at org.apache.xerces.util.ErrorHandlerWrapper.createS AXParseException(Unknown Source)

              at org.apache.xerces.util.ErrorHandlerWrapper.fatalEr ror(Unknown Source)

              at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown Source)

              at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown Source)

              at org.apache.xerces.impl.XMLVersionDetector.determin eDocVersion(Unknown Source)

              at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)

              at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)

              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

              at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)

              at com.webreach.mirth.model.converters.ER7Serializer. fromXML(ER7Serializer.java:190)

              at com.webreach.mirth.model.converters.ER7Serializer. fromXML(ER7Serializer.java:50)

              at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateScript(JavaScriptTransform er.java:429)

              at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:346)

              at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)

              at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)

              at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)

              at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)

              at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)

              at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)

              at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:493)

              at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)

              at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:231)

              at com.webreach.mirth.connectors.vm.VMMessageReceiver .getMessages(VMMessageReceiver.java:157)

              at org.mule.providers.TransactedPollingMessageReceive r.poll(TransactedPollingMessageReceiver.java:108)

              at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:118)

              at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)

              at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)

              at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)

              at java.lang.Thread.run(Unknown Source)

              ************************************************** ******************************

              Comment


              • #8
                Good news: Mirth 1.8.0 properly processes these files now without any manual edits!

                (although 1.8.0 is giving me some other unrelated issue when logging processed messages..)

                Comment


                • #9
                  Where is CONVERT LF to CR?

                  Comment


                  • #10
                    In the properties window of your messageTemplate(s)

                    I too have some times a error like Jimoran.
                    But I think Mirth is picking the file up while it is still being written. (race condition)
                    Stefan

                    Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

                    Comment

                    Working...
                    X