Community discussions

MikroTik App
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Automatic RoS reboot at a specifit time

Thu Jan 20, 2011 2:37 pm

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
 
User avatar
THG
Member
Member
Posts: 472
Joined: Thu Oct 15, 2009 1:05 am

Re: Automatic RoS reboot at a specifit time

Thu Jan 20, 2011 6:03 pm

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.
 
andrescamino
Member Candidate
Member Candidate
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location: Guayaquil-Ecuador

Re: Automatic RoS reboot at a specifit time

Thu Jan 20, 2011 6:07 pm

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.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Thu Jan 20, 2011 6:28 pm

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?
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Thu Jan 20, 2011 6:50 pm

OK, seems the bootloaders was version 2.28, so i updated it to 2.29. Still same problem but now freezes after 1st reboot. :(
 
xxiii
Member Candidate
Member Candidate
Posts: 234
Joined: Wed May 31, 2006 12:55 am

Re: Automatic RoS reboot at a specifit time

Thu Jan 20, 2011 9:45 pm

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"
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Thu Jan 20, 2011 10:03 pm

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.
 
User avatar
THG
Member
Member
Posts: 472
Joined: Thu Oct 15, 2009 1:05 am

Re: Automatic RoS reboot at a specifit time

Thu Jan 20, 2011 10:26 pm

Here is the foolproof method to reboot your RB793G router (cold reboot).
You do not have the required permissions to view the files attached to this post.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Fri Jan 21, 2011 9:25 am

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.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26381
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Automatic RoS reboot at a specifit time

Fri Jan 21, 2011 9:34 am

In our new products (SXT) we have the usb-power-reset feature that will help in your case.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Fri Jan 21, 2011 9:15 pm

You mean like I could only reset gprs pci-e card?
 
Edified
newbie
Posts: 37
Joined: Thu Sep 16, 2010 9:02 am

Re: Automatic RoS reboot at a specifit time

Sat Jan 22, 2011 2:21 am

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.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Sat Jan 22, 2011 8:35 am

I can try that, but any solution based on RoS reset is unreliable.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Sat Jan 22, 2011 9:16 am

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. :(
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Automatic RoS reboot at a specifit time

Sat Jan 22, 2011 11:07 pm

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.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Thu Jan 27, 2011 10:19 am

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,...
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Automatic RoS reboot at a specifit time

Thu Jan 27, 2011 2:25 pm

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.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Mon Jan 31, 2011 10:07 pm

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.
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: Automatic RoS reboot at a specifit time

Mon Jan 31, 2011 10:16 pm

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,
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Mon Jan 31, 2011 10:35 pm

The problem also occurs on routers which have no mini-pcie slot, no wlan card just plain router, like 1100U.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Sun Feb 06, 2011 12:55 pm

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
 
ghiooo
just joined
Posts: 21
Joined: Thu Mar 03, 2011 1:26 am
Location: Bucureşti, România

Re: Automatic RoS reboot at a specifit time

Thu Mar 03, 2011 1:34 am

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.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Thu Mar 03, 2011 2:45 pm

"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.
 
ghiooo
just joined
Posts: 21
Joined: Thu Mar 03, 2011 1:26 am
Location: Bucureşti, România

Re: Automatic RoS reboot at a specifit time

Thu Mar 03, 2011 6:24 pm

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.
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Mon Mar 07, 2011 1:03 pm

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?
 
mstead
Member Candidate
Member Candidate
Posts: 114
Joined: Sat Mar 04, 2006 2:41 am

Re: Automatic RoS reboot at a specifit time

Tue Mar 22, 2011 2:02 am

The reboot problem still exists in v4.17. I can confirm that with RB493AH.
 
ghiooo
just joined
Posts: 21
Joined: Thu Mar 03, 2011 1:26 am
Location: Bucureşti, România

Re: Automatic RoS reboot at a specifit time

Thu Apr 21, 2011 5:41 pm

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
 
locu
just joined
Posts: 8
Joined: Tue Oct 07, 2008 3:50 am

Re: Automatic RoS reboot at a specifit time

Wed Apr 27, 2011 12:43 am

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.
 
kirshteins
MikroTik Support
MikroTik Support
Posts: 592
Joined: Tue Dec 02, 2008 10:55 am

Re: Automatic RoS reboot at a specifit time

Wed Apr 27, 2011 9:19 am

Problem with reboots stalling on 400 series Routerboards has been fixed in v5.0.
 
Begetan
Frequent Visitor
Frequent Visitor
Posts: 97
Joined: Mon Jul 11, 2011 11:49 am

Re: Automatic RoS reboot at a specifit time

Mon Feb 06, 2012 8:38 pm

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"
 
User avatar
bysard
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Thu Apr 22, 2010 2:53 pm

Re: Automatic RoS reboot at a specifit time

Tue Apr 03, 2012 4:45 pm

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.
 
lwq
just joined
Posts: 21
Joined: Mon Mar 19, 2012 10:53 am

Re: Automatic RoS reboot at a specifit time

Tue Apr 03, 2012 10:45 pm

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

Who is online

Users browsing this forum: No registered users and 95 guests