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

425 Error while transfering data: ECONNABORTED - Connection aborted #41

Open
itapk opened this issue May 17, 2024 · 2 comments
Open

425 Error while transfering data: ECONNABORTED - Connection aborted #41

itapk opened this issue May 17, 2024 · 2 comments

Comments

@itapk
Copy link

itapk commented May 17, 2024

Have no clue what is happening here.
But the check in the transfer is giving me an Failed.
But the file is getting transferred.
can you see where i'm going wrong?

As for now, i'm doing a check, to see if it's gets transferred or not.
And ignoring the output the module is giving me.
But would love to use the modules feedback...

And yes, i can download data, without getting an error.

Connect-FTP -Server 'host IP' -Verbose -Credential $MyCredential -EncryptionMode Implicit -DataConnectionType AutoPassive -ValidateAnyCertificate -Port 990

PS C:\Users\itapksu> test-FTPFile -Client $Client -RemotePath $SQLRemotepath -ErrorAction Continue

# FileExists("./Download/DBL_Sql_Dump/uniclogins.csv")
Command:  SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Status:   Waiting for response to: SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Response: 550 Couldn't open the file or directory [1ms]
False
PS C:\Users\itapksu> 
PS C:\Users\itapksu> Send-FTPFile -Client $Client -LocalPath $SQLFile.FullName -RemotePath $SQLRemotepath

# UploadFile("C:\FTPS_Folder\SQLData\uniclogins.csv", "./Download/DBL_Sql_Dump/uniclogins.csv", Skip, False, None)

# FileExists("./Download/DBL_Sql_Dump/uniclogins.csv")
Command:  SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Status:   Waiting for response to: SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Response: 550 Couldn't open the file or directory [<1ms]

# OpenWrite("./Download/DBL_Sql_Dump/uniclogins.csv", Binary, -1, False)

# OpenDataStream("STOR ./Download/DBL_Sql_Dump/uniclogins.csv", 0)

# OpenPassiveDataStream(PASV, "STOR ./Download/DBL_Sql_Dump/uniclogins.csv", 0)
Command:  PASV
Status:   Waiting for response to: PASV
Response: 227 Entering Passive Mode (10,21,2,20,191,203) [1ms]
Status:   PASV advertised a non-routable IPAD. Using original connect dnsname/IPAD
Status:   Connecting to IP #1= 91.207.2.41:49099
Command:  STOR ./Download/DBL_Sql_Dump/uniclogins.csv
Status:   Waiting for response to: STOR ./Download/DBL_Sql_Dump/uniclogins.csv
Response: 150 Starting data transfer. [2ms]
Warning:  SSL Buffering disabled because of NOOPs requested
Status:   FTPS authentication successful, lib = .NET SslStream, cipher suite = Tls12 (Aes256, 44550, 255) [2ms]
Status:   Uploaded 200554 bytes
Status:   Closing/Disposing FtpSocketStream(data connection)
Status:   Waiting for response to: STOR ./Download/DBL_Sql_Dump/uniclogins.csv
Response: 425 Error while transfering data: ECONNABORTED - Connection aborted [9ms]
Status:   Failed to upload file.

Action          : UploadFile
Status          : False
IsSuccess       : False
IsSkipped       : False
IsSkippedByRule : False
IsFailed        : True
LocalPath       : C:\FTPS_Folder\SQLData\uniclogins.csv
RemotePath      : ./Download/DBL_Sql_Dump/uniclogins.csv
Message         : Failed

PS C:\Users\itapksu> test-FTPFile -Client $Client -RemotePath $SQLRemotepath -ErrorAction Continue                

# FileExists("./Download/DBL_Sql_Dump/uniclogins.csv")
Command:  SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Status:   Waiting for response to: SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Response: 213 200554 [1ms]
True
PS C:\Users\itapksu> 
@PrzemyslawKlys
Copy link
Member

  • First thing would be to upgrade FluentFTP to newest version, and then probably reply.
  • Second question would be related to what sort of FTP server it is.
  • Third did it ever work?

@itapk
Copy link
Author

itapk commented May 21, 2024

1#

PS C:\Users\itapksu> get-package -Name Transferetto

Name                           Version          Source                           ProviderName
----                           -------          ------                           ------------
Transferetto                   1.0.0            https://www.powershellgallery.c… PowerShellGet

PS C:\Users\itapksu> get-package -Name FluentFTP   

Name                           Version          Source                           ProviderName
----                           -------          ------                           ------------
FluentFTP                      50.0.1           C:\Program Files\PackageManagem… NuGet

PS C:\Users\itapksu> 

Not sure if that what you ment

2#
It is a Filezilla FTP

3#
Well i just startede using your module same day i wrote the Issue, so no it have never worked.
And as i explained, the files are getting transferred, but the module is just reporting, that the transfer resulted in an error.

Here is a now run, after getting the FluentFTP package installed.

