OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: Dunuin on October 25, 2021, 01:29:23 PM

Title: WebUI only accessible after restarting all services
Post by: Dunuin on October 25, 2021, 01:29:23 PM
Hi,

I've got a OPNsense 21.7.3 running inside a VM (bhyve hypervisor using KVM) on my TrueNAS server.
Always when I start that VM I can't access the webUI and chrome is showing a "ERR_SSL_PROTOCOL_ERROR" error. I need to login using SSH and run "11) Reload all services". After that the webUI is working.

Someone knows what causes this? It quite annoying to always do the workaround restarting all servives using SSH.

In the Web GUI log are no hints:
2021-10-25T13:17:45 lighttpd[69840] (server.c.1513) server started (lighttpd/1.4.59)
2021-10-25T13:17:45 lighttpd[7378] (server.c.1976) server stopped by UID = 0 PID = 80262
2020-10-25T15:18:37 lighttpd[7378] (server.c.1513) server started (lighttpd/1.4.59)


Title: Re: WebUI only accessible after restarting all services
Post by: Fright on October 25, 2021, 10:29:52 PM
Hi
VM time sync on start may be
Title: Re: WebUI only accessible after restarting all services
Post by: Patrick M. Hausen on October 25, 2021, 11:27:40 PM
If it's a time sync problem you need to be aware that some hypervisors present a clock in local time at VM startup. Instead of UTC as expected by any reasonable Unix system including OPNsense.
Traditionally this has been a concern for people who alternatingly boot e.g. FreeBSD and Windows, because Windows expects the CMOS/BIOS clock to run on local time.

FreeBSD can deal with that by creating a file in /etc:
touch /etc/wall_cmos_clock

I'm checking if that feature is already present in OPNsense or not. If the latter, I am going to implement it.

HTH,
Patrick
Title: Re: WebUI only accessible after restarting all services
Post by: Dunuin on November 14, 2021, 10:15:50 AM
I booted into BIOS and the RTC was already set to UTC. So any other ideas?
Title: Re: WebUI only accessible after restarting all services
Post by: Fright on November 14, 2021, 03:15:32 PM
still think that this is due to time issues. if you clear the logs and reboot, any records appear with a time different from the current one?