Events (or cron) are not triggering any rule anymore

With the current version 4.3.0.M2 (and 4.3.0.M1) on my installation all of a sudden no rule is triggered anymore.

Even the most simple one which is based on a manual virtual switch the rule does not trigger

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: TestTrigger2
    type: core.ItemCommandTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      type: application/javascript
      script: console.info('abc');
    type: script.ScriptAction```
  • When I change the switch the logs clearly show the state change
2024-11-10 08:08:03.827 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'TestTrigger2' received command ON
2024-11-10 08:08:03.828 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'TestTrigger2' updated to ON
2024-11-10 08:08:03.828 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TestTrigger2' changed from OFF to ON

  • When I run the rule directly, it works
2024-11-10 08:07:40.984 [INFO ] [nhab.automation.script.ui.1_radio_js] - abc

This is true for all of my rules currently.

  • It started happening while I was on M1, so I updated to M2 without any success.
  • I have restarted several times
  • I have cleaned the cache, restarted and rebooted, no success
  • Even a cron time based trigger does not work anymore
 - id: "3"
    configuration:
      cronExpression: 0/5 * * * * ? *
    type: timer.GenericCronTrigger

Can maybe someone of the maintainers give me a hint, where I can set a breakpoint to debug why the events due not trigger any rule anymore (e.g. ItemStateTriggerHandler?) as I am out of ideas… :weary:

Ok, I went on and started debugging and I have documented it, so if anyone ever wants to do a similar session, here is what needs to be done and what happens

I configured OH to allow remote debug

  • I restarted it

  • I triggered my TestTrigger2 → nothing happens.

  • I connect via IDE to remote debug and set a breakpoint to ItemCommandTriggerHandler

  • I let it sit here for a while and then after some time the first event comes in which is not surprising because in general events do work because e.g. I can switch lamps on and off. As it is not the one I am looking I let it continue.

  • I trigger the item TestTrigger2 that should run my rule and again the breakpoint kicks in

  • ItemCommandTriggerHandler.receive() is triggered

  • Item ‘TestTrigger2’ received command OFF

  • ItemCommandEvent

  • callback!=null

  - event.getTopic() = "openhab/items/TestTrigger2/command"
  - event.getType() = "ItemCommandEvent"
  - event.getPayload() = "{"type":"OnOff","value":"OFF"}"```
  • triggers ((TriggerHandlerCallback) callback).triggered(this.module, values);
    → TriggerHandlerCallbackImpl.triggered()
    → future = executor.submit(new TriggerData(trigger, context));
  • TriggerData even IS my Rule to be triggered:
    → creates new Thread

and then I let it run … and the rule IS triggered. WTx…

This is the weirdest thing I ever had… :tired_face:

And now after a while it doesn’t work again. I have disconnected the debugging…

… after a while it works again #sigh

I have to further investigate…

A small tip: It makes sense to activate the following logging via openhab-cli console:

log:set TRACE org.openhab.core.automation.internal.module.handler
or
log:set TRACE org.openhab.core.automation.internal