Time Sync Warning Message in STATUS
-
@toggledbits in 21153, I'm getting this rather consistent warning message every time I click on "Status":
System Configuration Check The time on this system and on the Reactor host are significantly different. This may be due to incorrect system configuration on either or both. Please check the configuration of both systems.
Thing is, my system time and MSR's clock match exactly, and in turn match Internet time precisely for my time zone. Also, the TZ variable is set correctly in my Docker setup.
-
If the browser time and the system time differ by more than 5 seconds, you will get this warning.
I find that most often, it's the browser system, that is, the desktop OS, that's at fault here. They're pretty loose with time synchronization (well, one in particular; guess which?). But it's important because this can affect your debugging and interpretation of rules: the clock in the UI is showing you local (browser) time, but the rules are executing in host time. So if the clocks diverge by 10 seconds, for example, you might see a time-based rule react 10 seconds before or after what you expect based on comparison to the browser's time.
This is done irrespective of time zone. It makes no difference if the time zone of the browser and host are different, as their time will nonetheless be the same. Timezone does not modify time; it modifies the display of time. The same moment on systems in two different time zones is the same integer on both systems.
I'm still "tuning" what an appropriate amount of error is to stimulate the warning. Five seconds seems generous, but maybe it needs to be more. This has been in several versions (since 21117 on April 27), and I've only seen it spontaneously once myself.
EDIT: If you get this message, you can F12/open the developer console on your browser, and you should see a "UI CHECK" message logged in the console stream that gives you the time of both browser and host, and difference.
-
If the browser time and the system time differ by more than 5 seconds, you will get this warning.
I find that most often, it's the browser system, that is, the desktop OS, that's at fault here. They're pretty loose with time synchronization (well, one in particular; guess which?). But it's important because this can affect your debugging and interpretation of rules: the clock in the UI is showing you local (browser) time, but the rules are executing in host time. So if the clocks diverge by 10 seconds, for example, you might see a time-based rule react 10 seconds before or after what you expect based on comparison to the browser's time.
This is done irrespective of time zone. It makes no difference if the time zone of the browser and host are different, as their time will nonetheless be the same. Timezone does not modify time; it modifies the display of time. The same moment on systems in two different time zones is the same integer on both systems.
I'm still "tuning" what an appropriate amount of error is to stimulate the warning. Five seconds seems generous, but maybe it needs to be more. This has been in several versions (since 21117 on April 27), and I've only seen it spontaneously once myself.
EDIT: If you get this message, you can F12/open the developer console on your browser, and you should see a "UI CHECK" message logged in the console stream that gives you the time of both browser and host, and difference.
@toggledbits I indeed found this after poking around in F12 Console:
UI TIME CHECK: Local 1622825564024 offset -300 host 1622825569159 offset -300 diff 5135
So I plan (after posting this msg) to hard-refresh Chrome and then restart Reactor, and check that line again.
UPDATE: Well, that appeared to have changed/rectified nothing at all, and I still see:
UI TIME CHECK: Local 1622825753689 offset -300 host 1622825758835 offset -300 diff 5146
However, while mucking about in Console, I also noticed a slew of these entries (in %(#f20707)[red]) and wonder if something's amiss:
Failed to load resource: the server responded with a status of 404 (Not Found) ClientAPI.js:282 WebSocket connection to 'ws://192.168.86.218:8111/wsapi' failed: _0x22e858 @ ClientAPI.js:282 ClientAPI.js:295 API: error during open ws://192.168.86.218:8111/wsapi Event
-
Nothing's amiss, your time is just a little out of sync. The messages are just the browser/GUI trying to load before the API has come up on the server side. It's not instant. The server loads the controllers first, and if you have a lot of devices on the Vera in particular, it will take a few seconds. In the meanwhile, the GUI is trying to connect and won't be allowed, so it will retry until it succeeds.
As for the time, check that your NTP configuration on the NAS is good. Go to the Synology control panel and search for NTP. You should find it under Regional Settings. Check the config, that you're syncing automatically via NTP, and there's a button there that you can hit to sync immediately.
On the Windows side (assuming that's what you're using), right-click on the time/date in the task bar and choose "Adjust date/time". Make sure automatic time setting is enabled. There's a "Sync Now" button you can hit to force a time update.
Mac? I have no idea.
-
Funny enough, I had already done all those things (and more, including restart of Docker container), and all were set correctly. Leave these tips up for anyone similarly encumbered. I'll let you know if my MSR/Chrome/Windows/Docker/Container decide to fly right.
UPDATE: I then performed a hard-refresh (CTRL-F5) of my browser, and the error message did not return on next visit to STATUS, so evidently that's the sine qua non of the reset checklist.
-
T toggledbits locked this topic on