Modbus binding does not see serial port

Hello!
I’m trying to connect Arduino as modbus slave to OpenHab (i’m running version 3.0.1).
The Arduino itself is connected via USB cable to computer with OpenHab running.

I’ve set up things configuration, but i see error in logs about polling modbus device:

2021-03-07 20:58:13.182 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@67841540[portName=/dev/ttyACM0] -- aborting request ModbusReadRequestBlueprint@646004e8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=10,maxTries=3] [operation ID ada6c2b9-27e4-481f-8b0b-69abd17bd873]
2021-03-07 20:58:13.683 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: Could not get port identifier, maybe insufficient permissions. null. Connection SerialConnection@45b25ba[portName=/dev/ttyACM0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@67841540[portName=/dev/ttyACM0]

I’ve done some googling and what i’ve tried to do:

  1. Polling the device via another program (modpoll in this case) - it works.
  2. Checking that openhab user is added to dialout and tty groups.
  3. Adding
-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0

to java startup options - option is added (it is seen in process list), but no change.
4. Renaming /dev/ttyACM0 to /dev/ttyS50 (by symlink) - no change.

Also, i’ve tried running command openhab:serial identifiers in console - it outputs empty list.
Also i’ve tried to enumerate serial ports with nrjavaserial library - it correctly finds /dev/ttyACM0.

Please help, what else could i miss? Or what can i do to debug further?

Have you rebooted after changing openhab user permissions?

Yep, of course.
Also i’ve found that one should check for permissions on /var/lock/LCK..<TTYNAME> (in my case this was /var/lock/LCK..ttyACM0.
And also it seems that in some distributions (e.g. OpenSUSE, in my case), one should add openhab user also to lock group, because otherwise /var/lock will be unaccessible for it.