Page 1 of 1

Automatic RoS reboot at a specifit time

Posted: Thu Jan 20, 2011 2:37 pm
by bysard
Hi,

I need to reboot all routers at 00:00 every day. This is because they all have Sierra Wireless MC8790 PCI-E cards inside and are connected to the base via GPRS-PPTP-VPN. The problem is that randomly these routers (RB411U) just disconnect from GPRS network (unknown reason) and wont connect back to it. They only connect after reboot, otherwise it's just "Opening port....Connecting.....Disconnecting). After reboot it works fine. I have succesfully created a script and a schedule that reboots the router at a certain time.
Now for the problem:
I'm using a RB793G as a router, to test my new script on. I have set up a schedule to reset the router every 10 mins. After 3rd or 4th reboot the router just freezes (all network ports are silent) and it needs to be unplugged from power aswell, then when plugged back it it works for 3-4 times again then freeze. All routers have FW 4.16 on installed. Any clues?


br,
bysard

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 20, 2011 6:03 pm
by THG
Did you upgrade Bootloader?
[admin@MikroTik] > system routerboard print 
       routerboard: yes
             model: "793G"
     serial-number: "2EC302CE612C"
  current-firmware: "2.25"
  upgrade-firmware: "2.29"
[admin@MikroTik] > 
In this case you see, that there is a newer version of the Bootloader firmware available already inside your current RouterOS version. Note! New Bootloader versions come with the routerboard.npk package when you install and upgrade your router, this is why always make sure you have not forgotten to install this package.

