I am trying to use the ftp plugins with the latest version of FB 5.
When I try to use a change directory and that directory has spaces in the folder names I get a "Change directory failes. Connection Closed Gracefully."
I tried to put the path within double quotes or not but it does not change anything.
So I tried to see what was passed by checking the option "Detailed FTP Logging" but it does not affect the log output at all. In the help it stated that it would show me the RAW ftp command used but I cannot see them from my live log. Anything I missed on this?
I'm afraid that you haven't provided quite enough information for us to resolve this. What FTP Server are you connecting to? Are you able to find any information from the FTP Server logs?
I tried this here with the IIS 6 FTP server and it works fine. The CWD command is logged (and correctly quoted by FinalBuilder.)
If the connection is closing before this command is issued then my guess is that the remote computer may have closed it for another reason, or closed it in immediate reponse to the CWD command.
Can you verify that connecting via the command line 'ftp' tool and changing to the remote directory works properly?
I am connecting to vsFtp2.0.1 on a linux machine (RET had enterprise 4 I think).
I did try with the windows DOS ftp command and it gives me the same message if I try to use the path without double quoting it.
To be certain that the connection is still alive I have adde an "FTP cehck if connected" action right before the "FTP Change directory" and it states that the connection is live so...
I will try tomorrow to take a look at the logs on the server to see if there are any messages there.
I checked again and the CWD command is actually producing the command without double-quotes. This is different from the CD command in the FTP client though. I took a look at the FTP RFC and it isn’t specific about whether you need to quote paths or not, so it may be a server-specific variation.
If it’s a linux server there’s a vague offchance that escaping space as '\ ’ might work.
In fact the problem is not related to the long filename, I changed the path to use all shortnames and it failed the same.
The problem could probably due to the fact that my connection has timedout (then there might be a bug in the FB action "FTP check if connected" because it reports that the connection is still alive). The actions between two of my ftp actions are very long so that might be it.
This said it would definitively help if the option "Detailed ftp logging" would work .
I will need IT to take a look at the timeout tomorrow...
Detailed FTP logging should work in most/all situations. My guess is that before the action when the action went to send the “CWD” command, the control connection had already closed - so the command was never sent, and consequently never logged.
You may be right that the “Check if connected” action does not correctly detect when the other end closes a control connection in some circumstances. I’ll take a look at that.
If it’s possible, using a NOP action like “Get Current Directory” action to refresh the connection periodically may work. Alternatively, using two separate connections (disconnect and reconnect later) may work.
Oh yeah, that one... I forgot about it! Thank Tate.
Daniel, I modified the Check if Connected action so it actually runs a PWD command as well as checking the connection status. (I would have used the NOOP command but apparently some servers don't support it.) That should make it fairly resistant to un-noticed connection dropouts.
Hello Angus, Thanks for the test version, I won’t be able to test it until next week, I was right, I get disconnected so I fixed the problem by having a separate connection for each part requiring ftp access for now. Hopefully you version fixes that and I can use the “check if connected” feature, simplifying the process.
Thanks for the tip Tate but that is of no use in my case, I do fetch files by ftp then compile them with InstallShield and it takes about 20 minutes to build the setup so I cannot put no-ops in between (unless you can tell me a way to).
So for now I am up and running, I will test the new version next week.