OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: kr33 on March 17, 2023, 06:33:43 PM

Title: Contantly getting 503 Service Unavailable when accessing WebGUI
Post by: kr33 on March 17, 2023, 06:33:43 PM
Hi All,

I am struggling with an issue where I constantly get the "503 Service Unavailable" error when trying to access the WebGUI. I have to restart all services to get access to the GUI again. (before enabling SSH I had to physically restart my device). I've added a screenshot to what I see.

I still have internet access when this happens so not sure where to start looking, I'm pretty new to OPNSense.

Any guidance is highly appreciated.
Title: Re: Contantly getting 503 Service Unavailable when accessing WebGUI
Post by: marcri on March 17, 2023, 09:49:46 PM
Hi, same here. "503 Service Unavailable" the 3rd time in two Days. It just happened, here some errors from
/var/log/system/latest.log  :-\


<11>1 2023-03-17T21:40:41+01:00 opn.intra.xx.xcloud opnsense 51987 - [meta sequenceId="403"] /usr/local/etc/rc.newwanipv6: The command '/usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf' returned exit code '255', the output was '2023-03-17 21:40:40: (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/mod_openssl.c.1335) SSL: inactive/expired X509 certificate '/var/etc/cert.pem' 2023-03-17 21:40:40: (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/network.c.537) can't bind to socket: 127.0.0.1:443: Address already in use'

<11>1 2023-03-17T21:40:45+01:00 opn.intra.xxx.cloud opnsense 51987 - [meta sequenceId="418"] /usr/local/etc/rc.newwanipv6: The command '/sbin/mount -r -t nullfs '/usr/local/lib/python3.9' '/var/unbound/usr/local/lib/python3.9'' returned exit code '1', the output was 'mount_nullfs: /var/unbound/usr/local/lib/python3.9: Resource deadlock avoided'

<11>1 2023-03-17T21:40:46+01:00 opn.intra.xxx.cloud opnsense 51987 - [meta sequenceId="423"] /usr/local/etc/rc.newwanipv6: The command '/bin/pkill -'TERM' -F '/var/run/updaterrd.sh.pid'' returned exit code '3', the output was 'pkill: Cannot get process list (kvm_getprocs: No such process)'

Title: Re: Contantly getting 503 Service Unavailable when accessing WebGUI
Post by: geolaramee on March 18, 2023, 01:34:13 PM
Hello,
I have same behavior.
after a while, I have the error 503 and I can see on log file that
lighttpd was complaining that socket 127.0.0.1:443 is  already in use.
And yes I verified with sockstat that the socket is already in use by lighttpd .
I restarted opnsense, I am able to login on webgui from a short period and from the dashboard webgui is marked stopped !!
Very strange behavior because after a while, the 503 error happened again.
As from the previous version, it was working fine all the time. I checked what was wrong.
Using ssh session, I tried to restart all service but it failed to start webgui.
So to solve this problem, from command line :
sockstat shows lighttpd running and listening on the right port
I stopped the lighttpd process using kill command.
I started the lighttpd using /usr/local/etc/rc.restart_webgui.
now I am able to log in webgui and it is shown as running from dashboard.
I don't understand why just after a reboot, dashboard is showing webgui not started even if lighttpd is running and listening on all sockets for the right port( listening on loopback, lan and wan addresses)

Title: Re: Contantly getting 503 Service Unavailable when accessing WebGUI
Post by: kr33 on March 22, 2023, 03:13:28 AM
A quick update on this from my end.

I had DHCPv6 enabled on my VLANS, after disabling it, it seems like the issue has not occurred again for the last few days (Crossing fingers) :-)

Now I have another issue (for another post)
Title: Re: Contantly getting 503 Service Unavailable when accessing WebGUI
Post by: franco on March 22, 2023, 08:17:48 AM
When you are on 23.1.4 try the patch here:

https://forum.opnsense.org/index.php?topic=33145.msg160384#msg160384


Cheers,
Franco