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 Writer - ERROR MESSAGE: Error writing to Sftp

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

  • sFTP Writer - ERROR MESSAGE: Error writing to Sftp

    I posted this reply to the 'Help with sFTP' thread by jmericle (http://www.mirthproject.org/index.ph...5&catid=2#3875) but didn't receive any replies. Can anyone explain how to solve this issue? Has anyone configured an sFTP writer connector successfully? If so, can you publish all the steps (maybe in the Wiki as well)?

    I upgraded to version 1.6.1.2750 and updated all plugins. The sFTP Reader was the only update after upgrading to 1.6.1.2750. I am now receiving the following message. I can SFTP connect and write to the destination server using another sFTP client (FileZilla).

    Thanks!

    ERROR-409: SFTP Connector error
    ERROR MESSAGE: Error writing to Sftp

    4:
    at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:29 5)
    at com.webreach.mirth.connectors.sftp.SftpConnectionF actory.makeObject(SftpConnectionFactory.java:48)
    at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject(GenericObjectPool.java:816)
    at com.webreach.mirth.connectors.sftp.SftpConnector.g etClient(SftpConnector.java:114)
    at com.webreach.mirth.connectors.sftp.SftpMessageDisp atcher.doDispatch(SftpMessageDispatcher.java:83)
    at com.webreach.mirth.connectors.sftp.SftpMessageDisp atcher.doSend(SftpMessageDispatcher.java:144)
    at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:166)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
    at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:89)
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
    at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
    at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:161)
    at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:128)
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:492)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:271)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:230)
    at com.webreach.mirth.connectors.vm.VMMessageReceiver .getMessages(VMMessageReceiver.java:141)
    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)
    Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(Unknown Source)
    at com.jcraft.jsch.ChannelSftp.remoteAbsolutePath(Cha nnelSftp.java:2156)
    at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:25 8)
    ... 29 more
    Please note, although no boardcode and smiley buttons are shown, they are still useable

  • #2
    Re:sFTP Writer - ERROR MESSAGE: Error writing to S

    Finally got sFTP to work! Found the following under issue tracker http://www.mirthproject.org/communit...owse/MIRTH-566

    The correct format for host is:

    hostnameort//

    You have to include the two forward slashes after the port. The subdirectory name would follow the slashes if you do not want to write to the sFTP root.

    Comment


    • #3
      Re:sFTP Writer - ERROR MESSAGE: Error writing to Sftp

      Very cool! This worked! Although I only needed the one slash format. Maybe worth posting this to the documentation Wiki for examples on the channel configuration?

      Thanks for the reply post.

      Comment


      • #4
        Re:sFTP Writer - ERROR MESSAGE: Error writing to Sftp

        We're not sure yet why some sftp's seem to require two slashes. We are looking into this for 1.7.
        Jacob Brauer
        Director, Software Development
        NextGen Healthcare

        sigpic

        Comment


        • #5
          Re:sFTP Writer - ERROR MESSAGE: Error writing to Sftp

          :laugh:

          Well, it's great to see that my 2 days of anguish might have payed off for someone else out there.

          When I encountered this problem, after countless trial and error, I accidentily left an extra / in there and I said, what the heck, let's try it. Amazingly it worked. It was pure luck I stumbled onto that.

          Why some servers require the extra // and others not, I could never pin down. Both servers were using the same version of Linux. My guess at the time was the way the drive volume was mapped. Maybe there was a linked directory path in the name somewhere.

          As far as how were going to know what syntax to choose, I don't know. Jacob, I might suggest that below the line prompting for the connection string, you give a couple examples. One with and one without. That was another thing I wanted. I think it simply says Host or something like that. I had to ask around to find out the format. It wasn't intuitive. A "Example: /myhost/..." line underneath might be very helpful, but would be unnecessary when/if we add the context help popups...

          Anyways, cool to read this!

          Comment


          • #6
            Re:sFTP Writer - ERROR MESSAGE: Error writing to Sftp

            Yup, the way you enter your url is definitely going to be cleaned up for 1.7! I am still stumped on why some sftp's seem to require two slashes. If anyone investigates this further and has any ideas please let me know!

            Post edited by: jacobb, at: 10/31/2007 15:29
            Jacob Brauer
            Director, Software Development
            NextGen Healthcare

            sigpic

            Comment


            • #7
              Re:sFTP Writer - ERROR MESSAGE: Error writing to Sftp

              After looking further into this problem, I discovered that I had actually already fixed it as a consequence of another issue. If you go into your plugins section of the client, and check for updates, you will see a new sftp reader plugin. Install it, and restart the server. You should then be able to use only one slash without any problems! This will also be fixed in the 1.7 release.
              Jacob Brauer
              Director, Software Development
              NextGen Healthcare

              sigpic

              Comment

              Working...
              X