From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FTP Get File Error

Solved!
Go to solution

Hi !

I'm trying to use  FTP_Get_File.vi in order to transfer a file from a ftp server to my computer. But each time I get the following message :

"Error 0 occured at ftp validate data connection : invalid data connection".

However, it works using a traditional FTP softwrae program (FileZilla) using the same Host/RemotePath/Password.

 

Anyone has an idea to help me understanding this error ? 

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 5
(5,516 Views)
Solution
Accepted by topic author CyGa

Hi

 

The FTP VIs are (at least up to LV 8.5) open, so you can dig in to see where the error occurs.

If it is a problem with the data connection (as the error says) you might want to try passive connection (boolean input of FTP_Get_File.vi).

 

Message 2 of 5
(5,513 Views)

Try changing the passive/active boolean input from whatever it is to the other option.  This is what I had to do when I got the same error.  I don't understand why it works, I just know that it did.

 

 

Message 3 of 5
(5,503 Views)

EdDeWitt wrote:

I don't understand why it works, I just know that it did.

 


If you're behind a firewall incoming connections are usually not allowed. The FTP Server (as it is a server) on the other hand should allow incoming connections. In active connections the server tries to open a data connection to the client, this is usually not possible if you're firewalled (unless the incoming ports are open and routed to your machine). In passive FTP the client opens a data connection to the server, which is usually possible.

 

Daniel

 

Message 4 of 5
(5,500 Views)
Oops.  I didn't realize dan_u already suggested the active/passive thing.  My bad.  Anyway, thanks, dan_u, for providing the reasoning behind why it works.  That's good to know.
Message 5 of 5
(5,495 Views)