Community discussions

MikroTik App
 
omnicron
newbie
Topic Author
Posts: 27
Joined: Wed Dec 29, 2004 9:57 am

Netwatch; continual reboots

Fri Feb 13, 2009 3:21 am

I think I did a bad thing.

I have a wireless card (Verizon wireless) on the MT (3.17) and it works fine but sometimes the wireless just wont work anymore. It normally stops after a day or two. So in my infinite wisdom I setup a netwatch to ping a remote IP and then reboot the system it if does not respond.

Well the wireless died and it reboot but before it has a chance for the wireless verizon card to come up it reboots again.

I must have set the timeout too low or something. I dont recall what all the values are right now.

How do I get into the machine if it keeps just rebooting. I dont want to blow out the whole config.

Any ideas?

Thanks

Tim
 
galaxynet
Long time Member
Long time Member
Posts: 646
Joined: Fri Dec 17, 2004 2:52 pm
Contact:

Re: Netwatch; continual reboots

Fri Feb 13, 2009 5:28 pm

omnicron -

If you can get a serial cable on it you can telnet / ssh or use Hyperterminal to get in to the box and turn off netwatch. /system netwatch ..........

R/
 
omnicron
newbie
Topic Author
Posts: 27
Joined: Wed Dec 29, 2004 9:57 am

Re: Netwatch; continual reboots

Fri Feb 13, 2009 8:02 pm

I have the console screen but it says starting services and then reboots so I have NO chance to login either serial or console tty.

Any other ideas? Can I mount he FS on a linux system and remove the config somehow?

omnicron -

If you can get a serial cable on it you can telnet / ssh or use Hyperterminal to get in to the box and turn off netwatch. /system netwatch ..........

R/
 
galaxynet
Long time Member
Long time Member
Posts: 646
Joined: Fri Dec 17, 2004 2:52 pm
Contact:

Re: Netwatch; continual reboots

Fri Feb 13, 2009 8:21 pm

omnicron -

Use the netinsall server to 'hold on' to the RB. Then use the serial connection to get in to ROS and turn netwatch off.

R/

Thom
 
omnicron
newbie
Topic Author
Posts: 27
Joined: Wed Dec 29, 2004 9:57 am

Re: Netwatch; continual reboots

Fri Feb 13, 2009 8:53 pm

I did not understand the hold on the RB with netinstall thing but I was able to mount the drive under RHEL and remove the offending netwatch command.

Thanks for all the help everyone.
Tim
 
fatslim
newbie
Posts: 30
Joined: Mon Dec 01, 2008 1:21 pm
Location: Lithuania, Kaunas
Contact:

Re: Netwatch; continual reboots

Thu Nov 19, 2009 12:25 am

i have the same problem. need help. please!
 
omnicron
newbie
Topic Author
Posts: 27
Joined: Wed Dec 29, 2004 9:57 am

Re: Netwatch; continual reboots

Thu Nov 19, 2009 12:30 am

If you can not get into the device because it reboots to fast due to the netwatch reboot command, you need to put the MT fielesystem on a linux box (this is what I did) and delete the file with the config for the netwatch command. I don't remember which one it was since this was a while ago.

The issue was the clock ran too fast on my SMP Core2Duo and would not give the netwatch command time to complete and it would reboot the router. A MT update fixed that issue a while ago.

Tim
 
fatslim
newbie
Posts: 30
Joined: Mon Dec 01, 2008 1:21 pm
Location: Lithuania, Kaunas
Contact:

Re: Netwatch; continual reboots

Thu Nov 19, 2009 9:27 am

i found solution for my situation. i am using RB433AH v4.2. i set CPU clock to 100Mhz and router started to work very slow so i was able to login using serial cable and paste "tool netwatch disable numbers=2" command.

It would be great if in future RouterOS releases something like Safe Mode

sorry for my bad english :roll:
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Netwatch; continual reboots

Thu Nov 19, 2009 4:27 pm

