Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to get the EPSV port from: CWD command successful. #415

Closed
FeodorFitsner opened this issue Jun 17, 2019 · 1 comment
Closed

Failed to get the EPSV port from: CWD command successful. #415

FeodorFitsner opened this issue Jun 17, 2019 · 1 comment

Comments

@FeodorFitsner
Copy link

FTP OS: Windows

FTP Server: Azure Web Sites

Computer OS: Ubuntu 18.04

.NET version: .NET Core 3.0 Preview 6

Getting Failed to get the EPSV port from: CWD command successful. on subsequent file upload to Azure Web Site FTP.

FTP client created as:

ftp = new FtpClient();

ftp.EnableThreadSafeDataConnections = false;
ftp.Host = serverAddress;
ftp.Credentials = new NetworkCredential(username, password);
ftp.DataConnectionType = FtpDataConnectionType.AutoPassive;
ftp.StaleDataCheck = false;

Logs :

[Verbose]: >         Connect()
[Info]: Status:   Connecting to 137.117.16.18:21
[Info]: Response: 220 Microsoft FTP Service
[Info]: Status:   Detected FTP server: WindowsServerIIS
[Info]: Command:  USER ftp-test\$ftp-test
[Info]: Response: 331 Password required
[Info]: Command:  PASS ***
[Info]: Response: 230 User logged in.
[Info]: Command:  FEAT
[Info]: Response: 211 END
[Verbose]: Response: 211-Extended features supported:
Response: LANG EN*
Response: UTF8
Response: AUTH TLS;TLS-C;SSL;TLS-P;
Response: PBSZ
Response: PROT C;P;
Response: CCC
Response: HOST
Response: SIZE
Response: MDTM
Response: REST STREAM
[Info]: Status:   Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
[Info]: Command:  OPTS UTF8 ON
[Info]: Response: 200 OPTS UTF8 command successful - UTF8 encoding now ON.
[Info]: Command:  SYST
[Info]: Response: 215 Windows_NT
[Info]: Status:   Auto-detected Windows listing parser

# Uploading artifact "FileZillaClient.exe" to FTP server "ftp://waws-prod-bay-003.ftp.azurewebsites.windows.net" as "site/wwwroot/downloads/appveyor-test/1.0.43/linux/FileZillaClient.exe"

[Verbose]: >         DirectoryExistsAsync("site/wwwroot/downloads/appveyor-test/1.0.43/linux")
[Verbose]: >         GetWorkingDirectoryAsync()
[Info]: Command:  PWD
[Info]: Response: 257 "/" is current directory.
[Info]: Command:  CWD site/wwwroot/downloads/appveyor-test/1.0.43/linux
[Info]: Response: 550 The system cannot find the path specified. 

# Creating remote directory "site/wwwroot/downloads/appveyor-test/1.0.43/linux"...

[Verbose]: >         CreateDirectoryAsync("site/wwwroot/downloads/appveyor-test/1.0.43/linux", True)
[Verbose]: >         DirectoryExistsAsync("site/wwwroot/downloads/appveyor-test/1.0.43")
[Verbose]: >         GetWorkingDirectoryAsync()
[Info]: Command:  PWD
[Info]: Response: 257 "/" is current directory.
[Info]: Command:  CWD site/wwwroot/downloads/appveyor-test/1.0.43
[Info]: Response: 550 The system cannot find the file specified. 
[Verbose]: Status:   Create non-existent parent directory: site/wwwroot/downloads/appveyor-test/1.0.43
[Verbose]: >         CreateDirectoryAsync("site/wwwroot/downloads/appveyor-test/1.0.43", True)
[Verbose]: >         DirectoryExistsAsync("site/wwwroot/downloads/appveyor-test")
[Verbose]: >         GetWorkingDirectoryAsync()
[Info]: Command:  PWD
[Info]: Response: 257 "/" is current directory.
[Info]: Command:  CWD site/wwwroot/downloads/appveyor-test
[Info]: Response: 250 CWD command successful.
[Info]: Command:  CWD /
[Info]: Response: 250 CWD command successful.
[Verbose]: >         DirectoryExistsAsync("site/wwwroot/downloads/appveyor-test/1.0.43")
[Verbose]: >         GetWorkingDirectoryAsync()
[Info]: Command:  PWD
[Info]: Response: 257 "/" is current directory.
[Info]: Command:  CWD site/wwwroot/downloads/appveyor-test/1.0.43
[Info]: Response: 550 The system cannot find the file specified. 
[Verbose]: Status:   CreateDirectory site/wwwroot/downloads/appveyor-test/1.0.43
[Info]: Command:  MKD site/wwwroot/downloads/appveyor-test/1.0.43
[Info]: Response: 257 "site/wwwroot/downloads/appveyor-test/1.0.43" directory created.
[Verbose]: Status:   CreateDirectory site/wwwroot/downloads/appveyor-test/1.0.43/linux
[Info]: Command:  MKD site/wwwroot/downloads/appveyor-test/1.0.43/linux
[Info]: Response: 257 "site/wwwroot/downloads/appveyor-test/1.0.43/linux" directory created.
OK

