Community discussions

 
User avatar
CZFan
Forum Guru
Forum Guru
Topic Author
Posts: 1361
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Randburg
Contact:

Trying to download json file via ftp

Sun Aug 25, 2019 11:02 pm

Hi,

I created 2 scripts, one to download ROS update files from another MT router and another to download a webfig skin json file, both via ftp

The download of the package files work great, but using the exact same command for the json file fails with poll error.

Is there anything special about the skins folder or ftp'ing a json file?
MTCNA, MTCTCE, MTCRE & MTCINE
 
User avatar
CZFan
Forum Guru
Forum Guru
Topic Author
Posts: 1361
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Randburg
Contact:

Re: Trying to download json file via ftp

Mon Aug 26, 2019 1:14 pm

To provide more info, below is what works:
:local UpdateFile {"Hap-Lite/ppp-6.44.3-smips.npk";"Hap-Lite/security-6.44.3-smips.npk";"Hap-Lite/tr069-client-6.44.3-smips.npk";"Hap-Lite/wireless-6.44.3-smips.npk";"Hap-Lite/advanced-tools-6.44.3-smips.npk";"Hap-Lite/dhcp-6.44.3-smips.npk";"Hap-Lite/system-6.44.3-smips.npk"}
:local RemoteFTP 10.77.0.10;
:local User FTP-User;
:local Pass FTP-Us3r;
:put "Downloading required update files...";
:foreach i in $UpdateFile do={
:put ("Downloading $i")
/tool fetch address=$RemoteFTP src-path=$i \
user=$User mode=ftp password=$Pass port=2121 \
keep-result=yes;
and below is what does not work, get "poll" error
/tool fetch address=10.77.0.10 src-path=Skin-Tmpl/JC-Skin.json dst-path=skins/JC-Skin.json \
user=FTP-User mode=ftp password=FTP-Us3r port=2121 keep-result=yes;
MTCNA, MTCTCE, MTCRE & MTCINE
 
User avatar
SiB
Member Candidate
Member Candidate
Posts: 148
Joined: Sun Jan 06, 2013 11:19 pm
Location: Poland

Re: Trying to download json file via ftp  [SOLVED]

Mon Aug 26, 2019 2:48 pm

I cannot recreate your problem. Works beetwen two MikroTik 6.44.3 server and 6.45.3 client.
Works when I use CLI:
/tool fetch mode=ftp user=ftp-testt password="*******" address=82.214.*.* src-path=skins/cust1-hd-skin.json dst-path=skins/cust1-hd-skin.json
I must use address who is not use in DNAT, user in full privilage. Even if skins folder is not exist then is create automatic.
MTCNA + MTCRE + MTCINE | ~600 users at ~150 RouterBoards in EMEA | Telegram: @SiB_PL | WebChat: Tokonda
 
User avatar
CZFan
Forum Guru
Forum Guru
Topic Author
Posts: 1361
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Randburg
Contact:

Re: Trying to download json file via ftp

Mon Aug 26, 2019 5:37 pm

@SIB,

Thank you, looks like that "poll" error translates into a permissions problem, tested with admin user and worked.
MTCNA, MTCTCE, MTCRE & MTCINE

Who is online

Users browsing this forum: No registered users and 6 guests