Community discussions

MikroTik App
 
User avatar
zervan
Member
Member
Topic Author
Posts: 329
Joined: Fri Aug 20, 2010 10:43 pm
Location: Slovakia
Contact:

fetch FTP - empty file uploaded

Tue Jan 03, 2012 10:47 am

I've made a script which is saving data amounts of each user to logfile at midnight and then uploading the logfile to my web server using /tool fetch and FTP. (web server is generating tables, see attachment) The problem is that sometimes the logfile is transferred well and sometimes not - the transferred logfile is empty (zero length).

I've also tried simple command in terminal:
/tool fetch upload=yes mode=ftp address=SERVER user=USER password=PASS src-path=test.txt dst-path=test.txt
And it is as I said: sometimes working, sometimes not. There is no error message on terminal, everything seems to be ok (status: finished), but the file on FTP is empty. How may I fix it?
You do not have the required permissions to view the files attached to this post.
 
NEJI
just joined
Posts: 11
Joined: Tue Apr 03, 2012 10:49 pm

Re: fetch FTP - empty file uploaded

Tue Apr 03, 2012 10:52 pm

Hi zervan,

I have noticed the exact same problems with my script sometimes it uploads the whole file and other times its a zero sized file.

I have now done this:
/tool fetch mode=ftp address=($ftpserver) user=rbcp password=rbcp src-path=($rscFileName) dst-path=($rscFileName) upload=yes;
:delay delay-time=3s;

I've added a slight delay of 3 seconds to see if this helps somehow.

I'll let the system run for the next 24 hours and see it goes.

Regards,
/Neji
 
angboontiong
Forum Guru
Forum Guru
Posts: 1136
Joined: Fri Jan 16, 2009 9:59 am

Re: fetch FTP - empty file uploaded

Sat Apr 21, 2012 7:34 am

or may be you can setup a linux server and put crontab let the server get the file from you routerboard...
 
NEJI
just joined
Posts: 11
Joined: Tue Apr 03, 2012 10:49 pm

Re: fetch FTP - empty file uploaded

Wed Apr 25, 2012 12:08 am

I changed the FTP service from Windows to Ubuntu and so far its working.

No more zero sized files and the right sized file does get FTP'd to the server.
 
rzirzi
Member
Member
Posts: 393
Joined: Mon Oct 09, 2006 2:33 pm

Re: fetch FTP - empty file uploaded

Wed Jan 24, 2018 11:58 pm

I have the same problem - emty file uploaded to Ubuntu FTP server. Fromm command line - is OK. From the script - is 0Bytes :( Have You found solution? Where is the problem?
 
NEJI
just joined
Posts: 11
Joined: Tue Apr 03, 2012 10:49 pm

Re: fetch FTP - empty file uploaded

Fri Apr 13, 2018 11:57 am

I have the same problem - emty file uploaded to Ubuntu FTP server. Fromm command line - is OK. From the script - is 0Bytes :( Have You found solution? Where is the problem?
My problem was that I was using a Windows FTP server and some how the anti virus was messing things up. But when I moved to a Ubuntu server then it worked just right

Who is online

Users browsing this forum: No registered users and 71 guests