Closed sneft closed 8 years ago
Thanks for reporting this. I'll fix it.
In addition to having the scheduler.info file switch to a 0 byte file, these installations are also finding that any edits made to the file locally (say, changing the testing frequency) are being reverted back to the default settings. Typically the user notices this within a day of making any changes.
@sneft I think this needs to be a separate issue. We need to have a user-based local scheduler that is not overwritten in addition to the one updated by the server to support custom schedulers that are not managed by the server.
@sneft it seems like Centinel is being run concurrently with itself, and sometimes different instances run into each other while rewriting the scheduler. I'll try to address this by preventing unnecessary writes to the scheduler file as well as disallowing multiple instances of Centinel to run at the same time.
@sneft the logging system also can't handle multiple instances sharing the same log file.
We have an installation where the scheduler.info file is repeatedly ending up as a zero-byte empty file. As a result, it fails during sync with the 'No JSON object could be decoded' message.
Deleting the zero-byte scheduler.info file and running 'centinel --sync' solves this problem, since it will fetch a new valid scheduler.info file.
The first question is obviously why scheduler.info is periodically turning into a zero-byte file. The second question is whether centinel should fail this way; if scheduler.info is non-valid should it fetch a valid copy from the server?
Snippet of the error message, which repeats regularly, here: