Archived Forum Post

Index of archived forum posts


Ftp2 Putfile ( hangs "Already received close-notify" when server goes down

Sep 23 '15 at 11:02

When sending with active-x ftp2, we set the connection, send files and when done we close the connection. What we experienced: we had 8 files to send. 4 went well. 3 got errors and the 8th one caused a loop hanging up Chilkat and the calling programm.

First thing we did afterwards was change the calling programm to exit after the first error. We just try connect/send again later. And catch DebugLogFilePath (instead of lasterror only) output.

To replay the error we put a bit more files in place. Server started. Connect done, some files get sent and then we shutdown the server triggering the error. And indeed Chilkat does not seem to handle ok. The DebugLogFilePath's file ends with just lines "Already received close-notify." Growing rapidly while PutFile does not seem to react to any timeout.

    DllDate: Aug 26 2015
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 1
    LocalFilename: XML.P
    RemoteFilename: XML.P
        enabled: yes
        heartbeatMs: 0
        sendBufferSize: 65536
    IdleTimeoutMs: 60000
    ReceiveTimeoutMs: 60000
    ConnectTimeoutSeconds: 30
        localFileSize: 9927
            initialGreeting: 220-hi this is our ftps test
            restartNext: 0
            modeZ: 0
            binaryMode: 1
                                    level: warning
                                    descrip: close notify
                            Already received close-notify.
                            Already received close-notify.
                            Already received close-notify.
                            Already received close-notify.
Etc, etc, ...

The code is simple:

success = ckftp.PutFile(LocalFile,RemoteFile)
If (success <> 1) Then
  'oke code
  'not oke code
End If

Meanwhile because it could always happen that a ftp server goes down, we have made a nasty workaround starting another vbs (with a timer) prior to the putfile which checks if a putfile ends normal. However we do not like this overhead.

Is the putfile method handled correctly here? I suppose not. Could it be we are doing something wrong?

Many thanks in advance.


Thanks Ben,

I made a change to hopefully prevent this from happening. Please check to see if this new build fixes the problem:

32-bit Download:
64-bit Download: