OPNsense Forum

English Forums => General Discussion => Topic started by: support@etel.co.zw on August 10, 2017, 09:54:36 pm

Title: [SOLVED] Captive Portal Restart After Hardware Reboot
Post by: support@etel.co.zw on August 10, 2017, 09:54:36 pm
Dear Community,

I am new to OPNSENSE and its exciting.  My challenge is that , I am running OPNSENSE on XEN Server, when the  Server Hardware reboot, OPNSENSE reboots but Captive Portal will be down.   My Captive portal is using Free Radius as an authentication server.  I am having to restart the Captive Portal Service.

May you assist on this one.

Buta
Harare Zimbabwe
Title: Re: Captive Portal Restart After Hardware Reboot
Post by: QuentinC on August 13, 2017, 09:32:23 pm
Hello,

Just to say that I'm experiencing the same behavior on my own configuration. In my case it's running on a dedicated hardware.

Thanks,

Quentin
Title: Re: Captive Portal Restart After Hardware Reboot
Post by: QuentinC on August 14, 2017, 04:23:29 pm
Hello,

After some investigation on this, it seems that the PID file (/var/run/lighttpd-api-dispatcher.pid) is not cleaned when power outage occurs.
This file breaks the startup script of the Captive Portal.

I think that a simple check should be enough for this (checking that the PID is still alive).

Thanks,

Quentin Canel
Title: Re: Captive Portal Restart After Hardware Reboot
Post by: franco on August 15, 2017, 11:46:40 am
Hi Quentin,

Indeed, nice catch. A patch[1] is available for testing. :)

# opnsense-patch b3cfe6e


Cheers,
Franco

[1] https://github.com/opnsense/core/commit/b3cfe6e
Title: Re: Captive Portal Restart After Hardware Reboot
Post by: QuentinC on August 16, 2017, 06:16:42 pm
Works perfectly for me thanks ! :)
Title: Re: [SOLVED] Captive Portal Restart After Hardware Reboot
Post by: franco on August 16, 2017, 06:22:18 pm
Yay, thanks for testing. :)