Error code 40426 - WeOnlyDo Discussion board

Error code 40426 (General questions)

by goondoo27, Thursday, April 14, 2005, 21:48 (6974 days ago)

I have an automated FTP program that puts files onto an FTP server on a scheduled basis. It runs fine at several locations, but at one customer I keep seeing error:

40426 (Transfere aborted. An established connection was aborted by the software in your host machine.)

It occurs during the PUT operation. When this happens my program automatically closes the connection. Then the next time an FTP is attempted the server is connected to successfully, the directory list is successfully read, and the PUT is started. But after the 40426 error happens the next PUT always returns error code:

10060 (The current connection has timeout.)

Again the program closes the connection and tries again with another 10060 error. This will continue until the program is shutdown and restarted. After it restarts, all FTPs work properly (at least until the 40426 error happens again).

My questions are:
1) Is there any known problems that would explain this behavior?
2) What can I do to recover from the initial 40426 error?
3) There is a spelling error on the output for 40426 (i.e. Transfere).

I'm using version 2.3.1, and I will be upgrading to version 2.3.9.

Any help is appreciated,
John

Re: Error code 40426

by wodSupport, Thursday, April 14, 2005, 22:44 (6974 days ago) @ goondoo27

John,

it's hard to say why that happens. Can you please add debugging code in FTPReply event like this:

Debug.Print Command & <SPACE> & ReplyText

and then send me that debug dump on techsupport@weonlydo.com ? It will contain your password, feel free to remove it from the dump.

Re: Error code 40426

by goondoo27, Monday, April 18, 2005, 21:21 (6970 days ago) @ wodSupport

Will do. Give me some time to get the code in, sent to site, reproduce the problem, and send the results to you. I figure this will take about a week.

Thanks,
John

Re: Error code 40426

by goondoo27, Saturday, April 30, 2005, 19:46 (6958 days ago) @ goondoo27

I upgraded to the latest version 2.3.9 put in the debugging code, installed it at site, and the problem hasn't happened yet. I'll continue to monitor the system...

John

Re: Error code 40426

by goondoo27, Monday, May 09, 2005, 23:27 (6949 days ago) @ goondoo27

Ok, the problem happened again. After running for over a week with version 2.3.9, the automated FTP job stopped working. This time the first failure was error code 10060 Connection timed out. After this happens the FTP job will no longer connect until the program is restarted.

When I get error code 10060, the code does a disconnect:

ftpX.Disconnect True


But since it never recovers from this should it do something else? Force disconnect?

Thanks,
John

Re: Error code 40426

by wodSupport, Monday, May 09, 2005, 23:46 (6949 days ago) @ goondoo27

Yes, force disconnect, and then grab new instance of wodFtpDLX for next try.

Re: Error code 40426

by goondoo27, Friday, May 13, 2005, 17:41 (6945 days ago) @ wodSupport

I just modified the error code. It now does the following:

ftpX.Disconnect False
Set ftpX = Nothing
Set ftpX = New wodFtpDLXCom
...set some properties...

Then on the next FTP interval it will go through the standard connection code. I'll put it out at the customer site and let you know if it fails.

Re: Error code 40426

by goondoo27, Wednesday, May 25, 2005, 03:40 (6934 days ago) @ goondoo27

Well it died again with error 10060. I changed the code again to always get a new instance of the control after every automated FTP job (regardless of whether the job succeeds or fails). I'll let you know if it works or if the FTP control doesn't recover once it gets a 10060 error again...

Thanks,
John

Re: Error code 40426

by wodSupport, Wednesday, May 25, 2005, 11:35 (6934 days ago) @ goondoo27

John,

I wish I could run your code to see why this happens. If it's a bug, it would be fixed ASAP.

Re: Error code 40426

by goondoo27, Tuesday, June 07, 2005, 22:36 (6920 days ago) @ wodSupport

Great News! It looks like we've finally licked the problem. I've seen the 10060 error on several systems and the control recovers from it everytime. The fix was to rebuild a new instance of the control everytime I use it. When the FTP timer hits, the first thing the code does is go through this code:

Private Sub ProvisionFTP()
On Error Resume Next

'Start from a known state
Set ftpX = Nothing

'Create the ftp component
Set ftpX = New wodFtpDLXCom

'We Only Do Components: FTP Control
ftpX.Authentication = authPassword
ftpX.Blocking = False
ftpX.DirFormat = fmtAuto
ftpX.Passive = True
ftpX.Protocol = wodFtpDLXComLib.ProtocolsEnum.FTP
ftpX.TransferMode = Binary
ftpX.StrictHost = False
ftpX.LicenseKey = youdidntthinkidputthisinhere
End Sub


This clears out the old instance and builds a new one just before the ftpX.Connect method is hit. It works great! Thanks for all of the suggestions and assistance.

John

Re: Error code 40426

by Dave, Friday, July 01, 2005, 09:12 (6897 days ago) @ goondoo27

So you haven't actually fixed the problem...?

This solution works around the issue but the actual problem still remains.

I'm having a similar problem with a home made FTP class and it looks like the socket every now and then randomly hangs and then times our after 15 mins. When sending subsequent commands to the FTP server I get the An establish connect was aborted... error.

Very keen to find out why the connection hangs...

Re: Error code 40426

by wodSupport, Friday, July 01, 2005, 09:25 (6897 days ago) @ Dave

Dave,

I'm not sure what's the problem actually, so we don't know what to fix. We need to identify the problem and duplicate it, and so far we were unlucky doing so. I haven't got other reports about this issue, so if there's anyone having same issues and can reproduce them at will, I would appreciate they contact us.