I'm user of the openhab/openhab docker image. For my doorbell I require the doorbird binding which seems to require libsodium23 to be installed on the system.
Expected Behavior
With a properly installed and setup doorbird binding the items provided through that binding should update as expected (esp. when ringing the doorbell).
Current Behavior
when everything is setup as it should be everything looks ok at a first glance (the thing and all items are displayed as ONLINE in the OpenHAB UI)
but the items are not updated as expected when I ring the doorbell
in the logs there is an error about missing libsodium crypto library:
19:53:11.205 [INFO ] [er.DoorbirdEvent$LazySodiumJavaHolder] - Failed to load libsodium crypto library!!
java.lang.UnsatisfiedLinkError: Unable to load library 'sodium':
libsodium.so: cannot open shared object file: No such file or directory
libsodium.so: cannot open shared object file: No such file or directory
Native library (linux-aarch64/libsodium.so) not found in resource path (/openhab/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.4.3.jar:/openhab/runtime/lib/boot/org.apache.karaf.jaas.boot-4.4.3.jar:/openhab/runtime/lib/boot/org.apache.karaf.main-4.4.3.jar:/openhab/runtime/lib/boot/org.apache.karaf.specs.activator-4.4.3.jar:/openhab/runtime/lib/boot/osgi.core-8.0.0.jar:/openhab/runtime/lib/jdk9plus/istack-commons-runtime-3.0.10.jar:/openhab/runtime/lib/jdk9plus/jakarta.xml.bind-api-2.3.3.jar:/openhab/runtime/lib/jdk9plus/javax.annotation-api-1.3.2.jar:/openhab/runtime/lib/jdk9plus/jaxb-runtime-2.3.3.jar:/openhab/runtime/lib/jdk9plus/org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:/openhab/runtime/lib/jdk9plus/txw2-2.3.3.jar)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:307) ~[?:?]
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:467) ~[?:?]
at com.sun.jna.Native.register(Native.java:1774) ~[?:?]
at co.libly.resourceloader.SharedLibraryLoader.registerLibraryWithClasses(SharedLibraryLoader.java:74) ~[?:?]
at co.libly.resourceloader.SharedLibraryLoader.loadSystemLibrary(SharedLibraryLoader.java:42) ~[?:?]
at com.goterl.lazycode.lazysodium.utils.LibraryLoader.loadAbsolutePath(LibraryLoader.java:103) ~[?:?]
at com.goterl.lazycode.lazysodium.SodiumJava.<init>(SodiumJava.java:39) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent$LazySodiumJavaHolder.loadLazySodiumJava(DoorbirdEvent.java:89) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent$LazySodiumJavaHolder.<clinit>(DoorbirdEvent.java:78) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.getLazySodiumJavaInstance(DoorbirdEvent.java:101) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.decryptV1(DoorbirdEvent.java:182) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.decrypt(DoorbirdEvent.java:160) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.processPacket(DoorbirdUdpListener.java:122) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.receivePackets(DoorbirdUdpListener.java:95) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.run(DoorbirdUdpListener.java:65) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Suppressed: java.lang.UnsatisfiedLinkError: libsodium.so: cannot open shared object file: No such file or directory
at com.sun.jna.Native.open(Native Method) ~[?:?]
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:197) ~[?:?]
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:467) ~[?:?]
at com.sun.jna.Native.register(Native.java:1774) ~[?:?]
at co.libly.resourceloader.SharedLibraryLoader.registerLibraryWithClasses(SharedLibraryLoader.java:74) ~[?:?]
at co.libly.resourceloader.SharedLibraryLoader.loadSystemLibrary(SharedLibraryLoader.java:42) ~[?:?]
at com.goterl.lazycode.lazysodium.utils.LibraryLoader.loadAbsolutePath(LibraryLoader.java:103) ~[?:?]
at com.goterl.lazycode.lazysodium.SodiumJava.<init>(SodiumJava.java:39) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent$LazySodiumJavaHolder.loadLazySodiumJava(DoorbirdEvent.java:89) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent$LazySodiumJavaHolder.<clinit>(DoorbirdEvent.java:78) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.getLazySodiumJavaInstance(DoorbirdEvent.java:101) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.decryptV1(DoorbirdEvent.java:182) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.decrypt(DoorbirdEvent.java:160) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.processPacket(DoorbirdUdpListener.java:122) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.receivePackets(DoorbirdUdpListener.java:95) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.run(DoorbirdUdpListener.java:65) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Suppressed: java.lang.UnsatisfiedLinkError: libsodium.so: cannot open shared object file: No such file or directory
at com.sun.jna.Native.open(Native Method) ~[?:?]
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:210) ~[?:?]
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:467) ~[?:?]
at com.sun.jna.Native.register(Native.java:1774) ~[?:?]
at co.libly.resourceloader.SharedLibraryLoader.registerLibraryWithClasses(SharedLibraryLoader.java:74) ~[?:?]
at co.libly.resourceloader.SharedLibraryLoader.loadSystemLibrary(SharedLibraryLoader.java:42) ~[?:?]
at com.goterl.lazycode.lazysodium.utils.LibraryLoader.loadAbsolutePath(LibraryLoader.java:103) ~[?:?]
at com.goterl.lazycode.lazysodium.SodiumJava.<init>(SodiumJava.java:39) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent$LazySodiumJavaHolder.loadLazySodiumJava(DoorbirdEvent.java:89) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent$LazySodiumJavaHolder.<clinit>(DoorbirdEvent.java:78) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.getLazySodiumJavaInstance(DoorbirdEvent.java:101) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.decryptV1(DoorbirdEvent.java:182) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.decrypt(DoorbirdEvent.java:160) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.processPacket(DoorbirdUdpListener.java:122) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.receivePackets(DoorbirdUdpListener.java:95) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.run(DoorbirdUdpListener.java:65) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Suppressed: java.io.IOException: Native library (linux-aarch64/libsodium.so) not found in resource path (/openhab/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.4.3.jar:/openhab/runtime/lib/boot/org.apache.karaf.jaas.boot-4.4.3.jar:/openhab/runtime/lib/boot/org.apache.karaf.main-4.4.3.jar:/openhab/runtime/lib/boot/org.apache.karaf.specs.activator-4.4.3.jar:/openhab/runtime/lib/boot/osgi.core-8.0.0.jar:/openhab/runtime/lib/jdk9plus/istack-commons-runtime-3.0.10.jar:/openhab/runtime/lib/jdk9plus/jakarta.xml.bind-api-2.3.3.jar:/openhab/runtime/lib/jdk9plus/javax.annotation-api-1.3.2.jar:/openhab/runtime/lib/jdk9plus/jaxb-runtime-2.3.3.jar:/openhab/runtime/lib/jdk9plus/org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:/openhab/runtime/lib/jdk9plus/txw2-2.3.3.jar)
at com.sun.jna.Native.extractFromResourcePath(Native.java:1145) ~[?:?]
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:281) ~[?:?]
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:467) ~[?:?]
at com.sun.jna.Native.register(Native.java:1774) ~[?:?]
at co.libly.resourceloader.SharedLibraryLoader.registerLibraryWithClasses(SharedLibraryLoader.java:74) ~[?:?]
at co.libly.resourceloader.SharedLibraryLoader.loadSystemLibrary(SharedLibraryLoader.java:42) ~[?:?]
at com.goterl.lazycode.lazysodium.utils.LibraryLoader.loadAbsolutePath(LibraryLoader.java:103) ~[?:?]
at com.goterl.lazycode.lazysodium.SodiumJava.<init>(SodiumJava.java:39) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent$LazySodiumJavaHolder.loadLazySodiumJava(DoorbirdEvent.java:89) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent$LazySodiumJavaHolder.<clinit>(DoorbirdEvent.java:78) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.getLazySodiumJavaInstance(DoorbirdEvent.java:101) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.decryptV1(DoorbirdEvent.java:182) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdEvent.decrypt(DoorbirdEvent.java:160) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.processPacket(DoorbirdUdpListener.java:122) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.receivePackets(DoorbirdUdpListener.java:95) ~[?:?]
at org.openhab.binding.doorbird.internal.listener.DoorbirdUdpListener.run(DoorbirdUdpListener.java:65) ~[?:?]
Possible Solution
installing the libsodium23 packge in the docker container solves that issue
my temporary fix is to use a custom Dockerfile to install this additional dependency:
FROM openhab/openhab:4.0.4
libsodium required by doorbird binding
RUN apt-get update
RUN apt-get install -y libsodium23
## Steps to Reproduce
- create a openhab/openhab:4.0.4 docker instance
- install doorbird binding
- create doorbird thing:
- ring the doorbird doorbell device (in my case a D210FV)
- check the openhab logs and the item states
## Context
I was able to fix that issue by creating a custom Dockerfile which installs the libsodium23 package.
## Your Environment
- doorbird D210FV device connected via LAN (reachable via `doorbird` hostname in my LAN)
- openhab docker container running on raspberry pi
- I experienced the same issue already with the 3.0.3 version of the image
### Image
* openHAB version: 4.0.4
* Image tag used: 4.0.4
### Docker Host
* Operating System: Debian GNU/Linux 12 (bookworm) (Raspian Lite image)
* Docker Version: 24.0.7
* Kernel Version: 6.1.0-rpi7-rpi-v8
* Architecture: aarch64
### Configuration
- `compose.yaml`:
Summary
I'm user of the openhab/openhab docker image. For my doorbell I require the doorbird binding which seems to require libsodium23 to be installed on the system.
Expected Behavior
With a properly installed and setup doorbird binding the items provided through that binding should update as expected (esp. when ringing the doorbell).
Current Behavior
Possible Solution
libsodium23
packge in the docker container solves that issueDockerfile
to install this additional dependency:libsodium required by doorbird binding
RUN apt-get update RUN apt-get install -y libsodium23
Thing doorbird:d210x:DoorbellWe2 "Doorbird Doorbell D210FV" [ doorbirdHost="doorbird", userId="ghpwvc0002", userPassword="xxxxxxxxx", doorbellOffDelay=3, imageRefreshRate=30 ]
Switch doorbell_pressed_we2 "Doorbell Pressed [%s]" ["Switch"] { channel="doorbird:d210x:DoorbellWe2:doorbell" [profile="rawbutton-on-off-switch"] }
DateTime doorbell_pressed_timestamp_we2 "Doorbell Pressed Timestamp [%1$tA, %1$tm/%1$td/%1$tY %1$tl:%1$tM %1$tp]"
openhab_wohnung_2:
image: openhab/openhab:4.0.4
volumes:: openhab_we2_addons: openhab_we2_userdata:
FROM openhab/openhab:4.0.4
libsodium required by doorbird binding
RUN apt-get update RUN apt-get install -y libsodium23