0 votes
by (140 points)
edited by

Hi Team,

We are recently upgraded to latest version of Rebex.

While getting ftp connection we are receiving an 550 error folder not found.

My FTP folder path is /Forecast21/DTIFTPUpdate/ but if from code when trying to connect to ftp through method Client.ChangeDirectory
its adding "Folder " extra from response and receiving an error "Folder /Forecast21/DTI
FTPUpdate/ not found (550)".

Note : Folder / is getting added extra while trying to execute method Client.ChangeDirectory

Code Snippet :

Try

Client.ChangeDirectory("Forecast21/DTI_FTPUpdater")

Catch ex As Exception

ex says : Folder /Forecast21/DTI_FTPUpdate/ not found (550)

Public Sub ResponseRead(ByVal sender As Object, ByVal e As FtpResponseReadEventArgs)

ResponseRead entered: " & e.Response

End Sub

e.Response returns reasonse: Folder /Forecast21/DTI_FTPUpdate/ not found (550)

Please help us soon as this have broken our functionality on production server and customers are crying, we really need help soon on this.

Do let me know if you know more information but we have recently upgraded to Rebex latest version.

Refrence dll are :
Rebex.Common
Rebex.FTP
Rebex.Networking

Your help will be highly appreciable.

Thanks,
Lakhdeep Kumar

Applies to: Rebex FTP/SSL
by (147k points)
Please create a communication log of the FTP session using Ftp object's LogWriter property (as described at https://www.rebex.net/kb/logging/) and either post it here or mail it to support@rebex.net for analysis. The log should make it possible to tell what is going on. Thanks!
by (140 points)
edited by
Hi Lukas,
                  Thanks for your reply , i sent an well as well  on support@rebex.net and adding details here as well.

I added logs and below are the error logs details got logged  from rebex logging framework :

2021-08-04 14:55:54.218 Opening log file.
2021-08-04 14:55:54.220 INFO FileLogWriter(2)[1] Info: Assembly: Rebex.Common R5.2 for .NET 4.0-4.8
2021-08-04 14:55:54.222 INFO FileLogWriter(2)[1] Info: Platform: Windows 6.2.9200 32-bit; CLR: 4.0.30319.42000
2021-08-04 14:55:54.223 DEBUG FileLogWriter(2)[1] Info: Culture: en; Windows-1252
2021-08-04 14:55:54.224 INFO Ftp(3)[1] Command: CWD /Forecast21/DTI_FTPUpdater/
2021-08-04 14:55:54.537 INFO Ftp(3)[1] Response: 550 Folder /Forecast21/DTI_FTPUpdater/ not found
2021-08-04 14:55:54.558 ERROR Ftp(3)[1] Info: Rebex.Net.FtpException: Folder /Forecast21/DTI_FTPUpdater/ not found (550).
   at Rebex.Net.Ftp.znxok(Int32 p0, Boolean p1)
   at Rebex.Net.Ftp.uglzt(String p0, ziiws p1)
2021-08-04 14:55:59.647 INFO Ftp(3)[1] Command: QUIT
2021-08-04 14:55:59.975 INFO Ftp(3)[1] Response: 221 bye
2021-08-04 14:55:59.975 DEBUG Ftp(3)[1] TLS: Closing TLS socket.
2021-08-04 14:55:59.976 DEBUG Ftp(3)[1] TLS: Alert:CloseNotify was sent.

1 Answer

0 votes
by (147k points)

We tried reproducing this issue based on the information you provided, but unfortunately, FtpResponseReadEventArgs.Response behaved as expected in all our tests so far, with half dozen of different FTP servers.

Could you please download the source code for our test app (VB.NET console application for .NET 4.0) and give it a try in your environment with your FTP server?

by (140 points)
Thanks for your response , I am checking the issue on production servers.

Thanks,
Lakhdeep Kumar
by (140 points)
Hi Lukas,

Our FTP server suddenly stopped connecting  through Rebex library and we want your guidance here if you can help us.

We are accessing path /Forecast21/DTI_FTPUpdater/ in our ftp server where Forecast21 and DTI_FTPUpdater are sub directories in ftp server. This was working fine but suddenly we are start getting  error message “550 Folder /Forecast21/DTI_FTPUpdater/” not found.

Note :This issue gott resolved if we remove forward and backward slash from code means if we use path  like Forecast21/DTI_FTPUpdater  and ftp server start getting connected. But our question is why suddenly it stopped working with forward and backward slash  “/Forecast21/DTI_FTPUpdater/” and we have no clue on this . Can you please guide us if there are any ftp settings something we have to change , any additional information on cause of this issue will be helpful.


Error logs created through Rebex logger are :

2021-08-04 14:55:54.218 Opening log file.
2021-08-04 14:55:54.220 INFO FileLogWriter(2)[1] Info: Assembly: Rebex.Common R5.2 for .NET 4.0-4.8
2021-08-04 14:55:54.222 INFO FileLogWriter(2)[1] Info: Platform: Windows 6.2.9200 32-bit; CLR: 4.0.30319.42000
2021-08-04 14:55:54.223 DEBUG FileLogWriter(2)[1] Info: Culture: en; Windows-1252
2021-08-04 14:55:54.224 INFO Ftp(3)[1] Command: CWD /Forecast21/DTI_FTPUpdater/
2021-08-04 14:55:54.537 INFO Ftp(3)[1] Response: 550 Folder /Forecast21/DTI_FTPUpdater/ not found
2021-08-04 14:55:54.558 ERROR Ftp(3)[1] Info: Rebex.Net.FtpException: Folder /Forecast21/DTI_FTPUpdater/ not found (550).
   at Rebex.Net.Ftp.znxok(Int32 p0, Boolean p1)
   at Rebex.Net.Ftp.uglzt(String p0, ziiws p1)
2021-08-04 14:55:59.647 INFO Ftp(3)[1] Command: QUIT
2021-08-04 14:55:59.975 INFO Ftp(3)[1] Response: 221 bye
2021-08-04 14:55:59.975 DEBUG Ftp(3)[1] TLS: Closing TLS socket.
2021-08-04 14:55:59.976 DEBUG Ftp(3)[1] TLS: Alert:CloseNotify was sent.

Thanks,
Lakhdeep
by (147k points)
Well, if this suddenly stopped working, and there has been no change at the client side, then a server-side configuration change (or an upgrade that changed some behavior) might be to blame. For example, the FTP protocol has a concept of current directory, and if you issue "CWD Forecast21/DTI_FTPUpdater", the path is interpreted as relative to the current directory. If the current directory was the root directory ("/"), then "CWD Forecast21/DTI_FTPUpdater" and "CWD /Forecast21/DTI_FTPUpdater" would be equivalent commands. However, if the current directory was something else, meaning of the two commands would be different.
...