When removing or installing Bindings OH4 goes nuts (stops responding, prints endless logs)

So the title says everything.
As soon as I remove or install a binding OH4 stops responding, webservices go offline and endless logs get printed :confused:

“sudo service openhab stop” also does not work, I need to restart the whole PC and after a restart the bindings shows as installed or removed as indented.

OH4_crash.txt (182.7 KB)

It runs on Ubuntu 20.04.1 LTS in an Intel NUC.
openHAB 4.0.0

fyi: this is what Frontail shows me as soon as I install/remove a binding, maybe not very useful although:

thank you!

I would start to make sure that these lines do not occur first:

Transformation service JS for pattern switch2Zigbee2mqtt.js not found!

2023-07-30 23:22:41.852 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'tcp1' does not exist - ignoring it.
2023-07-30 23:22:41.853 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'plex1' does not exist - ignoring it.
2023-07-30 23:22:41.856 [WARN ] [core.karaf.internal.FeatureInstaller] - The binding add-on 'wol1' does not exist - ignoring it.
2023-07-30 23:22:41.858 [WARN ] [core.karaf.internal.FeatureInstaller] - The misc add-on 'ruleengine' does not exist - ignoring it.
2023-07-30 23:22:41.859 [WARN ] [core.karaf.internal.FeatureInstaller] - The persistence add-on 'mysql' does not exist - ignoring it.
2023-07-30 23:22:41.860 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'dashboard' does not exist - ignoring it.
2023-07-30 23:22:41.860 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'restdocs' does not exist - ignoring it.
2023-07-30 23:22:41.861 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'classic' does not exist - ignoring it.
2023-07-30 23:22:41.861 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'habmin' does not exist - ignoring it.
2023-07-30 23:22:41.861 [WARN ] [core.karaf.internal.FeatureInstaller] - The ui add-on 'paper' does not exist - ignoring it.

The second block mainly is caused by outdated version one bindinds.

Java 17 is installed and the current version ?
How does the log file look after a restart ?

Here is a logfile after a restart of the service:
openhab_startup.log (41.9 KB)

Here are the logfiles that print after I installed the shelly binding in the UI, openhab4 is basically stuck in this state:

I installed Java17, “java -version” shows:
openjdk version “17.0.7” 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu120.04, mixed mode, sharing)

Will check asap :slight_smile:

There are all kind of warning messages and hints in the startup message.
Get rid off them first.

So I got rid of them, the issue still remains :confused:
openhab4_startup.log (17.0 KB)

The log messages mention some rule files I use: “periodic_averages_POWER2.rules”, “periodic_averages_TEMP2.rules” and “periodic_HEATING.rules”.

Those rule files usually work perfectly, no issues. Only when installing/removing a binding it seems everything gets a mess.
I noticed that those rule files in the logs have one thing in common, they all access items in a dynamic way with ScriptServiceUtil.getItemRegistry.getItem(), e.g.:

gAVGTemperature.members.forEach [ Sensor |
	if( Sensor.state > -102|°C && Sensor.averageSince(now.minusMinutes(5)) !== null) {
		ScriptServiceUtil.getItemRegistry.getItem("" + Sensor.name + "_Chart_Data_AVG5min").sendCommand( Sensor.averageSince(now.minusMinutes(5)) )
	}
]