Issue of the topic: File based rules are not working after updating to 4.2.2.
I believe this may be a similar issue to this thread and maybe this one also. My rules are all file based and were working without issue until I updated to 4.2.2 on 10/16/2024. My rules completely stopped working. According to openhab.log, rule files appear to be loaded without error.
I disabled all my rule files by adding the extension “.no” after .rules and created 1 test file (test.rules) containing:
rule "System started file test.rules"
when
System started
then
logInfo("Logger", "System started has triggered in test.rules")
end
In the log file, I get (and only this):
2024-10-28 12:12:42.775 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.rules'
I created a very similar rule in the UI and it works when run via the UI but does not work when an event based trigger is used (i.e. item state changed).
Also, my event log has been empty since the upgrade to 4.2.2. Manual control of items (via Habpanel) and feedback are working correctly even though events are not registered in the logs. I think this may actually be the source of the issue. Maybe the rules are loaded, but without an events being logged, they will never trigger.
@rlkoshak I am at a loss as well. From what I can see, OH rolls the log every time it starts or when the active file hits 16MB. Based on file sizes of the compressed logs, it looks like it rolled and failed to start back up on 10/12. I did updates on 10/16, but didn’t realize stuff wasn’t working until today. Doesn’t look like a disk space issue (and there would be many other symptoms I would think):
I also thought there might be a filesystem lock on it, but I didn’t find any logs indicating that. I also think a system restart (which I tried) would have released the lock. I had no issues deleting the file as root. I should have tried as openhab to see if something else would have happened.
I also noticed that the UI debugger event viewer was working as expected. Again, I think whatever was going on with the file was the issue.