Do the upgrade command now:
[admin@MikroTik] > system routerboard upgrade
I can't promise that it will fix your issue.

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 20, 2011 6:07 pm
by andrescamino
u can try THG's approach and also u can set a ntp server to ask the time to that server and after that u can modify the scrip to reboot the router at a specific time, because as far as I know when you reboot the router the time will change and unless u are a NTP client u will have to modify the hour everyday so the router reboot at ur specific time.

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 20, 2011 6:28 pm
by bysard
NTP client is set up and already running. The thing is that the router reboots like 3-4 times without a problem, but the 5th time it freezes. I have installed the full 4.16 package on this router so i would think that bootloader has also been updated. Am i wrong?

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 20, 2011 6:50 pm
by bysard
OK, seems the bootloaders was version 2.28, so i updated it to 2.29. Still same problem but now freezes after 1st reboot. :(

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 20, 2011 9:45 pm
by xxiii
We had a router that was set to reboot every day at 3am. We came in one morning and found the router had shutdown but not restarted, and it had to be power cycled. Its graphs all went right up to 3am, and stopped. We are no longer letting it reboot itself, (we had found another workaround for the problem we were originally having it reboot itself for anyway, fortunately).

Its currently running 5.0rc5 2.28

model: "450G"
current-firmware: "2.28"
upgrade-firmware: "2.28"

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 20, 2011 10:03 pm
by bysard
Just tried it with RB433AH v4.16, BL 2.29. Works like intended. Tommorow i'm gonna try it on another 493G and see how it goes.

------------------------------
This one shut down also, but later, after 15th try. Seems to be a random shutdown instead of a reboot.

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 20, 2011 10:26 pm
by THG
Here is the foolproof method to reboot your RB793G router (cold reboot).

Re: Automatic RoS reboot at a specifit time

Posted: Fri Jan 21, 2011 9:25 am
by bysard
Thank you for the info THG, but it's gonna be too costly for us to implant these on 100+ locations. I would love to get a response from "the staff" on when this issue is going to be fixed, since this is a really basic function and it works great on cheap routers.

Re: Automatic RoS reboot at a specifit time

Posted: Fri Jan 21, 2011 9:34 am
by normis
In our new products (SXT) we have the usb-power-reset feature that will help in your case.

Re: Automatic RoS reboot at a specifit time

Posted: Fri Jan 21, 2011 9:15 pm
by bysard
You mean like I could only reset gprs pci-e card?

Re: Automatic RoS reboot at a specifit time

Posted: Sat Jan 22, 2011 2:21 am
by Edified
Since it's random it seems like it would make more sense to use a ping watchdog to reboot the device only when it loses it's connection. It also means the client doesn't need to wait until the scheduled reset if the modem goes down much before 0:00.

Re: Automatic RoS reboot at a specifit time

Posted: Sat Jan 22, 2011 8:35 am
by bysard
I can try that, but any solution based on RoS reset is unreliable.

Re: Automatic RoS reboot at a specifit time

Posted: Sat Jan 22, 2011 9:16 am
by bysard
Bah 3 more locations just went down this night. 150km apart. The thing is, I have no problem with Ruckus router with integrated GPRS module. It never freezes, but it costs 3 times as much. But if I include all the km's i'm gonna have to travel (and i have absolutelly no guarantee it wont freeze again) its the same price or even lower considering the time lost. :(

Re: Automatic RoS reboot at a specifit time

Posted: Sat Jan 22, 2011 11:07 pm
by ditonet
I can try that, but any solution based on RoS reset is unreliable.
According to Wiki http://wiki.mikrotik.com/wiki/Watchdog
there is a hardware watchdog in RouterBOARDs.
You should give it a try, it never failed for me.

Regards, Grzegorz.

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 27, 2011 10:19 am
by bysard
The problem isn't in not knowing how or when to reboot, but the reboot process itself. Instead of a reboot if randomly shuts down. The problem is very simply reproducable, I've experienced it on ALL routerboards i've come across. RB711a, RB493g, 493AH, 433AH, 750,...

Re: Automatic RoS reboot at a specifit time

Posted: Thu Jan 27, 2011 2:25 pm
by ditonet
All I want to say, is that '/system reboot' is software function,
but watchdog is hardware-based and works different way.
As I wrote earlier, watchdog never failed for me.

Regards, Grzegorz.

Re: Automatic RoS reboot at a specifit time

Posted: Mon Jan 31, 2011 10:07 pm
by bysard
I've been testing this for a week now. Still the same problem even with watchdog. I got 2 successul reboots on fail to ping, but the third shutdown the router.

Re: Automatic RoS reboot at a specifit time

Posted: Mon Jan 31, 2011 10:16 pm
by ditonet
Try to remove Sierra Wireless MC8790 from one affected router
and make some tests. Maybe router doesn't restart properly
due to some card incompatibility.

Regards,

Re: Automatic RoS reboot at a specifit time

Posted: Mon Jan 31, 2011 10:35 pm
by bysard
The problem also occurs on routers which have no mini-pcie slot, no wlan card just plain router, like 1100U.

Re: Automatic RoS reboot at a specifit time

Posted: Sun Feb 06, 2011 12:55 pm
by bysard
Tried also v5.0 RC8. It works better, i've been resetting the router with the worst reboot performance for whole night. It went fine, but then I installed openWRT as a metarouter and got 2 reset then shut down again. It's too unreliable for even semi-pro use. I think it's really low possibility for us to buy 100+ routers with the same fault (different suppliers). I've even gone so far to test every single version of RoS 4.x on multiple routers, changed power adapters, measured if there is really 220V in the wall (it is). I get same results, random router shutdown instead of reset.

And btw. watchdog isn't really an option, since it reboots the router on 1st ping fault and most of these routers are behind GPRS which means there are quite a few lost ping packets. And it also shuts down the router like scheduled reset.

I've talked with some electronics engineers and they say its a low quality board if this occurs.

br,
bysaRD

Re: Automatic RoS reboot at a specifit time

Posted: Thu Mar 03, 2011 1:34 am
by ghiooo
my problem with 411u is worse, if it worked fine for 3 days, then i ordered 3 more boards of the same type, and now i had the time to read the forums. i am very dissapointed, my first 411u board is now disconnected and i really can't do anything, now i am using a backup connection and i tried everything, the console is not responsive, i need to wait minutes until i can type anything just to get the wonderful unexpected error: usb power reset nt implemented on this hardware. the device is up on a mountain 300km away. i will receive the next 3 pieces 411u next monday. my boss will fire me, for sure, or will make me buy them for myself, and i will stick them deep in my a**. thank you, mikrotik.

Re: Automatic RoS reboot at a specifit time

Posted: Thu Mar 03, 2011 2:45 pm
by bysard
"my boss will fire me, for sure, or will make me buy them for myself...."

If that's true, than your boss is a moron and u are better off working somewhere else. Routerboards are the best routers in the world considering price/performance. Yes, they do have some errors, but Mikrotik team is working all the time to improve their products. I've been using them for 8 years now and they are great. Also, this problem with reboot should have been solved now in RoS 4.17. Will try it and post results.

Re: Automatic RoS reboot at a specifit time

Posted: Thu Mar 03, 2011 6:24 pm
by ghiooo
I still need help with the 411U, the moron is myself in this case :) I was in panic, that's all. Don't You know the first feelings coming when something worked but not anymore? Anger+panic (if it's very important). Sorry for being emotional, but that's how i am functioning :)

Regarding v4.17, i had no succes with it, my device is not reconnecting and it's not the provider's fault.

Thanks for support.

ps: any solution to cut the power on the usb port? my 411U is on a big UPS backed up by a power generator, and i have no chance to climb the mountain without a helicopter.

Re: Automatic RoS reboot at a specifit time

Posted: Mon Mar 07, 2011 1:03 pm
by bysard
Just tested reboot in 4.17. Great job Mikrotik it finally works. I've been rebooting 3 routers every 2 mins for whole weekend. I didn't get 1 shutdown, all 3 were still rebooting when I came to work today.

ghiooo: Are you using sierra wireless mini-pcie MC8790?

Re: Automatic RoS reboot at a specifit time

Posted: Tue Mar 22, 2011 2:02 am
by mstead
The reboot problem still exists in v4.17. I can confirm that with RB493AH.

Re: Automatic RoS reboot at a specifit time

Posted: Thu Apr 21, 2011 5:41 pm
by ghiooo
Just tested reboot in 4.17. Great job Mikrotik it finally works. I've been rebooting 3 routers every 2 mins for whole weekend. I didn't get 1 shutdown, all 3 were still rebooting when I came to work today.

ghiooo: Are you using sierra wireless mini-pcie MC8790?

i do now. see here http://forum.mikrotik.com/viewtopic.php ... 86#p259886

Re: Automatic RoS reboot at a specifit time

Posted: Wed Apr 27, 2011 12:43 am
by locu
I too can confirm this reboot issue when testing on a benched RB450G. I set watchdog to reboot when ping fails. To emulate ping failure I simply remove the network source.

Watchdog often reboots 2-3 times just fine, then shuts the router down on the 3rd or 4th.
Log always states "watchdog cannot point address x.x.x.x: rebooting. However the final time it never starts up again without power cycle. It doesn't' beep once or twice to even signify it's attempting to startup.

To reproduce:
1. RB450G running 4.17
2. Setup ping watchdog to unreachable IP
3. Set ping start after boot to 00:01:00

My 2nd experiment (using same setup above) rebooted fine 5 times, and failed on the 6th.

Re: Automatic RoS reboot at a specifit time

Posted: Wed Apr 27, 2011 9:19 am
by kirshteins
Problem with reboots stalling on 400 series Routerboards has been fixed in v5.0.

Re: Automatic RoS reboot at a specifit time

Posted: Mon Feb 06, 2012 8:38 pm
by Begetan
Here is script which correctly restart Siera Wireless ( or probably the others) 3G Card.
So no need to restart router to make it online again.

/system script
add name=ppp-restart source=":local iface;\r\
    \n:foreach i in=[/interface find type=\"ppp-out\"]  do={\r\
    \n    :set iface [/interface get \$i name];\r\
    \n    /interface ppp-client monitor \$i once do={\r\
    \n        :if (\$status!=\"connected\") do={  \r\
    \n            /interface disable \$iface;\r\
    \n            :delay 5s;\r\
    \n            :log info \"ppp-watch status: \$status,  restarted: \$iface\
    \";\r\
    \n            /interface enable  \$iface;\r\
    \n           }\r\
    \n    :log info \"ppp-watch status: \$status\";  \r\
    \n    }\r\
    \n}\r\
    \n"

Re: Automatic RoS reboot at a specifit time

Posted: Tue Apr 03, 2012 4:45 pm
by bysard
Thanks for the script example, but disabling and enabling the interface doesn't do the trick. You need to power-cycle the USB port in order to correctly restart the affected device. Power cycle function isn't supported in all routerboards.

Re: Automatic RoS reboot at a specifit time

Posted: Tue Apr 03, 2012 10:45 pm
by lwq
I have similar issue with E1750 by Huawei. The solution is to power-cycle USB / whole RB.

I have made HW reset function for external device via /system health fan-mode feature which controls FAN header on RB433UAH used here. Therefore, there is posibility to control relay which will cycle power for USB device. I will make this "device" soon and I'll send you photos and so on ... 8)

If you'll use RB (411, ...) without FAN header there is solution via user LED and phototyristor(photo-something) ... :D