SystemInfo initialization error on Pine64

Adding the EXTRA_JAVA_OPTS to /etc/default/openhab2 fixed the “Local computer - Systeminfo” for me as well.

Thanks,
/Raj

With the update to the 2.2.0-SNAPSHOT Build #986 which also upgraded to Java 64 Bit the
-Djna.library.path=/lib/arm-linux-gnueabihf/ needs to be removed from EXTRA_JAVA_OPTS
otherwise one gets libudev not found exception on start of openHAB and Systeminfo is not initialized.

Why/how that? Imho, we should all be still on Java 32bit…

I’m running on a pine64 and when i did apt-get update and upgrade to install the latest snapshot openhab2 was held back. So i installed openhab2 explicitly with apt-get install openhab2.
This installed also java 64bit.
The following additional packages will be installed:
ca-certificates-java java-common libnspr4 libnss3 libnss3-nssdb openjdk-8-jdk-headless openjdk-8-jre-headless

PS: I still have the console log output of the installation.

This installed also java 64bit.

@Benjy & @ThomDietrich I hope you agree that this should not happen. Do you have any explanation for it?

The new openHAB packages recommend java 8 if they do not find it in another package, I found this to be expected by a few people. These packages don’t specify 32-bit or 64-bit and I don’t know if there’s any way of specifying how.

What makes 64-bit java problematic with openHAB2? I don’t think this has been mentioned in the docs and anyone following the java package install instructions may be on 64-but java anyhow.

Edit: found the reason for ARM on the main docs page. @Kai, is there any reason why non ARM architectures shouldn’t be on 64-bit?

I can remove the Java reccomendation for arm64 only, We can also reduce “Recommends” to “Suggests” but this puts us back to not installing java automatically when not found.

Previously we were using 32bit Zulu java on the Pine64.

I just recently upgrade to 2.1 and noticed I was running Oracle java again, I had assumed it was something I had done when we were testing the Openhabian pine install. Now I’m not so sure, was it part of the upgrade?

Zulu is the default with openHABian now with oracle just being a user selectable option.

@Jue_Wis The steps openHABian takes to install the 32 bit Zulu Java can be found here.

When i started with openHAB on pine64 i installed it on Ubuntu 16.04 with java 64bit and later changed to 32bit.
It seems that now everything is working with 64bit Java (openjdk-8-jdk-headless openjdk-8-jre-headless) except i can not get jsr223 with jython working. What seemed to be problematic was serial and this topic which is now working with 64bit.

Does serial work with 64bit Java on your pine64?

https://github.com/openhab/openhab2-addons/issues/1562#issuecomment-267135624

I am not aware of any reason against it (on non-ARM), but there aren’t really reasons for it either :wink:

Fair enough :slight_smile: Concidering the vast number of ways to install Java, it would be unnecessary to assume that a specific package should be installed.

From now onwards, any new .deb openHAB package will simply suggest a java 8 package during apt installation if it doesn’t detect one.

I’m using a Z-Wave USB-Stick ZME-UZB1 and on startup i see these messages:
13:18:38.018 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM1’
13:18:38.246 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
13:18:38.296 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
13:18:38.384 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
13:18:38.386 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
13:18:38.890 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:device:403cf9f9:node4’ changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
13:18:38.896 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:device:403cf9f9:node4’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
13:18:39.010 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:device:403cf9f9:node5’ changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
13:18:39.014 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘zwave:device:403cf9f9:node5’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
13:18:41.518 [WARN ] [ssage.ApplicationCommandMessageClass] - NODE 4: Not initialized yet, ignoring message.
13:18:41.524 [WARN ] [ssage.ApplicationCommandMessageClass] - NODE 5: Not initialized yet, ignoring message.
13:18:41.530 [WARN ] [ssage.ApplicationCommandMessageClass] - NODE 5: Not initialized yet, ignoring message.
13:18:41.671 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
13:18:41.674 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 4: Node found
13:18:41.677 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 5: Node found
13:18:41.680 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
13:18:41.683 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller

I assume this is using the Java serial transport.

I believe so.
The Z-Wave binding has a dependency on the nrjavaserial bundle and this doesn’t work with Java 64bit on Pine64

openhab> list -s |grep -i zwave
206 | Active   |  80 | 2.2.0.201707190537     | ZWave Binding                                          | org.openhab.binding.zwave
openhab> bundle:requirements 206 |grep serial
   osgi.wiring.package; gnu.io 3.12.0.OH from com.neuronrobotics.nrjavaserial_3.12.0.OH [186]
openhab> list -s |grep -i serial
186 | Active   |  80 | 3.12.0.OH              | nrjavaserial  

see the link to Kai’s comment above on this.

It looks like you must use a 32bit JVM

This is what java -version says
ubuntu@localhost:~$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
How can i find out what version openhab is using.

I believe that openHAB will use the system default option

to check this:

update-alternatives --config java

I recommend Zulu for ARM:

even better:
http://docs.openhab.org/installation/openhabian.html#pine-a64

ubuntu@localhost:~$ update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

  • 0 /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java 1081 auto mode
    1 /opt/jdk1.8.0_131/bin/java 1 manual mode
    2 /usr/lib/jvm/java-8-openjdk-arm64/jre/bin/java 1081 manual mode

I switched to option 1 which is the old 32bit java.
Restart of openhab is giving the exception libudev.so not found for systeminfo, what this thread is all about.
Addding back EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/"

Other than this i see no difference between running 64bit vs. 32bit.

Any idea how to get this working on Synology ? Can’t find a libudev there

1 Like

same question on how to get the binding to work on a synology.

Same for me; Synology DS716 OH2.3

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/openHAB/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.1.5.jar:/volume1/@appstore/openHAB/runtime/lib/boot/org.apache.karaf.jaas.boot-4.1.5.jar:/volume1/@appstore/openHAB/runtime/lib/boot/org.apache.karaf.main-4.1.5.jar:/volume1/@appstore/openHAB/runtime/lib/boot/org.osgi.core-6.0.0.jar)

Best, Jay