OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: osmom on May 02, 2023, 07:00:59 pm

Title: Version 23.1.6 Web interface did not start after reeboot
Post by: osmom on May 02, 2023, 07:00:59 pm
We install our Opensens from a standard image.
If I reebot the system over Power / Reboot, the WEB-Interface dos not start.
I can connect the opnsense wit putty and run in the shell: configctl webgui restart.

If I look in the WEB-GUI-Log it reports:
2023-05-02T18:00:57   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/server.c.1057) [note] graceful shutdown started   
2023-05-02T17:56:46   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.351) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-0 0 /tmp/php-fastcgi.socket   
2023-05-02T17:56:46   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.351) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-1 0 /tmp/php-fastcgi.socket   
2023-05-02T17:56:42   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.960) all handlers for /index.php? on .php are down.   
2023-05-02T17:56:42   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.274) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-0: No such file or directory   
2023-05-02T17:56:42   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.274) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-1: No such file or directory   
2023-05-02T17:56:36   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.351) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-0 0 /tmp/php-fastcgi.socket   
2023-05-02T17:56:36   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.351) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-1 0 /tmp/php-fastcgi.socket   
2023-05-02T17:56:33   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.960) all handlers for /index.php? on .php are down.   
2023-05-02T17:56:33   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.274) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-0: No such file or directory   
2023-05-02T17:56:33   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.274) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-1: No such file or directory   
2023-05-02T17:53:09   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.351) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-0 0 /tmp/php-fastcgi.socket   
2023-05-02T17:53:09   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.351) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-1 0 /tmp/php-fastcgi.socket   
2023-05-02T17:53:06   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.960) all handlers for /index.php? on .php are down.   
2023-05-02T17:53:06   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.274) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-0: No such file or directory   
2023-05-02T17:53:06   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.274) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-1: No such file or directory   
2023-05-02T17:51:03   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.351) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-0 0 /tmp/php-fastcgi.socket   
2023-05-02T17:51:03   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.351) gw-server re-enabled: unix:/tmp/php-fastcgi.socket-1 0 /tmp/php-fastcgi.socket   
2023-05-02T17:51:01   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.960) all handlers for /index.php? on .php are down.   
2023-05-02T17:51:01   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.274) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-0: No such file or directory   
2023-05-02T17:51:01   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/gw_backend.c.274) establishing connection failed: socket: unix:/tmp/php-fastcgi.socket-1: No such file or directory   
2023-05-02T17:50:55   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/server.c.2078) server stopped by UID = 0 PID = 30208   
2023-05-02T17:50:52   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.69/src/server.c.1704) server started (lighttpd/1.4.69)

I can only see, at the system-restart the Message "No such file or directory" is reportet. After the manual restart this Message is gone.
Title: Re: Version 23.1.6 Web interface did not start after reeboot
Post by: guru_meditation on June 30, 2023, 06:27:17 pm
First of all, Kudos to the OPNSense Team - you are doing a terrific job!

I have a similar issue with
OPNsense 23.1.11-amd64

It's a two node CARP HA setup. 
Configured mostly by web UI.

UI itself is stable and usable. Manual UI start - as opposed to the previous post - is not required.
On OS level, minor changes only, like sudo config.

When the UI is used, below pattern is contantly logged:

2023-06-30T15:14:51   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.71/src/server.c.2308) server stopped by UID = 0 PID = 76250   
2023-06-30T15:14:48   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.71/src/server.c.1216) [note] graceful shutdown started   
2023-06-30T15:13:18   Error   lighttpd   (/usr/obj/usr/ports/www/lighttpd/work/lighttpd-1.4.71/src/server.c.1909) server started (lighttpd/1.4.71)
Title: Re: Version 23.1.6 Web interface did not start after reeboot
Post by: osmom on July 21, 2023, 12:15:13 pm
Wit Version 23.1.11 I dont see this Problem.
Title: Re: Version 23.1.6 Web interface did not start after reeboot
Post by: franco on July 21, 2023, 12:56:53 pm
Likely https://docs.opnsense.org/manual/settingsmenu.html#listen-interfaces


Cheers,
Franco
Title: Re: Version 23.1.6 Web interface did not start after reeboot
Post by: ischilling on September 28, 2023, 11:15:28 am
I had the same issue. Indeed I choose only a few interfaces from on Settings/Administration page (/system_advanced_admin.php) at "Listen Interfaces".

I configured my system with IPv4 and IPv6 as fixed IPs for (all) interfaces when possible and using virtual IPs on internal interfaces too, to realize at least one fixed IPv6 for each firewall interface. I haven't had IPv6 protocol behavior in mind if doing so which led to the above problem as I just found out.

What happened is, that the OPNSense interface did configure "/var/etc/lighty-webConfigurator.conf" and here the server sockets to these fixed addresses in IPv4 and IPv6 - and, sadly but correct, added the at the time of configuration given IPv6 address of that interface in addition to the configuration file ::)

If I am asked, I would suggest to at least ask the user, if virtual and or fixed IPs are configured, whether the dynamic IP address should be used as well - or alternatively, change that one each time the interface IP changes or the system reboots... (the first one would be proficient enough if it comes to me ;))

Correct behavior though ugly since from time to time, IPv6 adresses may change, e.g., during a system reboot after an update... Since the then expected IPv6 is not available to the specific interface, (re-)starting the WebGUI fails, it surely must fail.

In my case, I simply removed the entries in question from /var/etc/lighty-webConfigurator.conf, saved it and restarted the WebGUI according to @francos' answer in https://forum.opnsense.org/index.php?topic=9128.0 (https://forum.opnsense.org/index.php?topic=9128.0) by using /usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf afterwards.

Restarting the WebGUI via command line from /usr/local/etc/rc.restart_webgui
which I found at https://forum.opnsense.org/index.php?topic=1188.03 (https://forum.opnsense.org/index.php?topic=1188.03), also by @franco, does work if the webConfigurator configuration file is valid. Same for using root console menu option (11).

As said, the problem by doing it the rc.restart or root console menu option (11) way is, there is, except for Starting web GUI...failed. or alternatively no hint at all :( no further note nor error message. You need either to dig yourself through the log-structures or start it as described above.

One last thing I found during my research and find it at least 'a bit annoying', if it should not be considered a bug is:

I find this issue annoying since OPNsense 23.x.y-amd64 and it is still the case for OPNsense 23.7.5-amd64 with today's updates.

Temporarily work-around:
* fix the configuration file
* don't open the Webconfiguration Page of the service
Title: Re: Version 23.1.6 Web interface did not start after reeboot
Post by: osmom on February 21, 2024, 12:20:58 pm
Problem wurde in den neueren Versionen gelöst.