PS C:\Users\itapksu>     $SQLFileName = $SQlfile.Name
    $RemoteUploadPath = "./Download/DBL_Sql_Dump/"
    $SQLRemotepath = $RemoteUploadPath + $SQLFileName
    Send-FTPFile -Client $Client -LocalPath $SQLFile.FullName -RemotePath $SQLRemotepath -ErrorVariable MyError -ErrorHandling Throw -RemoteExists Overwrite
    $TransferControl = Test-FTPFile -Client $Client -RemotePath $SQLRemotepath -ErrorVariable MyError -ErrorAction Continue 
    $RemoteFile = Get-FTPList -Client $Client -Path $RemoteUploadPath | Where-Object { $_.Name -like "*$SQLFileName*" }
    $RemoteFile = $RemoteFile 
    $SQLFileDOY = $SQLFile.LastWriteTime.DayOfYear
    $RemoteFileDOY = $RemoteFile.Modified.DayOfYear
    if(($TransferControl -eq $true) -and ($SQLFileDOY -eq $RemoteFileDOY)){
        #Deletion is complete
        Write-Host "Transfered"
    }else {
        #Deletion failed
        Write-Host "Failed"
    }
Status:   Testing connectivity using Socket.Poll()...

# UploadFile("C:\FTPS_Folder\SQLData\uniclogins.csv", "./Download/DBL_Sql_Dump/uniclogins.csv", Overwrite, False, None)

# FileExists("./Download/DBL_Sql_Dump/uniclogins.csv")
Command:  SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Status:   Waiting for response to: SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Response: 550 Couldn't open the file or directory [1ms]

# OpenWrite("./Download/DBL_Sql_Dump/uniclogins.csv", Binary, -1, False)
Command:  TYPE I
Status:   Waiting for response to: TYPE I
Response: 200 Type set to I [<1ms]

# OpenDataStream("STOR ./Download/DBL_Sql_Dump/uniclogins.csv", 0)

# OpenPassiveDataStream(AutoPassive, "STOR ./Download/DBL_Sql_Dump/uniclogins.csv", 0)
Command:  EPSV
Status:   Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||49010|) [<1ms]
Status:   Connecting to IP #1= 91.207.2.41:49010
Command:  STOR ./Download/DBL_Sql_Dump/uniclogins.csv
Status:   Waiting for response to: STOR ./Download/DBL_Sql_Dump/uniclogins.csv
Response: 150 Starting data transfer. [1ms]
Warning:  SSL Buffering disabled because of NOOPs requested
Status:   FTPS authentication successful, lib = .NET SslStream, cipher suite = Tls12 (Aes256, 44550, 255) [3ms]
Status:   Uploaded 200998 bytes
Status:   Closing/Disposing FtpSocketStream(data connection)
Status:   Waiting for response to: STOR ./Download/DBL_Sql_Dump/uniclogins.csv
Response: 425 Error while transfering data: ECONNABORTED - Connection aborted [20ms]
Status:   Failed to upload file.

Action          : UploadFile
Status          : False
IsSuccess       : False
IsSkipped       : False
IsSkippedByRule : False
IsFailed        : True
LocalPath       : C:\FTPS_Folder\SQLData\uniclogins.csv
RemotePath      : ./Download/DBL_Sql_Dump/uniclogins.csv
Message         : Failed


# FileExists("./Download/DBL_Sql_Dump/uniclogins.csv")
Command:  SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Status:   Waiting for response to: SIZE /Download/DBL_Sql_Dump/uniclogins.csv
Response: 213 200998 [<1ms]

# GetListing("./Download/DBL_Sql_Dump", Auto)

# OpenDataStream("MLSD /Download/DBL_Sql_Dump", 0)

# OpenPassiveDataStream(AutoPassive, "MLSD /Download/DBL_Sql_Dump", 0)
Command:  EPSV
Status:   Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||49009|) [1ms]
Status:   Connecting to IP #1= 91.207.2.41:49009
Command:  MLSD /Download/DBL_Sql_Dump
Status:   Waiting for response to: MLSD /Download/DBL_Sql_Dump
Response: 150 Starting data transfer. [1ms]
Warning:  SSL Buffering disabled because of NOOPs requested
Status:   FTPS authentication successful, lib = .NET SslStream, cipher suite = Tls12 (Aes256, 44550, 255) [2ms]
+---------------------------------------+
Listing:  type=file;size=200998;modify=20240521071835.664;perms=awrfd; uniclogins.csv
-----------------------------------------
Status:   Closing/Disposing FtpSocketStream(data connection)

# CloseDataStream()
Status:   Waiting for response to: MLSD /Download/DBL_Sql_Dump
Response: 226 Operation successful [5ms]
Status:   Closing/Disposing FtpSocketStream(data connection)
Transfered
PS C:\Users\itapksu> 

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

No branches or pull requests

2 participants