Community discussions

 
terintamel
newbie
Topic Author
Posts: 47
Joined: Sun Sep 05, 2010 3:09 am

Reset Config Run after Reset not working right

Mon Mar 05, 2018 8:01 pm

I have been having this issue lately with 6.4x and higher ROS versions. If I run the following command
/system reset-configuration no-defaults=yes run-after-reset=router.rsc
the system will reboot but it will not load the configuration from the router.rsc file.

If I then logon to the router via MAC-Winbox and then open the terminal and run
import file=router.rsc
the router will successfully load the configuration from the router.rsc file without error.

How do I fix this?
 
terintamel
newbie
Topic Author
Posts: 47
Joined: Sun Sep 05, 2010 3:09 am

Re: Reset Config Run after Reset not working right

Mon Mar 05, 2018 8:04 pm

Slight correction. Most of the time it will either not load the configuration from the router.rsc file, or it will only load part of it. I cannot get it to load the whole configuration using the Run After Reset command. It will only load the whole configuration if I reset and then run the import command on the same file using the Terminal.
 
freemannnn
Long time Member
Long time Member
Posts: 669
Joined: Sun Oct 13, 2013 7:29 pm

Re: Reset Config Run after Reset not working right

Mon Mar 05, 2018 8:39 pm

read this topic

viewtopic.php?t=123656

add 15 seconds delay at the begining of the script.
:delay 15s
 
terintamel
newbie
Topic Author
Posts: 47
Joined: Sun Sep 05, 2010 3:09 am

Re: Reset Config Run after Reset not working right

Mon Mar 05, 2018 8:53 pm

That worked, but I do not find that an acceptable solution. I have the router setup to export the router configuration weekly to a router.rsc file. If the customer messes things up I now have to copy the backup file off the router to my computer and then edit it to include the :delay 15s.

If this is a known issue why does mikrotik not either add a built in delay or give us a setting that allows us to choose a delay time before executing the run-on-reset file?
 
pe1chl
Forum Guru
Forum Guru
Posts: 5930
Joined: Mon Jun 08, 2015 12:09 pm

Re: Reset Config Run after Reset not working right

Mon Mar 05, 2018 8:55 pm

Hopefully MikroTik will put this delay into RouterOS itself sometime... it is really inconvenient that it works this way.
(and I also keep hoping that sometime they will implement a continue-after-minor-error too)
 
freemannnn
Long time Member
Long time Member
Posts: 669
Joined: Sun Oct 13, 2013 7:29 pm

Re: Reset Config Run after Reset not working right

Mon Mar 05, 2018 9:02 pm

that is the explanation from mikrotik...

"Startup delay"
If your configuration relies on interfaces that might not yet have started up upon command execution, it is suggested to introduce delays, or to monitor until all needed interfaces are available. This example script allows you to set how many interfaces you are expecting, and how long to wait until they become available:

https://wiki.mikrotik.com/wiki/Manual:C ... Management
 
User avatar
nichky
Long time Member
Long time Member
Posts: 531
Joined: Tue Jun 23, 2015 2:35 pm

Re: Reset Config Run after Reset not working right

Mon Mar 05, 2018 10:26 pm

so, how it will be the correct script?

Thanks
Nikola Suminoski
MikroTik Consultan
MTCRE l MTCWE

!) Safe Mode is your friend;
 
pe1chl
Forum Guru
Forum Guru
Posts: 5930
Joined: Mon Jun 08, 2015 12:09 pm

Re: Reset Config Run after Reset not working right

Tue Mar 06, 2018 3:47 pm

Put a :delay at the top and hope for the best!
:delay 30s should be sufficient, if not, increase and repeat.
 
User avatar
nichky
Long time Member
Long time Member
Posts: 531
Joined: Tue Jun 23, 2015 2:35 pm

Re: Reset Config Run after Reset not working right

Tue Mar 06, 2018 9:17 pm

Can you type me exactly how you mean still i got issues. im doing like this:

:delay 15s
/system reset-configuration no-defaults=yes run-after-reset=xxx


Thanks
Nikola Suminoski
MikroTik Consultan
MTCRE l MTCWE

!) Safe Mode is your friend;
 
pe1chl
Forum Guru
Forum Guru
Posts: 5930
Joined: Mon Jun 08, 2015 12:09 pm

Re: Reset Config Run after Reset not working right

Tue Mar 06, 2018 10:00 pm

No you should put the delay at the top of the script you are going to run after reset.
 
User avatar
nichky
Long time Member
Long time Member
Posts: 531
Joined: Tue Jun 23, 2015 2:35 pm

Re: Reset Config Run after Reset not working right

Tue Mar 06, 2018 11:18 pm

No you should put the delay at the top of the script you are going to run after reset.

Done :)

Thanks
Nikola Suminoski
MikroTik Consultan
MTCRE l MTCWE

!) Safe Mode is your friend;

Who is online

Users browsing this forum: Google [Bot] and 85 guests