Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

FTPClient Problem 550 error on remote server


Benjamin.vial Jan 19, 2018 10:11 AM

Hi all,

I face a problem sending files with the FTPClent command to my remote FTP server.

I tried a very simple program here under:

 

'Measurement Variables

Public Bat, RefTemp, Temp, FTPResult

'TableFile variables

Public OutStat As Boolean, OutStatTrig As Boolean, LastFileName As String * 20

'FTP parameter strings (as constants), Message String & Result Variable

Const IPAddress="ftp.examples.fr"
Const UserName="login"
Const Password="pwd"

 DataTable (Test,True,-1)

    DataInterval (0,15,Sec,10)
    Sample (1,Bat,FP2)
    Sample (1,Temp,FP2)
    Sample (1,LastFileName,String)
    TableFile ("USR:Test",8,5,0,1,Min,OutStat,LastFileName)
EndTable 

BeginProg

    SetStatus ("USRDriveSize",100000)

    Scan (1,Sec,3,0)

      Battery(Bat)
      PanelTemp (RefTemp,250)
      CallTable (Test)

      If OutStat Then OutStatTrig=True
      If OutStatTrig Then
       FTPResult=FTPClient (IPAddress,UserName,Password,LastFileName,"/Directory_path/"+Mid(LastFileName,5,20),0)
       OutStatTrig=False

      EndIf

    NextScan

EndProg

 

The FTPResult variable is always set to 0.

On the remote FTP server, when checking the upcoming connection, i find:

"STOR /Directory_path/test1.dat" 550 -

The 550 means, the file path cannot be found whereas the remote directory on the server is created with the good rights. On the CR1000, the files are created on the USR part of the memory.

I have tried the active mode and the passive mode.

The CR1000 Os is the CR1000.std.32

Do you have an idea?

Regards,

Benjamin


Benjamin.vial Jan 22, 2018 12:38 PM

Hello,

I'm stuck with this error, no way to find a solution, any idea will be appreciated !

Don't know if my program is ok, before looking more complex network's rights attribution in my lab.

Thanks


GaryTRoberts Jan 23, 2018 02:02 AM

Have you tried sending files to the FTP server using the same FTP credentials with a program like FileZilla?  That might give you a clue as to what is going on.  Also, in the terminal mode, W command for trace, and IP trace you can watch exactly what is happening with FTP.  That info will be helpful as well.


Benjamin.vial Feb 20, 2019 10:33 AM

Hello,

I'm sorry, I have gived up last year this topic, and make another solution but now I'm stuck again.

Well, Gary if you see this again I will answer you :

Yeah I have tried with filezilla, actually we have more than hundred equipement that send scientific data on this server. And everthing works fine.

I treid the same program (with littles modifications) with a CR310, and I have the same log : 550.

Thanks,

bye


aps Feb 22, 2019 05:22 PM

 A couple of suggestions for you:

1) Try removing the "/" at the start of the directory path as some ftp servers could interpret this as you trying to specify a directory referenced to the root directory which you probably will not have rights to.

2) Also do you really have a directory called "directory_path", because that is literally where the program is telling the server to put the file.   This seems a little strange for a directory name.

And just to clarify, I believe the error you are seeing is recorded in the ftp server log file.   STOR is a valid ftp command the logger is using. This means the ftp server is not liking the combination of the path and filename or you do not have rights to write to that directory.  


Benjamin.vial Feb 23, 2019 11:16 AM

Hi,

thanks for your answer.

1) I just tried that, same for now.

2) no, "directory_path" is a fake. I mean I didn't put the real path on the forum.

Yeah STOR is for "storage", it depend of the ftp mode (passive, active, append, ...) but it's the code 550 that is important, says that the "file is missing or can't access to the path".


aps Feb 25, 2019 10:00 AM

Can you check on the USR drive on the logger that the files for ftp'ing are being written as expected and also that lastfilename matches one of those files.

I suggest you also put the code that calls the ftpclient in a slow sequence running, say, only once per minute.  This is because opening an ftp session can take a while and having the ftpclient in the main scan will cause that scan to be skipped for many scans in succession when it starts to send the file, possibly resulting in no data beeing stored the in the files you are trying to send.


Benjamin.vial Feb 25, 2019 07:02 PM

Hi,

I checked on the CR1000 that the files are written : it's OK, and they have data in.

I'll trying to put FTPclient in a slow sequence and will back to announce the result.

Thanks for your help !

bye


Benjamin.vial Mar 3, 2019 09:17 AM

Hi,

I add a slowsequence option, but I'm not sure that is at the right place :

 

Public Bat, RefTemp, Temp, FTPResult

Public OutStat As Boolean, OutStatTrig As Boolean, LastFileName As String * 20



Const IPAddress="ftp://url.com"

Const UserName="ftpuser"

Const Password="ftppass"

 

DataTable (Test,True,-1)

    DataInterval (0,15,Sec,10)

    Sample (1,Bat,FP2)

    Sample (1,Temp,FP2)

    Sample (1,LastFileName,String)

    TableFile ("USR:Test",8,5,0,1,Min,OutStat,LastFileName)

EndTable

 

BeginProg

    SetStatus ("USRDriveSize",100000)

SlowSequence 

    Scan (1,Sec,3,0)

      Battery(Bat)

      PanelTemp (RefTemp,250)

      CallTable (Test)

       If OutStat Then OutStatTrig=True
       If OutStatTrig Then
     
        FTPResult=FTPClient (IPAddress,UserName,Password,LastFileName,"/path/"+Mid(LastFileName,5,12),0,0,sec,8,500)
        OutStatTrig=False

      EndIf


    NextScan

EndProg

 

Have I made a mistake somewhere in the program ?

Otherwise, is there a way to use just a terminal command in the CR1000 to send, the simpliest way, a ftp file ? Just to confirm that the problem is between the cr1000 and the server ?

bye


Benjamin.vial Mar 11, 2019 07:52 AM

Hi,

I'm "upping" the topic ! Still need help.

Bye


Benjamin.vial Mar 18, 2019 07:17 AM

Hi,

please, somebody have an idea ?

Bye


Notheireat Feb 28, 2024 07:32 AM

Check that the FTP server is allowing the user account, the file or geometry dash world, and the transfer mode that you are using. You may need to modify the FTP server configuration file, such as vsftpd.conf, and enable or disable certain options, such as write_enable, chroot_local_user, or chroot_list_enable.


Angeldg Oct 29, 2024 09:52 PM

This post is under review.

Log in or register to post/reply in the forum.