Two reboot commands needed to reboot opnsense (WebUI)

Started by iamperson347, March 31, 2021, 02:53:10 AM

Previous topic - Next topic
Hi All,

I'm running into an odd issue where my install of opnsense will not reboot through the WebUI the first time. The dialog pops up that the reboot is happening, and the "shutdown chime" plays on the physical machine, but after a few seconds I get sent back to the dashboard. If I go to the reboot screen and select to reboot again, the system then properly reboots.

This also appears to affect reboots required/triggered by upgrades.

However, using "reboot" command via ssh shell session works fine.

I was trying to look through logs to see if I could determine what is going on but the system log doesn't really show anything at the time the issue occurs. The configd.log says "rebooting system" (or something to that effect), but that is it.

Any ideas on where else I can look to determine what might be holding things up?

It seems this may be related to ntopng and redis. When I manually ran /usr/local/etc/rc.reboot, it appears redis gets shutdown before ntopng. This causes ntopng to hang while shutting down.

I'll have to look into changing the order to see if that will fix the issue. I tried modifying the ntopng rc script to REQUIRE redis, but that didn't seem to help.

It's been reported previously. We would suggest taking this to ntopng since we can't do much about it.


Cheers,
Franco

It looks like someone reported it. We will see what ntopng devs have to say.

https://github.com/ntop/ntopng/issues/5127

Does the opnsense plugins build process generate the rc scripts, or does it come from the upstream package?

Hmmm, will it take longer than 2 hours before "Closed" because not an official package installed and apparently related to BSD script? ;-)
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

Quote from: franco on March 31, 2021, 08:56:58 AM
It's been reported previously. We would suggest taking this to ntopng since we can't do much about it.


Cheers,
Franco

Hi Franco,

Is it possible that something like this would help?

https://github.com/iamperson347/core/commit/cb75a0003389d6181403c0d10ef425423b6ce12f

I tested it on my machine and it seems to fix the issue. I don't know if this would have any ill effects, but shutting things down in the reverse of rcorder seems logical when the rc.freebsd file is called with "stop."

What do you think?


Yes, looks promising at first glance. Can you open an official PR on GitHub to discuss?


Thanks,
Franco

hi, i made the report over  on ntopng about it... not sure they are able to address this.  regardless, i'm interested in a workaround too and though perhaps a service ordering for shutdown might work as ntopng has that dependency on redis.

i have no clue how to make that happen though


Yep, to apply from console:

# opnsense-patch 7316071


Cheers,
Franco

Quote from: franco on April 11, 2021, 07:38:42 PM
Yep, to apply from console:

# opnsense-patch 7316071


Cheers,
Franco

confirmed as resolved.  i closed the ntopng issue.  thanks you all!!!

Ok, I'll add it to 21.1.5 for next week. :)


Thanks,
Franco