Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Auto Reboot After Kernel Panic/Etc
« previous
next »
Print
Pages: [
1
]
Author
Topic: Auto Reboot After Kernel Panic/Etc (Read 2281 times)
nVIceman
Newbie
Posts: 23
Karma: 1
Auto Reboot After Kernel Panic/Etc
«
on:
April 19, 2022, 05:19:35 pm »
I'm having an issue with a install that has been repeatedly having issues that prevents the internet from working, but it's fixed simply by rebooting it. I'm still trying to work out what's going on with it, but is there a way to set it to Auto reboot after it has such an issue so it at least doesn't keep the internet down until somebody could manually reboot it?
Logged
franco
Administrator
Hero Member
Posts: 17656
Karma: 1610
Re: Auto Reboot After Kernel Panic/Etc
«
Reply #1 on:
April 20, 2022, 08:23:04 am »
After a kernel panic it already automatically reboots (unless something is severely broken or not coming back up properly). Some hardware may not reboot due to broken power supply and simply turn off. What exact issue are you seeing when the internet stops working?
Cheers,
Franco
Logged
nVIceman
Newbie
Posts: 23
Karma: 1
Re: Auto Reboot After Kernel Panic/Etc
«
Reply #2 on:
April 22, 2022, 01:05:27 am »
I am not sure why it loses connectivity. It was happening every 15 minutes or so a couple of times, then lasted 2 days, not happened again, but didn't reoccur yet. I don't see any report in the main page, nothing obvious where I have looked yet. Is there a good spot to pull a log from that may contain this data?
This device is not where I am at physically, so I wanted to at least make it reboot when this happens, which it doesn't, but a reboot fixes it every time.
Logged
nVIceman
Newbie
Posts: 23
Karma: 1
Re: Auto Reboot After Kernel Panic/Etc
«
Reply #3 on:
April 24, 2022, 03:38:21 am »
Still happening, still don't know why, but in the meantime, how can I auto reboot OPNsense after failed ping? I can setup ping to Internet domain and have it reboot when failing enough times to help prevent the Internet from staying down until it is manually rebooted.
Edit:
Found some script that hopefully works to try to require WAN, then reboot if needed. Time will tell.
«
Last Edit: April 24, 2022, 06:16:38 am by nVIceman
»
Logged
nVIceman
Newbie
Posts: 23
Karma: 1
Re: Auto Reboot After Kernel Panic/Etc
«
Reply #4 on:
April 24, 2022, 06:40:07 pm »
So I know the script I was using from the thread link below at least as the first ping as I could see it in the firewall log, but when the internet went down overnight, it never rebooted I could should have. I don't know if something has changed where the script no longer completely functions correctly.
https://forum.opnsense.org/index.php?topic=10924.0
Logged
nVIceman
Newbie
Posts: 23
Karma: 1
Re: Auto Reboot After Kernel Panic/Etc
«
Reply #5 on:
May 02, 2022, 05:16:10 am »
Just bumping this, OPNsense not rebooting when losing connectivity. Script linked above doesn't work to completion apparently. Regardless of this current issue, would love to have working script for when something like this happens.
Logged
Grossartig
Jr. Member
Posts: 76
Karma: 4
Re: Auto Reboot After Kernel Panic/Etc
«
Reply #6 on:
May 02, 2022, 05:19:38 pm »
I had a quick look at the script (I am by no means a shell expert), but the last command
Code:
[Select]
/usr/local/etc/rc.reboot
doesn't exist on my OPNsense 22.1.6 box anymore. Try replacing that command with
Code:
[Select]
/usr/sbin/reboot
.
Logged
nVIceman
Newbie
Posts: 23
Karma: 1
Re: Auto Reboot After Kernel Panic/Etc
«
Reply #7 on:
May 02, 2022, 09:49:57 pm »
Thanks, fails after 1 minute exactly from start of script when Internet is down, script exits with error 127.
Logged
nVIceman
Newbie
Posts: 23
Karma: 1
Re: Auto Reboot After Kernel Panic/Etc
«
Reply #8 on:
May 03, 2022, 06:14:56 pm »
OPNsense seems to be locking up, not sure if that is what is causing Internet loss or even Internet loss is causing some kind of havoc to OPNsense, but could explain why script wouldn't work anyways or why an auto reboot via cron didn't have overnight when Internet had gone down prior.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Auto Reboot After Kernel Panic/Etc