Installed latest MSR container and host time is wrong
-
Hi, I've been using msr for a while now and haven't had timezone issues until today when I updated to latest docker image (latest-22080-ae7212f)
both docker date command and my local date command show the same time, same timezone, but for some reason MSR shows the host time as 2 hours in the past as a result all my timed rules run 2 hours late.
my locale is set correctly in the host machine and is bound into the container as well.
One possible hint I get is maybe this from the container startup log, but other than timezone stuff everything else seems to be working fine and all my settings loaded up just fine.
[latest-22080]2022-04-07T07:52:52.423Z <SystemController:null> Module SystemController v22080 root {} CommonJS loading [latest-22080]2022-04-07T07:52:57.236Z <Engine:CRIT> SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at IndividualFileStrategy.getDataObject (/opt/reactor/server/lib/IndividualFileStrategy.js:121:46) at Container.getDataObject (/opt/reactor/server/lib/Container.js:102:53) at new GlobalExpression (/opt/reactor/server/lib/GlobalExpression.js:105:179) at Function.getInstance (/opt/reactor/server/lib/GlobalExpression.js:123:89) at /opt/reactor/server/lib/Engine.js:1349:67 at Array.forEach (<anonymous>) at Engine.initializeGlobalExpressions (/opt/reactor/server/lib/Engine.js:1345:145) at Engine.start (/opt/reactor/server/lib/Engine.js:590:285) at /opt/reactor/app.js:362:103
Let me know if I can provide further info to help debug this.
Thanks
-
Two things here:
-
It sounds like when you recreated the container with the new image, you missed setting the
TZ
environment variable on the container. That's detailed in the installation instructions for docker images. You don't mention if you are running docker under a regular Linux system or on a NAS where a GUI (or app like Portainer) is used, which is important to know, but this will, of course, affect how your install is done and where TZ gets set. You can confirm the setting of the variable and the correct time for the Reactor app by requesting this URL:http://your-reactor-host-ip:8111/diag/sun
-
The error message is due to an invalid storage file (apparently only one, so that's a relief). You may have had a (really) disorderly shutdown, or your disk filled at some point, which can cause this kind of corruption. The first step in trying to resolve this is to make sure you have adequate free disk space on the volume. Then simply remove the entire
states
subdirectory from under yourstorage
directory and restart Reactor. If that doesn't make it go away, you've got a corrupt Global Expression, and you should go on a hunt to see which one it is. You'll need to restore it from a backup of the storage directory (which you have, right?).
When posting messages from the log, it's imperative that you post at least a dozen lines prior to the error for context. There's a line just before your snippet that will tell you exactly which global expression is corrupted, but you haven't posted that. Please review the posting guidelines for this and other tips on writing posts in this category.
-
-
Ah, yes that was exactly it, TZ env variable was missing, no idea why it went away after portainer recreated the container.
Yeah, I'm running on linux (ubuntu 18.04lts) but I use portainer to manage my containers.
Thanks for the tip for resolving the error, I'll poke around and see if i can find one that got corrupted. I don't think I've ever had this disk ever go full before but this server has had a couple annoying crashes over the past year, maybe one of them corrupted something in reactor.
-
Ah, yes that was exactly it, TZ env variable was missing, no idea why it went away after portainer recreated the container.
Yeah, I'm running on linux (ubuntu 18.04lts) but I use portainer to manage my containers.
Thanks for the tip for resolving the error, I'll poke around and see if i can find one that got corrupted. I don't think I've ever had this disk ever go full before but this server has had a couple annoying crashes over the past year, maybe one of them corrupted something in reactor.
@maddios said in Installed latest MSR container and host time is wrong:
I'll poke around and see if i can find one that got corrupted.
Just look in the log a few lines before the error you posted. It should be named there.
-
T toggledbits locked this topic on