I’ve had a rules DSL script that has been working for a few years without problem that calls executeCommandLine. This just started failing, and I think it coincides with a recent update to Java17. I have:
openjdk version “17.0.10” 2024-01-16 LTS
OpenJDK Runtime Environment Zulu17.48+15-CA (build 17.0.10+7-LTS)
OpenJDK 64-Bit Server VM Zulu17.48+15-CA (build 17.0.10+7-LTS, mixed mode, sharing)
The rule is:
createTimer(now, [|
logInfo("GetCal", "running script to collect calendar data")
var String results = executeCommandLine(Duration.ofSeconds(10),"/etc/openhab/scripts/CalSyncHAB.sh")
logInfo("GetCal", results)
])
The log shows:
2024-02-08 08:30:30.381 [INFO ] [org.openhab.core.model.script.GetCal] - running script to collect calendar data
2024-02-08 08:30:30.589 [WARN ] [rg.openhab.core.io.net.exec.ExecUtil] - Failed to execute commandLine '[/etc/openhab/scripts/CalSyncHAB.sh]'
2024-02-08 08:30:30.590 [INFO ] [org.openhab.core.model.script.GetCal] - null
That’s not a lot of info to debug. Any suggestions on how to debug further? A few days ago this was working fine - nothing has changed in the OH configuration, so that’s why I suspect the Java17 change.
If I run that script from the command line as the OH user it works fine.
openHAB 4.1.1 (build Release Build)