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

  • 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 ( 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 and updated all plugins. The sFTP Reader was the only update after upgrading to I am now receiving the following message. I can SFTP connect and write to the destination server using another sFTP client (FileZilla).


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

    at 5)
    at com.webreach.mirth.connectors.sftp.SftpConnectionF actory.makeObject(
    at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject(
    at com.webreach.mirth.connectors.sftp.SftpConnector.g etClient(
    at com.webreach.mirth.connectors.sftp.SftpMessageDisp atcher.doDispatch(
    at com.webreach.mirth.connectors.sftp.SftpMessageDisp atcher.doSend(
    at org.mule.providers.AbstractMessageDispatcher.send(
    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(
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(
    at org.mule.transaction.TransactionTemplate.execute(T
    at ute(
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (
    at org.mule.routing.inbound.InboundMessageRouter.rout e(
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(
    at com.webreach.mirth.connectors.vm.VMMessageReceiver .getMessages(
    at org.mule.providers.TransactedPollingMessageReceive r.poll(
    at .java:290)
    at eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at eadPoolExecutor$ :675)
    at 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
    at 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

    The correct format for host is:


    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.


    • #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.


      • #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



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


          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!


          • #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



            • #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