LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ds ftp with non standard port

I need to send data to a FTP server. I tried to use the "FTP Put Buffer" VI, but most of the time, I get the error 66 (it works without error once in a while). I tried with the data socket functions and it works well. However, I dont seem to be able to use a port other than 21. I tried the following syntax:

        ftp://user:upass@server.com:2222/file.txt[text]

But the DS VI still uses port 21. Is it at all possible to use a different FTP port with the data socket VI?





Message Edited by jfmorneau on 04-09-2008 04:05 PM

Message Edited by jfmorneau on 04-09-2008 04:06 PM
0 Kudos
Message 1 of 4
(4,115 Views)
Hello,

Do you by any chance have a firewall that is blocking access to those other ports?


Kameralina

0 Kudos
Message 2 of 4
(4,086 Views)
Hi,

No. Client & server on the same LAN, Windows Firewall Deactivated both ends. The first goal of using another port was to see what was the behavior of the DS VI when not using the right port. The server was still set to port 21 and transfer was successful, still using port 21.

I finally went with the FTP VIs because I need the directory listing function. I still get Error 66 most of the time, but I just filter out this error... I know this might not be the best way to go, but until I find something better, this will have to do...

When I get error 66, there's nothing unusual in the FTP server transaction Log (everything is exaclty as when no error occurs). I captured the packets of the transmission and the only difference between no error and error 66 is that 2 bytes are missing on port 21 (control port) when error 66 occurs. On port 20 (Data port) , the amount of data is the same in both cases. But if I look at the captured data on port 21, I can't see any difference between the two cases. The two missing bytes must be invisible caracters (something like LF or CR).

With the FTP VIs I also had problems with error 0, but I solve this by using the passive transfer mode.

Any Ideas about error 66?

0 Kudos
Message 3 of 4
(4,082 Views)
Hello JF,

Thanks for your response!

Datasocket VI:
The following KnowledgeBase document indicates that FTP Control is assigned to Port 21, and that may be the reason that you are having issues using other ports.
Which Port Numbers Can I Use with TCP and UDP?

FTP VI:
You mentioned that you get the error sometimes, but not always.  Could you provide some more details on this? 
Are you able to ping the ftp server that you are trying to connect to without problems?  I suggest that you try other ftp servers as well and see if this error is specific to that particular server.  It isn't clear yet why you would be seeing this error even though the data appears to be transferred correctly. 

Have a great day!



Kameralina

0 Kudos
Message 4 of 4
(4,057 Views)