We have a SFTP set up and we are on version 9.8.0 - previous 9.4.5 I think. When the job runs it logs into the SFTP server, and then we ask it to download the files. It takes a while to download the files and it does not error. When we check the files it either shows half the csv file or 0kb. No error is determined by Visual cron and it moves on to the next task.
I found this error in the log files
Err DownloadSFTPFiles->Download failed - resuming. Error: SBSocket.EElSocketError: Wrong socket state 0 in Receive
at SBSocket.TElSocket.Receive(Byte[]& Data, Int32 DataLen, Int32& Received)
at SBSocketClient.TElBaseSocketClient.DoReceive(Object Sender, Byte[]& Buffer, Int32 MaxSize, Int32& Written)
at SBSSHCommon.TElSSHClass.DoReceive(Byte[]& Buffer, Int32 MaxSize, Int32& Written)
at SBSSHClient.TElSSHClient.DataAvailable()
at SBSocketClient.TElBaseSocketClient.DataAvailable()
at SBSocketClient.TElBaseSocketClient.DoMessageLoop(Boolean NoPeek)
at SBSftpCommon.TSBSftpMessageLoopEvent.Invoke()
at SBSftp.TElSftpClient.OpenFile(String Filename, Int32 Modes, TElSftpFileAttributes Attributes)
at SBSftp.TElSftpClient.OpenFileSync(String Filename, Int32 Modes, TElSftpFileAttributes Attributes)
at SBSftp.TElSftpStream..ctor(TElSftpClient AOwner, String Filename, Int32 Modes)
at SBSftp.TElSftpClient.OpenStream(String Filename, Int32 Modes)
at VisualCronService.RemoteFileAPI.DownloadSFTPFile(ConnectionClientClass cc, Boolean bolKeepCreatedModifiedDate, FileStream wStream, RemoteFileInfoClass rfi, FileMode fm, TSBFileTransferMode tm, String strLocalFilePath, Int32& intTotalFiles, TaskProcessClass tpc, Boolean bolDebugging) in C:\git\code\VisualCronService\Connections\apiRemoteFile.vb:line 1800
at VisualCronService.RemoteFileAPI.DownloadSFTPFiles(TaskFoundationClass tf, ConnectionClientClass cc, ConnectionHandlerClass ch, String strConnectionId, List`1 files, String originalSaveFolder, FTPDownloadCommandClass downloadCommand, Int32& intTotalFiles, Boolean& active, VariableReplacerClass VR, TaskProcessClass tpc, Boolean
I found
https://www.visualcron.c....aspx?g=posts&t=5038 on the forum but there is no resolution.
Could some one advise how to fix this?
The other thing is I have 2 other jobs that touch the same SFTP server and download different CSV files but do not have the issue for 1 of them. The other one is showing this issue as well where the file is cut in half or a small portion downloads or a 0kb file.
Please advise
Thanks
Mike