#Uploading "site/wwwroot/downloads/appveyor-test/1.0.43/linux/FileZillaClient.exe"...

[Verbose]: >         OpenWriteAsync("site/wwwroot/downloads/appveyor-test/1.0.43/linux/FileZillaClient.exe", Binary)
[Info]: Command:  TYPE I
[Info]: Response: 200 Type set to I.
[Verbose]: >         OpenPassiveDataStreamAsync(AutoPassive, "STOR site/wwwroot/downloads/appveyor-test/1.0.43/linux/FileZillaClient.exe", 0)
[Info]: Command:  EPSV
[Info]: Response: 229 Entering Extended Passive Mode (|||10100|)
[Info]: Status:   Connecting to 137.117.16.18:10100
[Info]: Command:  STOR site/wwwroot/downloads/appveyor-test/1.0.43/linux/FileZillaClient.exe
[Info]: Response: 125 Data connection already open; Transfer starting.
[Verbose]: Status:   Disposing FtpSocketStream...
[Verbose]: Status:   Disposing FtpSocketStream...
OK

# Uploading artifact "node-v10.16.0-win-x64.7z" to FTP server "ftp://waws-prod-bay-003.ftp.azurewebsites.windows.net" as "site/wwwroot/downloads/appveyor-test/1.0.43/linux/node-v10.16.0-win-x64.7z"

[Verbose]: >         DirectoryExistsAsync("site/wwwroot/downloads/appveyor-test/1.0.43/linux")
[Verbose]: >         GetWorkingDirectoryAsync()
[Info]: Command:  PWD
[Info]: Response: 226 Transfer complete.
[Warn]: Warning:  Failed to parse working directory from: Transfer complete.
[Info]: Command:  CWD site/wwwroot/downloads/appveyor-test/1.0.43/linux
[Info]: Response: 257 "/" is current directory.
[Info]: Command:  CWD .
[Info]: Response: 250 CWD command successful.

# Uploading "site/wwwroot/downloads/appveyor-test/1.0.43/linux/node-v10.16.0-win-x64.7z"...

[Verbose]: >         OpenWriteAsync("site/wwwroot/downloads/appveyor-test/1.0.43/linux/node-v10.16.0-win-x64.7z", Binary)
[Verbose]: >         OpenPassiveDataStreamAsync(AutoPassive, "STOR site/wwwroot/downloads/appveyor-test/1.0.43/linux/node-v10.16.0-win-x64.7z", 0)
[Info]: Command:  EPSV
[Info]: Response: 250 CWD command successful.
[Info]: Command:  QUIT
[Info]: Response: 229 Entering Extended Passive Mode (|||10102|)
[Verbose]: Status:   Disposing FtpSocketStream...
Failed to get the EPSV port from: CWD command successful.

Could you spot a problem from these logs? Please let me know if you have more information.

Thank you!

@robinrodricks
Copy link
Owner

How is this a bug with FluentFTP if Azure FTP service is performing incorrectly? As far as I can tell, the 229 Entering Extended Passive Mode is being sent after the QUIT command which does not make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants