Executing Commandline - Error

Hi, i’m on 4.3.3 and a heating rule that always starts in winter season suddenly does not work anymore. Any clue what the reason may be without changing or touching the system for a longer period of time. Curl works in terminal.

executeCommandLine("curl", "-X", "POST", "-d", "value=1803", "``http://192.168.1.10:8080/user/var/120/10102/0/0/12080``") executeCommandLine("curl", "-X", "POST", "-d", "value=280", "``http://192.168.1.10:8080/user/var/120/10101/0/0/12127``")

that is the beginning of the long long error logged message.

2025-11-02 10:15:04.017 [WARN ] [rg.openhab.core.io.net.exec.ExecUtil] - Error occurred when executing commandLine ‘[curl, -X, POST, -d, value=280, ``http://192.168.1.10:8080/user/var/120/10101/0/0/12127``]’
java.io.IOException: Cannot run program “curl”: error=0, Failed to exec spawn helper: pid: 951009, exit value: 1
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1143) ~[?:?]
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1073) ~[?:?]
at org.openhab.core.io.net.exec.ExecUtil.executeCommandLine(ExecUtil.java:59) ~[?:?]
at org.openhab.core.model.script.actions.Exec.executeCommandLine(Exec.java:39) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?]

Thanks for any hint what may have changed to check it out.

Those `` look weird. Try:

executeCommandLine("curl", "-X", "POST", "-d", "value=1803", "http://192.168.1.10:8080/user/var/120/10102/0/0/12080") 

Note to self / whoever has the time to look into this:
We need to make sendHttpPostRequest easier to use for posting form data such as in this situation.

1 Like

Any chance you updated Java recently? That sometimes breaks executeCommandLine for me. Restarting OH solves it.

1 Like

sorry, the “ just look weird here, in my terminal window at the config file its all fine. but thanks, was worth giving it a try

Thanks a lot, for sure over summer there was a JAVA update, must have been without a reboot, system runs fine over weeks without any reboot.

After rebooting, all works fine immedately. thanks for your hint!!!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.