It would be great if in future RouterOS releases something like Safe Mode
if you don't know about it, it doesn't mean that it doesn't exist =)
http://wiki.mikrotik.com/wiki/Safe_mode#Safe_Mode
 
fatslim
newbie
Posts: 30
Joined: Mon Dec 01, 2008 1:21 pm
Location: Lithuania, Kaunas
Contact:

Re: Netwatch; continual reboots

Sat Nov 21, 2009 7:02 pm

It would be great if in future RouterOS releases something like Safe Mode
if you don't know about it, it doesn't mean that it doesn't exist =)
http://wiki.mikrotik.com/wiki/Safe_mode#Safe_Mode
thanks. i didnt knew about this safe mode. i think it will be useful for me in future configuration, but at this situation it would be useful only before lockout. and what to do when i am unable to login to my router i cant press [crtl]+[x]? so when i was saying safe mode i meant to log in to router bypassing all the configuration and ability to change it.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Netwatch; continual reboots

Sat Nov 21, 2009 7:09 pm

to log in to router bypassing all the configuration and ability to change it.
MAC-Telnet and MAC WinBox are for this =)
 
Saasouh
just joined
Posts: 12
Joined: Sat Dec 10, 2011 1:25 pm

Re: Netwatch; continual reboots

Sun Jan 08, 2012 1:06 pm

Is there any one who could help me out here please.

Sometimes my network crash until I reboot the main router which is RB433, I need to have a script that will reboot that router in case the network crash.
I am not so good in programming please right down the script so I can copy and past.


Thank you
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Netwatch; continual reboots

Mon Jan 09, 2012 11:02 am

the script to reboot is
/system reboot
 
Saasouh
just joined
Posts: 12
Joined: Sat Dec 10, 2011 1:25 pm

Re: Netwatch; continual reboots

Mon Jan 09, 2012 10:43 pm

thank you Mr. Chupaka for replying, could you please tell me where to write it , in another word should I use netwatch or watchdog and writ the script in system down?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Netwatch; continual reboots

Tue Jan 10, 2012 11:09 am

yes, you may use NetWatch

Watchdog reboots the router by itself, w/o any scripting
 
Saasouh
just joined
Posts: 12
Joined: Sat Dec 10, 2011 1:25 pm

Re: Netwatch; continual reboots

Tue Jan 10, 2012 4:50 pm

Can you please be more specific , I need to know how to program watch dog to reboot the router in case of network failure.

thank u in advanced
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Netwatch; continual reboots

Tue Jan 10, 2012 8:02 pm

In netwatch, add a new watch, set your ISP's gateway as the "host" parameter, set any interval (the gateway will be verified once per the interval specified; short timeout means more stress on the router and quick reboot in case of failure, longer timeout means less stress on the router and potentially longer time before an automatic reboot), and as "down" script, specify "/system reboot".

That is all.
 
Saasouh
just joined
Posts: 12
Joined: Sat Dec 10, 2011 1:25 pm

Re: Netwatch; continual reboots

Sat Jan 14, 2012 4:16 pm

I wrote this in Netwatch :

log info "Netwatch missed a ping to 192.168.61.7 - starting 1 minute timeout script" ; /system script run NetWatchBoot-192.168.61.7

and I wrote this script in system scripts:

:if ([/ping 192.168.61.7 interval=1 count=60] =0) do={
/system reboot
}

but the router still not rebooting by itself

what is wrong ?
or should I just forget about the log and write: / system reboot in "down" in netwatch?
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Netwatch; continual reboots

Sat Jan 14, 2012 4:36 pm

or should I just forget about the log and write: / system reboot in "down" in netwatch?
Yes, you can do that, but keep in mind the router will reboot as soon as you loose connection (+ the interval time or less), whereas doing what you're trying to do will reboot the router if the connection is lost + the interval time or less + the required time for the 60 pings to take place and timeout (60 seconds in your case).

Who is online

Users browsing this forum: genesispro and 20 guests