Issues with SFTP Get Files command
Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
If you need a quicker response, please create a support ticket via the customer portal my.goanywhere.com or contact our support team by email at [email protected].
8 posts
Page 1 of 1
- Posts: 8
- Joined: Tue Dec 06, 2016 2:33 pm
Guten Tag!
I created a project that connects via SFTP and grabs a file to place it somewhere on our server. However, according to the debug I posted below, it looks like the connection closes after it attempts to get the file. I am at a lost as the only thing I am told by this debug is ERROR bad message and "Routing the control to the module 'failed'.
I created a project that connects via SFTP and grabs a file to place it somewhere on our server. However, according to the debug I posted below, it looks like the connection closes after it attempts to get the file. I am at a lost as the only thing I am told by this debug is ERROR bad message and "Routing the control to the module 'failed'.
Code: Select all
Dec 20, 2016 10:33:30 AM INFO ******************** Debug Mode ********************
Dec 20, 2016 10:33:30 AM INFO Executing project 'FTP Rec'
Dec 20, 2016 10:33:30 AM INFO Project location: C:\Program Files\Linoma Software\GoAnywhere\userdata\projects\awright\FTP Rec.xml
Dec 20, 2016 10:33:30 AM INFO Executing module 'Main'
Dec 20, 2016 10:33:33 AM INFO Executing task 'sftp 1.0 (####)'
Dec 20, 2016 10:33:33 AM INFO Connecting to '####' at port '####' as user '####'
Dec 20, 2016 10:33:35 AM INFO Executing sub-task 'get'
Dec 20, 2016 10:33:35 AM INFO Closed the FTP connection
Dec 20, 2016 10:33:35 AM INFO Closed the FTP connection
Dec 20, 2016 10:33:35 AM ERROR Bad message
Dec 20, 2016 10:33:35 AM INFO Routing the control to the module 'Failed'
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
Please email or post your full project XML and Debug Joblog.
You can email this to our [email protected] or post it here.
We need to see this to give a full recommendation as to what's happening.
You can email this to our [email protected] or post it here.
We need to see this to give a full recommendation as to what's happening.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
- Posts: 8
- Joined: Tue Dec 06, 2016 2:33 pm
Sorry about that, I knew I was forgetting something. Here is the code.
Code: Select all
<project name="FTP Rec" mainModule="Main" version="2.0" logLevel="verbose">
<module name="Main">
<sftp label="Harcros" resourceId="####" host="####" port="####" user="####" password="####" timeout="30" connectionRetryAttempts="1" connectionRetryInterval="5" version="1.0" onError="call:Failed">
<get destinationDir="folderX" whenFileExists="rename">
<fileset dir="folderY" recursive="false">
<wildcardFilter>
<include pattern="*.*.*" caseSensitive="true" />
</wildcardFilter>
</fileset>
</get>
</sftp>
<exitProject version="1.0" />
</module>
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
If you're SFTP resource is defined under your Resources, then you shouldn't need the additional information in your Project. It should just look like this:
<sftp label="Harcros" resourceId="####" version="1.0" onError="call:Failed">
Also, when retrieving all files from a folder, you can just designate the FileSet Folder without any filters. It should look like this:
<get destinationDir="folderX" whenFileExists="rename">
<fileset dir="folderY" recursive="false"/>
</get>
Try those changes and see what happens.
<sftp label="Harcros" resourceId="####" version="1.0" onError="call:Failed">
Also, when retrieving all files from a folder, you can just designate the FileSet Folder without any filters. It should look like this:
<get destinationDir="folderX" whenFileExists="rename">
<fileset dir="folderY" recursive="false"/>
</get>
Try those changes and see what happens.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
- Posts: 8
- Joined: Tue Dec 06, 2016 2:33 pm
Guten Tag,
I tried what you suggested and got the same error message as before, it attempts to execute sub-task 'get' and then the ftp connection closes with a Bad message Error. "Routing the control to the module 'failed'". Here is the revised script.
I tried what you suggested and got the same error message as before, it attempts to execute sub-task 'get' and then the ftp connection closes with a Bad message Error. "Routing the control to the module 'failed'". Here is the revised script.
Code: Select all
<project name="FTP Rec" mainModule="Main" version="2.0" logLevel="verbose">
<module name="Main">
<sftp label="Harcros" resourceId="####" host="####" port="####" user="####" password="####" timeout="30" connectionRetryAttempts="1" connectionRetryInterval="5" version="1.0" onError="call:Failed">
<get destinationDir="folderX" whenFileExists="rename">
<fileset dir="folderY" recursive="false"/>
</get>
</sftp>
<exitProject version="1.0" />
</module>
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
Please send me your full Project XML as well as the latest JobLog in DEBUG mode.
This way I can review it...
This way I can review it...
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
- Posts: 8
- Joined: Tue Dec 06, 2016 2:33 pm
Here is the entire code:
Code: Select all
Debug:<project name="Harcros FTP Rec" mainModule="Main" version="2.0" logLevel="verbose">
<module name="Main">
<sftp label="Harcros" resourceId="Harcros Sunset" host="#####" port="#####" user="#####" password="#####" timeout="30" connectionRetryAttempts="1" connectionRetryInterval="5" version="1.0" onError="call:Failed">
<get destinationDir="FolderX" whenFileExists="rename">
<fileset dir="FolderY" recursive="false" />
</get>
</sftp>
<exitProject version="1.0" />
</module>
<module name="Failed" disabled="true">
<sendEmail resourceId="Delek Mail" toList="####" version="2.0">
<from address="[email protected]" />
<subject>
<![CDATA[Harcros FTP Rec Failed]]>
</subject>
<message>
<![CDATA[Did not receive acknowledgement. Check to see if a 210 was sent . If there is not one, contact Harcros and make sure they receive interchange.]]>
</message>
</sendEmail>
<exitProject version="1.0" />
</module>
</project>
Code: Select all
Jan 6, 2017 9:39:37 AM INFO Start Date and Time: 1/6/17 9:39:37 AM
Jan 6, 2017 9:39:37 AM INFO Job Number: 1000000000295
Jan 6, 2017 9:39:37 AM INFO Project Name: /jwright/Harcros FTP Rec
Jan 6, 2017 9:39:37 AM INFO Submitted By: jwright
Jan 6, 2017 9:39:37 AM INFO Submitted From: Administrator UI
Jan 6, 2017 9:39:37 AM INFO GoAnywhere 5.3.4 running on Windows Server 2012 6.2 (amd64)
Jan 6, 2017 9:39:38 AM INFO ******************** Debug Mode ********************
Jan 6, 2017 9:39:38 AM INFO Executing project 'Harcros FTP Rec'
Jan 6, 2017 9:39:38 AM INFO Project location: C:\Program Files\Linoma Software\GoAnywhere\userdata\projects\jwright\Harcros FTP Rec.xml
Jan 6, 2017 9:39:38 AM INFO Executing module 'Main'
Jan 6, 2017 9:39:50 AM INFO Executing task 'sftp 1.0 (Harcros)'
Jan 6, 2017 9:39:50 AM INFO Connecting to '####' at port '####' as user '####'
Jan 6, 2017 9:39:51 AM INFO Executing sub-task 'get'
Jan 6, 2017 9:39:51 AM INFO Closed the FTP connection
Jan 6, 2017 9:39:51 AM ERROR Bad message
Jan 6, 2017 9:39:51 AM INFO Routing the control to the module 'Failed'
Jan 6, 2017 9:39:51 AM INFO Executing task 'sendEmail 2.0'
Jan 6, 2017 9:39:51 AM INFO Connecting to mail server: ####
Jan 6, 2017 9:39:51 AM INFO Opened the connection
Jan 6, 2017 9:39:51 AM INFO Message is delivered successfully
Jan 6, 2017 9:39:51 AM INFO Message 'Harcros FTP Rec Failed' was sent to 1 recipient(s)
Jan 6, 2017 9:39:51 AM INFO The message has been delivered to the following 1 addresses:
J####
Jan 6, 2017 9:39:51 AM INFO Closed the connection
Jan 6, 2017 9:39:51 AM INFO Finished task 'sendEmail 2.0'
Jan 6, 2017 9:39:51 AM INFO Executing task 'exitProject 1.0'
Jan 6, 2017 9:39:51 AM INFO Exiting project 'Harcros FTP Rec'
Jan 6, 2017 9:39:51 AM INFO Finished task 'exitProject 1.0'
Jan 6, 2017 9:39:51 AM INFO Finished project 'Harcros FTP Rec'
Jan 6, 2017 9:39:51 AM INFO End Date and Time: 1/6/17 9:39:51 AM
- Posts: 8
- Joined: Tue Dec 06, 2016 2:33 pm
Guten Tag,
I managed to figure out what the problem was. It turned out to be a permissions issue on the server I was connecting to. Once I got that taken care of it worked without any further issue. A note to anyone reading this. It may not say anything in the GoAnywhere logs, but make sure you triple check permissions.
-Artis
I managed to figure out what the problem was. It turned out to be a permissions issue on the server I was connecting to. Once I got that taken care of it worked without any further issue. A note to anyone reading this. It may not say anything in the GoAnywhere logs, but make sure you triple check permissions.
-Artis
8 posts
Page 1 of 1