i have a HomeAsstistant installation in Docker on a Synology. After the last Upgrade or an crash, i do ot know any more, i get the following error in logs:
/bin/sh: /config/vclient: not found
2022-07-19 10:39:25 ERROR (SyncWorker_0) [homeassistant.components.command_line] Command failed: /config/vclient -h 192.168.111.36 -p 3002 -c getWWEinmal
2022-07-19 10:39:25 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: list object has no element 1 (value: None, template: {{ ( value.split(':')[1] | int ) == 2 }})
/bin/sh: /config/vclient: not found
vclient is a program to connect to a Vissmann Heater. If I run the program from a Container Bash Shell I get the following error:
it was an act of desperation. I have replaced the vclient with a new on, but without any changes. Then I have reverted HA to 2022.6.7 and the sensor is functioning. So the source of the problem is the update to 2022 7.5. But I can’t see any hint to the posible cause in the release log.
bash-5.1# /config/vclient
bash: /config/vclient: No such file or directory
and on HA 2022 6.5
bash-5.1# /config/vclient
usage:
vclient [-h <ip:port>] [-c <command1,command2,..>] [-f <commandfile>]
[-s <csv file>] [-t <template file>] [-o <output file>]
[-x <exec file>] [-k] [-m] [-v]
or:
vclient [--host <ip>] [--port <port>] [--command <command1,command2,..>]
[--commandfile <command file>] [--csvfile <csv file>]
[--template <template file>] [--output <output file>]
[--execute <exec file>] [--cacti] [--munin] [--verbose]
[command3 [command4] ...]
-h|--host <IPv4>:<Port> or <IPv6> of vcontrold
-p|--port <port> of vcontrold when using IPv6
-c|--command List of commands to be executed, sparated by commas
-f|--commandfile Optional command file, one command per line
-s|--csvfile Format output in CSV for further processing
-t|--template Template, variables are substituted with acquired values
-o|--output Write to given file instead of STDOUT
-x|--execute The converted template (cf. -t) is written to the given
file and executed subsequently
-m|--munin Output a Munin data logger compatible format (units and
error details are discarded)
-k|--cacti Output a Cacti data logger compatible format (units and
error details are discarded)
-v|--verbose Be verbose (for testing purposes)
-V|--Version Print version and exit
-4|--inet4 IPv4 is preferred
-6|--inet6 IPv6 is preferred
(if none of the two above is set, the system default will
be used)
--help Display this help message
I tried to copy some other executables into /config. Compiled stuff. None of them would work.
It is as though /config is mounted with the noexec flag, which prevents execution of binaries. scripts with a shebang (eg #!/bin/bash) will still work in a noexec mount because it is actually executed by /bin/bash.
Then of course there is docker on top of that to consider.
I know this thread is old, but I would like to propose a possible solution to anyone interested.
I encountered the same problem with a compiled executable after the upgrade to 2022.7.7. The binary (aurora) is mounted from the host system in a directory /host/bin in the container.
The error after the upgrade is:
/bin/sh: /host/bin/aurora: not found
After some digging around, I found out using the file command that the executable was dynamically linked, requiring the loader ld-linux-aarch64.so.1 to load the shared libraries.
Inside the docker image homeassistant/raspberrypi4-64-homeassistant:2022.6.7 there is the required library, which is a symlink to the musl C version.
$ ls -al /lib/
lrwxrwxrwx 1 root root 27 May 24 2022 ld-linux-aarch64.so.1 -> /lib/libc.musl-aarch64.so.1
-rwxr-xr-x 1 root root 633328 May 9 2021 *ld-linux-aarch64.so.1*
The library ld-linux-aarch64.so.1 however is missing in the image homeassistant/raspberrypi4-64-homeassistant:2022.7.7, causing the misleading error.
Since I had access to the source code of this application, to solve this issue I recompiled the executable using static linking, eliminating the need for the shared library.
TLDR: There was an update in the upstream Docker image that removed a C library required to run the binary program.