M3 did not turn out well for me …
No rules were executed! Tried rebooting several times. Could control items, but no rules triggered.
Downgraded to M2 and all was well again.
omr@shs2:~$ uname -a
Linux shs2 5.15.0-72-generic #79-Ubuntu SMP Wed Apr 19 08:22:18 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
omr@shs2:~$ java --version
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu122.04.2)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu122.04.2, mixed mode, sharing)
After converting from M2 to M3 I have these WARN’s in the log
2023-05-25 12:25:29.910 [WARN ] [d4j.internal.RRD4jPersistenceService] - Could not persist 'Videoporteiro__Silenciar_campainha_Running' to rrd4j database: Bad sample time: 1685013929. Last update time was 1685013929, at least one second step is required
2023-05-25 14:37:06.196 [WARN ] [d4j.internal.RRD4jPersistenceService] - Could not persist 'Sensormovimentopiso1_Occupancy' to rrd4j database: Bad sample time: 1685021821. Last update time was 1685021822, at least one second step is required
2023-05-25 20:47:06.428 [WARN ] [d4j.internal.RRD4jPersistenceService] - Could not persist 'Sensorhumidadeetemperaturacave_Temperature' to rrd4j database: Bad sample time: 1685044021. Last update time was 1685044023, at least one second step is required
Updated to M3 and now “myStrom” binding updates an item from a thing every defined refresh interval, so log will be spammed, although state of this item never changes. Here a sample, refresh interval is 10s default. Until M1 it worked correctly:
2023-05-26 22:37:07.081 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:37:17.103 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:37:27.127 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:37:37.158 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:37:47.184 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:37:57.207 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:38:07.234 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:38:17.262 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:38:27.286 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:38:37.316 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:38:47.348 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:38:57.368 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
2023-05-26 22:39:07.397 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'Ladegeraet' updated to OFF
I’m having the same issue OMR described.
After upgrading to OH4 M3, rules are no longer triggered. I’m using file based Rules DSL only.
uname output and java version are equal to those OMR already posted.
EDIT: I just noticed, that CPU consumption heavily increased after the upgrade. It seems to me, that one of the OH threads is looping infinitely. My OH instance is running inside a proxmox VM having 8 CPU threads.
after some more digging it seems to be some kind of intermittent problem.
I restarted OH about 10 times. In two out of ten cases, the rules engine came up fine and rules were processed as expected.
Please find the beginning of the openhab.log of the last successful start below:
2023-05-27 09:19:38.430 [INFO ] [org.openhab.core.Activator ] - Starting openHAB 4.0.0.M3 (build Milestone Build)
2023-05-27 09:19:38.665 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.
2023-05-27 09:19:38.666 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2023-05-27 09:19:38.667 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Measurement system set to 'SI'.
2023-05-27 09:19:39.394 [WARN ] [emeris.internal.EphemerisManagerImpl] - Erroneous day set definition dayset-school: No enum constant java.time.DayOfWeek.
2023-05-27 09:19:39.396 [WARN ] [emeris.internal.EphemerisManagerImpl] - Erroneous day set definition dayset-weekend: No enum constant java.time.DayOfWeek.
2023-05-27 09:19:39.442 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://openhab1....:8080/rest/events's Observer
2023-05-27 09:19:40.409 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.81.4:8080/rest/events/states/f9bfc959-3599-48a2-af97-629e97bab988's Observer
2023-05-27 09:19:40.433 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'darksky' does not exist - ignoring it.
2023-05-27 09:19:40.438 [WARN ] [.transport.servlet.ServletController] - Can't find the request for http://192.168.81.4:8080/rest/events/states/ce7df01d-d4d8-4699-828f-606d0ab220b8's Observer
2023-05-27 09:19:40.452 [WARN ] [core.karaf.internal.FeatureInstaller] - The transformation add-on 'javascript' does not exist - ignoring it.
2023-05-27 09:19:41.156 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'opnsense.items'
2023-05-27 09:19:41.364 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'knx.items'
2023-05-27 09:19:44.210 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'idm_terra_swm.items'
2023-05-27 09:19:44.304 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'telegram.items'
2023-05-27 09:19:44.320 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.items'
2023-05-27 09:19:44.341 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'pollen.items'
2023-05-27 09:19:44.435 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'ntp.items'
2023-05-27 09:19:44.441 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'walltablets.items'
2023-05-27 09:19:44.710 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'weather.items'
2023-05-27 09:19:44.755 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'waermepumpenzaehler.items'
2023-05-27 09:19:44.827 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'komfovent.items'
2023-05-27 09:19:44.962 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'nad_receiver.items'
2023-05-27 09:19:44.980 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'energymgmt.items'
2023-05-27 09:19:45.018 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onewire_base.items'
2023-05-27 09:19:45.250 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'renault.items'
2023-05-27 09:19:45.265 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'openWB.items'
2023-05-27 09:19:45.292 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Wall-E.items'
2023-05-27 09:19:45.296 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'APC_SmartUPS.items'
2023-05-27 09:19:45.314 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'touch1.items'
2023-05-27 09:19:45.319 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'kodi.items'
2023-05-27 09:19:45.336 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'fronius.items'
2023-05-27 09:19:45.424 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'dwdPVforcast.items'
2023-05-27 09:19:45.570 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'homeconnect.items'
2023-05-27 09:19:45.618 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '0_semantic_model.items'
2023-05-27 09:19:45.739 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'knx_manual.items'
2023-05-27 09:19:45.838 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'hcl.items'
2023-05-27 09:19:45.864 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'lueftungStudio.items'
2023-05-27 09:19:45.881 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '0_generic_groups.items'
2023-05-27 09:19:45.899 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'caldav.items'
2023-05-27 09:19:46.048 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2023-05-27 09:19:46.249 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'all.sitemap'
2023-05-27 09:19:46.558 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mobotix.things'
2023-05-27 09:19:46.574 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'renault.things'
2023-05-27 09:19:46.586 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mqtt.things'
2023-05-27 09:19:46.636 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onewire_base_hwif_og1.things'
2023-05-27 09:19:46.645 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'dwd_pollen.things'
2023-05-27 09:19:46.650 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'homeconnect.things'
2023-05-27 09:19:46.654 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'touch1.things'
2023-05-27 09:19:46.658 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'darksky.things'
2023-05-27 09:19:46.663 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'ntp.things'
2023-05-27 09:19:46.666 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'opnsense.things'
2023-05-27 09:19:46.670 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'komfovent.things'
2023-05-27 09:19:46.684 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'walltablet.things'
2023-05-27 09:19:46.693 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'fronius.things'
2023-05-27 09:19:46.701 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'telegram.things'
2023-05-27 09:19:46.705 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onewire_base_hwif_kg.things'
2023-05-27 09:19:46.714 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.things'
2023-05-27 09:19:46.718 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'knx.things'
2023-05-27 09:19:46.906 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'idm_terra_swm.things'
2023-05-27 09:19:46.914 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'onewire_base_hwif_og1-garage.things'
2023-05-27 09:19:46.918 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'kodi.things'
2023-05-27 09:19:49.074 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2023-05-27 09:19:49.176 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'nad_receiver.rules'
2023-05-27 09:19:50.376 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'komfovent.rules'
2023-05-27 09:19:51.694 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'knx.rules'
2023-05-27 09:19:53.746 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'cyclicRead.rules'
2023-05-27 09:19:54.174 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'fronius.rules'
2023-05-27 09:19:56.091 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'energymgmt.rules'
2023-05-27 09:19:56.790 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'walltablet.rules'
2023-05-27 09:19:57.653 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'opnsense.rules'
2023-05-27 09:19:57.946 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'hcl.rules'
2023-05-27 09:19:59.056 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'risk.rules'
2023-05-27 09:19:59.389 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'dwdPVforcast.rules'
2023-05-27 09:19:59.730 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'jalousie.rules'
2023-05-27 09:20:00.177 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'vsbmlw.rules'
2023-05-27 09:20:00.378 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'idm_terra_swm.rules'
2023-05-27 09:20:00.771 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'pollen.rules'
2023-05-27 09:20:01.251 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'heating.rules'
2023-05-27 09:20:01.726 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'telegram.rules'
2023-05-27 09:20:01.951 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'lueftungStudio.rules'
2023-05-27 09:20:02.599 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'mobotix.things' is either empty or cannot be parsed correctly!
2023-05-27 09:20:04.785 [INFO ] [o.internal.handler.AstroThingHandler] - Scheduled Positional job astro:sun:home every 60 seconds
2023-05-27 09:20:05.475 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Modbus manager activated
2023-05-27 09:20:05.620 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'localhost' with clientid c3ea9c62-55ee-44a9-8976-c386555911ef
2023-05-27 09:20:05.629 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.82.41' with clientid 4dd0283a-cb5c-491c-af3f-99b8e7b613a5
2023-05-27 09:20:06.909 [INFO ] [.influxdb.InfluxDBPersistenceService] - InfluxDB persistence service started.
2023-05-27 09:20:07.105 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
2023-05-27 09:20:29.720 [INFO ] [enhab.core.model.script.NAD Receiver] - rule has been triggered. Scheduling Timer to run actual initialization process...
2023-05-27 09:20:29.722 [INFO ] [ript.KNX initialize control channels] - rule has been triggered. Scheduling Timer to run actual initialization process...
2023-05-27 09:20:29.723 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.
I started to prepare for OH4 and encountered the same issue also with a clean install of openhabian on a rpi4 with Java17, OH 4.0.0.M3 and Enocean USB300 and nothing else but the Enocean binding.
Just in case anyone else trips up over this issue, In APT upgrade on Ubuntu, Ctrl-C didn’t seem to be an option to halt the process (maybe was spawned?).
Connect to the server via a separate SSH session and:
Obviously replacing the Process ID with the actual one (on the LH side column) of the upgradetool.jar process
Back over on the session where the APT upgrade running, the bottom 3 lines (below section) will then appear, and things will carry on.
Setting up openhab (4.0.0~M3-1) ...
[openHAB] Running JSON Database upgrade tool (${OPENHAB_RUNTIME}/bin/upgradetool.jar).
[main] INFO org.openhab.core.tools.internal.Upgrader - Copying item unit from state description to metadata in database '/var/lib/openhab/jsondb/org.openhab.core.items.Item.json'
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "pattern" is null
at org.openhab.core.tools.internal.Upgrader.lambda$0(Upgrader.java:104)
at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4706)
at org.openhab.core.tools.internal.Upgrader.itemCopyUnitToMetadata(Upgrader.java:93)
at org.openhab.core.tools.UpgradeTool.main(UpgradeTool.java:79)
[openHAB] WARNING: internal database upgrade tool failed.
[openHAB] please check the openHAB website (www.openhab.org) for upgrade requirements.
Setting up openhab-addons (4.0.0~M3-1) ...
After that, rebooted the system (but a service restart would be fine), and left plenty of time for OpenHAB to start, as I usually see some funky stuff after any upgrade, which comes right after a while.
Seem to be running ok on 4.0.0-M3 now after the above intervention.