Nrjavaserial upgrade causes "Serial Error: Port /dev/ttyACM0 does not exist"

Same issue here. Running a raspberry pi 2, with the online version from about a week back; issue persisted after updating to the latest version as of today. I only noticed the issue today after installing the hue emulation and then restarting openhab, so suspect the restart of openhab after an earlier system update is when it started going wrong.

Palatia’s solution to install liblockdev1-dev fixed it for me.

I manually installed the liblockdev1 and liblockdev1-dev packages (not available via apt-get). The issue persists for me.

Thanks Marcel
I’m really new to openhab. Having a hard time understanding what I have to do.
I need to replace the current nrjavaserial with a older version?
If that is correct where can I get it?

I was able to get mine working. I had to remove the LCK file from /var/run/lock that persisted after stopping OH1 - and also ensure liblockdev1 and liblockdev1-dev were installed.

All, as this serial lib upgrade seems to cause more issues than it solves, I have just reverted the commit again (see here). The next distro build will come with the old lib again, so that the issue here should go away.

2 Likes

Downloaded latest package via apt-get and can confirm that I no longer get Not Found .
Thanks!!

I just did the latest update of openhab2 offline. My Aeon zwave is still not there. Most be something else?

2016-12-27 13:40:44.654 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:4a80d3fa’ changed from UNINITIALIZED to INITIALIZING
2016-12-27 13:40:44.789 [ThingUpdatedEvent ] - Thing ‘zwave:serial_zstick:4a80d3fa’ has been updated.
2016-12-27 13:40:44.798 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:4a80d3fa’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2016-12-27 13:40:44.806 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:4a80d3fa’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyACM0 does not exist

I think the offline package is only build occasionally (maybe only once a day during the night). So a recent change in the code is not necessarily integrated immediately.

The online package was update today to resolve this:

Preparing to replace openhab2-online 2.0.0~20161226183012 (using .../openhab2-online_2.0.0~20161227112533_all.deb) ...
Unpacking replacement openhab2-online ...
Setting up openhab2-online (2.0.0~20161227112533) ...

It went from 3012 to 2533 as you can see.
Can you see is the offline package was also updated today?

Edit: Second one on the ball …

Hmmm. This what I just got doing an upgrade. Seems be over writing the same version

$ sudo apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
openhab2-offline
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/181 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database … 235679 files and directories currently installed.)
Preparing to unpack …/openhab2-offline_2.0.0~20161227112533_all.deb …
Unpacking openhab2-offline (2.0.0~20161227112533) over (2.0.0~20161227112533) …
Processing triggers for systemd (215-17+deb8u5) …
Setting up openhab2-offline (2.0.0~20161227112533) …

Ok I think I may have found the problem. Just dont know how to fix it. Some thing with my Java?

Dec 27 15:00:24 pine64 start.sh[15381]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Dec 27 15:00:24 pine64 start.sh[15381]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
Dec 27 15:00:24 pine64 start.sh[15381]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
Dec 27 15:00:24 pine64 start.sh[15381]: at java.lang.Thread.run(Thread.java:745)
Dec 27 15:00:24 pine64 start.sh[15381]: java.lang.ExceptionInInitializerError thrown while loading gnu.io.RXTXCommDriver
Dec 27 15:00:24 pine64 start.sh[15381]: java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while load…mmDriver
Dec 27 15:01:10 pine64 start.sh[15381]: java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while load…mmDriver
Dec 27 15:06:53 pine64 start.sh[15381]: java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while load…mmDriver
Dec 27 15:09:04 pine64 start.sh[15381]: java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while load…mmDriver
Dec 27 15:09:40 pine64 start.sh[15381]: java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while load…mmDriver
Hint: Some lines were ellipsized, use -l to show in full.

I submitted this reinstallation issue here last night. https://github.com/openhab/openhab-linuxpkg/issues/11

Is this supposed to be fixed with the latest build (#682, 2.0.0~20161229034207)?
I still get: Serial Error: Port /dev/ttyS1 does not exist
I have added the openhab user to dialout group and my /etc/default/openhab2 looks like this:
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyS1"
Btw, i do not use a RPi but a Odroid-C2 which also runs Ubuntu 16.04, but a 64-bit one, uname -m gives me aarch64. Might this be a problem?
The serialport and the controller (a RaZberry) is working and responding, i tested it with the MinOZW example from the OpenZWave project.

I am on a rPi2 with a Razberry and having the same problem even after installing build #694. On the offline and the online build I get bundle:list | grep serial
175 | Active | 80 | 3.12.0.OH | nrjavaserial
(where I was expecting to see something like 3.9.x from comments above) and the error persists:
Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyAMA0 does not exist.
(Note on rPi2 the Razberry is /dev/ttyAMA0).
The apt-get install is still Build #688 so I will do an update and try there.

I have made other comments on Zwave Binding Uninstalls[SOLVED] and Razberry is Offline
Thanks to all those who have posted so we have had things to try with this issue.

Anyone know how to revert to a version like Build #651?

Here is a solution, just in case someone has the same problem with a 64-bit system:
You have to run Openhab2 with a 32-bit JVM. The Serialport library used in Openhab2 currently does not has support for 64-bit.

Found the solution in a comment in this issue:

I loaded up 2.0.0b5 and found that nrjavaserial is not loaded but /dev/ttyAMA0 still does not exist.
Went back to Offline Snapshot Build #697 (there appears to be a need to delete all userdata/etc/ files to change between the two. Is this correct?) and nrjavaserial is version 3.12.0.OH and /dev/ttyAMA0 again does not exist.
Looking for a way to get my zwave devices working again.
Any help appreciated.

If it is a problem that only exists on specific Linux versions (as you now assume), you might try to seek for some help at https://github.com/NeuronRobotics/nrjavaserial and see if others came across similar problems.

Some more specific and detailed log files might also be helpful.

Can anybody else confirm here that he is successfully using Z-Wave with a recent build with /dev/ttyAMA0?

Confirmed with build #710, but using not a Razberry but a USB Zwave stick on /dev/ttyACM0.

2017-01-10 09:32:50.257 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'
2017-01-10 09:32:50.406 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized
2017-01-10 09:32:50.526 [INFO ] [mmandclass.ZWaveSecurityCommandClass] - Update networkKey
2017-01-10 09:32:50.575 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller

In this situation the more detail the better to isolate the problem. Which Raspberry Pi are you using and are you running Debian Wheezy or Jessie?
The other difference of course is that the Razberry sits on the RX and TX pins of the gpio and not on the USB bus. This comes down to serial device recognition that was working fine on version 3.9 of nrjavaserial and does not work at all (for me in the situation stated) on version 3.12 of this library.