Systeminfo "UNINITIALIZED" on Synology x86

Hi,

I’m using OH2 on a Synology DS216+ II (x86, DSM 6.0.3). Whatever version of OH2 I use I always get the following erroe message when trying to use the Systeminfo Binding (OH 2 version):

Status: UNINITIALIZED - HANDLER_INITIALIZING_ERROR Could not initialize class oshi.jna.platform.linux.Udev

Any idea how to solve this?

after a few reboots the message changed to:

Status: UNINITIALIZED - HANDLER_INITIALIZING_ERROR Unable to load library ‘udev’: Native library (linux-x86-64/libudev.so) not found in resource path (.:/var/packages/Java8/target/j2sdk-image/jre/lib:/volume1/@appstore/openHAB2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.1.2.jar:/volume1/@appstore/openHAB2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.1.2.jar:/volume1/@appstore/openHAB2/runtime/lib/boot/org.apache.karaf.main-4.1.2.jar:/volume1/@appstore/openHAB2/runtime/lib/boot/org.osgi.core-6.0.0.jar)

I’ve tried to locate the “libudev.so” but is does not seem to be installed.

I have the same problem on RaspberryPi openHAB 2.2.0 Build #1109

I’ve tried to set up symlinks as described in the same problem description for Pine64 but no luck!

Same issue here…

Systeminfo
Sample thing for systeminfo Binding
Status: UNINITIALIZED - HANDLER_INITIALIZING_ERROR Could not initialize class oshi.jna.platform.linux.Udev

@BGunnarB did you find a solution for this?

No, I have not. That is, I have not made any new attempts to fix this. I’m waiting for some positive news from the community.

@BGunnarB
Ok, I have got it working after some google searching :slight_smile:

Here is what you should do!

sudo nano /etc/default/openhab2

Add this row:
EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/"

Restart Openhab, and the binding works just fine …

OK!
Thanks for the tip. I think I have tried this already but I will check once again when I have the opportunity to sit down with the RPi. I might have forgotten a dash or a dot somewhere.

Thanks for the tip but on my Openhabianpi I still get the same error message:

java.lang.UnsatisfiedLinkError: Unable to load library ‘udev’: Native library (linux-arm/libudev.so) not found in resource path (/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.1.3.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.jaas.boot-4.1.3.jar:/usr/share/openhab2/runtime/lib/boot/org.apache.karaf.main-4.1.3.jar:/usr/share/openhab2/runtime/lib/boot/org.osgi.core-6.0.0.jar)

I thought that the 2.2.10 official realease for synology would solve this issue, but no change. Does anyone know, what the correct “EXTRA_JAVA_OPTS=” addition for x86 (Intel) Synology would be?

OK! Problem solved!
An update from 2.0.0 build 1109 to build 1169 solved the issue. Now the binding is initialising properly and measurements are flowing. The EXTRA_JAVA_OPTS=" line is still in /etc/default/openhab2 as described above.

We are not running on Pi’s here so anything for the synology users ?

On my DS718+ I would add the line to the file /volume1/@appstore/openHAB/runtime/bin/setenv.
However, since the file libudev.so seems to be missing on my Diskstation there is no point in trying it
:frowning:

Anyone with a SYNO machine and latest openhab got this running ?
kindest regards

1 Like

Not me. I thought maybe with OH 2.3, but no change. Meanwhile I read, that Systeminfo binding uses the OSHI API to access the information. I tried to see how to install/verify it, but no success so far.

I fixed the above by doing this…

sudo apt update && sudo apt install udev:armhf

Then you can either use a symlink or use a Java option, I have not tested the symlink but it should work if you do this. You do not need to do both, it is one or the other…

sudo ln -s /lib/linux-arm/libudev.so /lib/arm-linux-gnueabihf/libudev.so.1

The file installed is /lib/arm-linux-gnueabihf/libudev.so.1 and the binding is looking for /lib/linux-arm/libudev.so so this symlink should solve it.

Alternative method if not using the symlink is…

sudo nano /etc/default/openhab2

Add this to the java options:

EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/"