Hi,
I have recently been working with RouterOS6 – no real issues.
In my job I need to create script files <.rsc> to make our tech’s job easier to manage.
My work is mainly on MikroTik Groove A-2Hn wireless routers (and some RG450 routerboards)
In RouterOS6 I had no issue in using WinBox System > Reset Configuration - and selecting the .rsc to Run After Reset – worked every time OK – blew away the current config and loaded the next one – no issue.
Now I’ve just updated to RouterOS6.1 – this feature does not seem to be working correctly, the system reset is happening BUT the assigned config file is not running.
BUT when I do a manual load of the .rsc in New Terminal (> import .rsc [enter]) – it loads without issue and without errors – and my comms links is working OK.
So has someone broken WinBox System > Reset Configuration - and selecting the .rsc to Run After Reset?
How do I report this as a potential bug to MikroTik?
OK, script is working in New terminal for you (I will try tomorrow) BUT does the Winbox GUI work?
System > Reset Configuration (choose the file to run on reboot) ?
Hi gents… once again – thanks for your feedback.
So I think what we have here is an initialisation bug – and its not unique to this router, I can emulate the issue on the others I’ve just upgraded – some do the same thing some don’t.
I tried the following:
tried the script in New Terminal (thanks tomaskir) – /system reset-config keep-users=no no-defaults=yes skip-backup=yes run-after-reset=myfile.rsc
This failed to load on reboot.
then reloaded the config script using > import myfile.rsc - comms working as designed – OK – so I know that works.
then did a script export > export file=myfile6-1.rsc (as the initial scripts was around RouterOS6, not 6.1) – checked it against my script, I could not see any differences – OK.
Then again in New Terminal tried to reset config and load script /system reset-config keep-users=no no-defaults=yes skip-backup=yes run-after-reset=myfile6-1.rsc, This failed to load on reboot again.
Then tried the GUI windows (rather than New Terminal) – again failed – after reboot I check the logs and there was a memory error there is a script error: no such item (but I can assure you it works fine if I import it) - see attached log screenshot.
So then I just did a system reset config (using the GUI) with no file selected and rebooted OK with the option of the default ether1 IP address 192.168.88.1 (NOTE: this is the first time I had done JUST the reset config without setting up a file to load after reset – so this was the FIRST time I saw this default option)
I removed the configuration and again tried a system reset config and selected my file, and now its all working.
(NOTE: all the time I was doing reset configs in RouterOS6.0 I never noticed the default IP oiption come up – so was that bug in RouterOS6?)
So I feel that when I upgraded to RouterOS6.1 I already had a config running – and after the RouterOS6.1 it was still working, but for some reason, IF you do a reset system AND ask to run a file it will not work, until you JUST do a system reset config first and let the default run (you can remove the default) – after that it all seems to be OK – this was not the case with RouterOS6 – I could simply do a System > Reset Config and choose my file and it would load with out issue.
The fact there log error indicating a script error of “no such item” seems to me that there is some initialisation in the Groove that is not happening after the reset-config, UNLESS, you let the default load first, then do the reset-config and run myfile.rsc.
Thanks for your help and hope these comments assist anyone that may see the same thing.
Cheers
Put a 10 second delay before running the rest of your script. Also, make sure the entirety of the script (minus the delay) is surrounded by {}. I have a feeling MikroTik broke a lot of scripts when they changed the way imported scripts run.
Our MikroTik supplier has also confirmed my findings - copy of their email below:
Just thought I’d add a note that we have been able to observe the same behaviour that you have reported in routerOSv6.1 where even the factory default configuration does not properly load on reboot/reset - we have made MikroTik aware of the issue and awaiting reponse. I suspect that it will be corrected in v6.2 - in the meantime, please revert to v6.0 or 5.25
Please note that this is not a consistent issue:
I have 6 MikroTik Groove A-2Hn wireless routers here on RouterOSv6.1: 1 displays the problem consistently, 2 display the problem sometimes, 3 do not have an issue.
I also have one RG450 router on RouterOSv6.1: it performs System > Reset Configuration and loads a new script on reboot without issue.
My apologies normis, but I have to disagree, there is some type of bug.
You may need to add a delay when doing via script, fair enough – but what about the GUI method below? – this is failing on v6.1
It worked before on earlier versions, but does not consistently work now on all my hardware I have here, on one unit it always fails, one others it sometimes fails and the MikroTik supplier in Australia has confirmed my findings.
Happy to post the script, BUT, please answer this first - if I do a Reset Configuration with no default (so no setup at all) then (via Terminal) use >import myfile.rsc and my script loads without any issue and my network configures OK without any problems and works as I want it too, then why would the script be an issue?..Especially when it was also working also on RouterOS6.0 (using the GUI methoed), BUT not now on RouterOS6.1?
This is a very nasty bug. I just beat my head against a wall for a long time trying to isolate a solution to it.
Even running these in order ended up leaving this router (RB951G) unusable under ROS 6.1 & 5.25:
/system reset-config keep-users=no no-defaults=yes skip-backup=yes
[reboot]
/export compact file=config
/system reset-config keep-users=no no-defaults=yes skip-backup=yes run-after-reset=config.rsc
However, adding that delay to the top of the exported script allowed it to load properly, then it worked correctly with modified versions of my existing scripts. This type of functionality really needs to remain the same across versions since this is critical for quickly configuring very similar (but not identical) routers for deployment. For now, this will be added to my configuration scripts, but I’ve never needed it over the 6+ years I’ve been using boards and devices from MT.
Among similar devices, this does not happen on my numerous RB2011UAS-2HnD-INs, so I originally thought it might be related to the RB951G…