web stats
SFTP Reader in Mirth 3.4 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2016, 07:44 AM
mmunchoor mmunchoor is offline
Mirth Newb
 
Join Date: Mar 2016
Posts: 8
mmunchoor is on a distinguished road
Default SFTP Reader in Mirth 3.4

How do we set up a SFTP source Connector in Mirth 3.4?
I do not see any option to do that. Please advice.

Thanks
Reply With Quote
  #2  
Old 08-30-2016, 07:49 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,119
narupley is on a distinguished road
Default

Use the File Reader, and choose the mode SFTP.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 01-16-2017, 11:52 AM
jolson27 jolson27 is offline
What's HL7?
 
Join Date: Dec 2016
Location: Sioux Falls, SD
Posts: 4
jolson27 is on a distinguished road
Default

If you do get this setup and the test connection works fine, what would cause this error below? I have tried to put it to the C: or other random drives. I have the location of Mirth Connect to try to test permission issues. Thoughts? Should I attach channel?
[2017-01-16 14:27:03,723] ERROR (com.mirth.connect.connectors.file.FileReceiver:43 2): Error processing file in channel: d4d0ced8-1bd6-4bd0-b461-ee08a1ce74f6
com.mirth.connect.connectors.file.FileConnectorExc eption: Error moving file from [//Extract_20161231_20170106.zip] to [C:/Program Files/Mirth Connect/docs//Extract_20161231_20170106.zip]
at com.mirth.connect.connectors.file.FileReceiver.pro cessFile(FileReceiver.java:414)
at com.mirth.connect.connectors.file.FileReceiver.pro cessFiles(FileReceiver.java:247)
at com.mirth.connect.connectors.file.FileReceiver.pol l(FileReceiver.java:203)
at com.mirth.connect.donkey.server.channel.PollConnec torJob.execute(PollConnectorJob.java:47)
at org.quartz.core.JobRunShell.run(JobRunShell.java:2 13)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run (SimpleThreadPool.java:557)
Reply With Quote
  #4  
Old 01-17-2017, 01:38 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 832
siddharth is on a distinguished road
Default

You are not reading the file in binary mode. That's a zip file.
Reply With Quote
  #5  
Old 01-17-2017, 07:33 AM
jolson27 jolson27 is offline
What's HL7?
 
Join Date: Dec 2016
Location: Sioux Falls, SD
Posts: 4
jolson27 is on a distinguished road
Default

Even changing that, it did not change the error message. could it be the data types or Metadata causing issues? The datatypes are Delimited as that is what the unzipped file will be and the Metadata types are strings. The zip file is password protected, but from the error, it does not appear to be that as the issue.
Attached Files
File Type: xml H test.xml (16.7 KB, 17 views)
Reply With Quote
  #6  
Old 01-18-2017, 12:17 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 832
siddharth is on a distinguished road
Default

You really did assume that the file reader is going to unzip the files as well. That's not true. what you have to do is first pickup from sftp in binary, and write it to a local file directory, again in binary mode.
Then you have to extract the contents of the zip file either manually or through a java method, to get to the actual delimited text content that you are talking about.
Reply With Quote
  #7  
Old 01-18-2017, 05:33 AM
jolson27 jolson27 is offline
What's HL7?
 
Join Date: Dec 2016
Location: Sioux Falls, SD
Posts: 4
jolson27 is on a distinguished road
Default

I was not at this point expecting it to unzip. I am trying to do this in sections to make sure each part works. I just stuck on getting the file to whatever location I specify in my file. I have the binary selected and see in the xml that its set to true, but its not getting the file at this point. Do you see any reason why this would not be able to grab the file from the location and move it to the location I have setup? The destination is the basic that Mirth sets up when you do not setup one yourself. I am just focusing on getting the file right now.
Reply With Quote
Reply

Tags
file reader, mirth 3.x, sftp, sftp connection

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:25 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation