Troubleshooting
Problem
ERROR: CSocket::Receive failed: Unknown Explanation Connecting to GXS / OpenText / GE van
Symptom
"ERROR: CSocket::Receive failed: Unknown Explanation" when doing an FTP Send session to GXS EDI*Express in Active FTP mode.
ERROR: AtmReadStream returned 0
Gentran:Server for Windows correctly reconnects to the FTP host but does not resend all data.
Messages sent prior to the error and for which a FTP code "226[20]Closing[20]data[20]connection.[20]Requested[20]file[20]action[20]successful." was received from the FTP Host are not resent. However, those messages are not regarded as received by the FTP Host and cannot be found on the Host server.
Cause
GXS have upgraded their VAN software. Since then the error is produced. Here is a statement from GXS on the cause:
A file is not considered sent unless the put command is followed by another FTP command.
In the case of mput, the interchanges in the last file uploaded are not considered sent unless the command is followed by another FTP command. Thus, if an FTP client aborts or times out,
interchanges in the last file uploaded by the put command or the mput command are not
considered sent.
A pwd command is the recommended command for confirmation purposes.
The FTP quit command will end a session normally and is a valid command to confirm a previous put
Resolving The Problem
Change the script on the FTP mailbox in Gentran:Server for Windows.
Import and compile the following script:
// GEIS FTP
// define run-time variables
integer MsgId;
integer AtmId;
string[128] FileName;
FtpSetMode(BINARY);
// send procedure
LogMessage("***************************************************************");
LogMessage("Begin Send Procedure");
LogMessage("====================");
if DoSnd then
begin
LogMessage("Before FtpChangeDir(send)");
// FtpChangeDir("send");
LogMessage("After FtpChangeDir(send)");
LogMessage("======================");
LogMessage("Before MbxStartMsgLoop()");
LogMessage("========================");
MbxStartMsgLoop();
LogMessage("After MbxStartMsgLoop()");
LogMessage("=======================");
while ( MbxGetNextMsg(MsgId) != 0 ) do
begin
LogMessage("Before MbxStartAtmLoop(MsgId)");
LogMessage("=============================");
MbxStartAtmLoop(MsgId);
LogMessage("After MbxStartAtmLoop(MsgId)");
LogMessage("============================");
while ( MbxGetNextAtm(AtmId) != 0 ) do
begin
FtpChangeDir("send");
MbxGetAtmFileName(MsgId, AtmId, FileName);
LogMessage("After MbxGetAtmFileName(MsgId, AtmId, FileName)");
LogMessage("===============================================");
FtpSndAtm(MsgId, AtmId, FileName);
LogMessage("After FtpSndAtm(MsgId, AtmId, FileName)");
LogMessage("=======================================");
SndOK(MsgId, AtmId);
FtpChangeDir("..");
LogMessage("After SndOK(MsgId, AtmId)");
LogMessage("=========================");
end
SndOK(MsgId);
LogMessage("After SndOK(MsgId)");
LogMessage("==================");
end
LogMessage("Before FtpChangeDir(root)");
FtpChangeDir("..");
LogMessage("After FtpChangeDir(root)");
LogMessage("======================");
end
LogMessage("End Send Procedure");
LogMessage("***************************************************************");
// receive procedure
//LogMessage("***************************************************************");
//LogMessage("Begin Receive Procedure");
//LogMessage("=======================");
//if DoRcv then
// begin
// LogMessage("Before FtpChangeDir(receive)");
// FtpChangeDir("receive");
// LogMessage("Before FtpRcvMsg(GetFile)");
// LogMessage("=====================");
// FtpRcvMsgAll(1);
//LogMessage("Before FtpChangeDir(root)");
//FtpChangeDir("..");
//LogMessage("End Receive Procedure");
//LogMessage("***************************************************************");
FtpDoCmd("quit");
SetStatus(SUCCESS);
Note In the script we have used a Change Directory command (FtpChangeDir) instead of PWD which also works fine.
Historical Number
PRI9619
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21541854