Error after login - openhab-cli console

  • Platform information:
    • Hardware: Raspberry Pi 4 4GB
    • OS: Openhabian
    • Java Runtime Environment: 17
    • openHAB version: 4.0.2
  • Issue of the topic: please be detailed explaining your issue
Logging in as openhab
Password:  
Failed to load native library:jansi-2.4.0-5089a6e9f2f371bb-libjansi.so. osinfo: Linux/arm
java.lang.UnsatisfiedLinkError: /var/lib/openhab/tmp/jansi-2.4.0-5089a6e9f2f371bb-libjansi.so: /var/lib/openhab/tmp/jansi-2.4.0-5089a6e9f2f371bb-libjansi.so: cannot open shared object file: No such file or directory

So whats wrong?

This is also reported by others but I haven’t heard about lost functionality.
Just in case you use sudo to start openhab-cli console command try without sudo.
Does that make any difference ?

Without sudo I get:

Logging in as openhab
Password:  
/var/lib/openhab/tmp/jansi-2.4.0-f0cf740356c83049-libjansi.so.lck (Permission denied)

That

sounds like the permission of directory

is not:

ls -ld /var/lib/openhab/tmp/
drwxrwxr-x 12 openhab openhab 4096 Aug 13 18:50 /var/lib/openhab/tmp/

I assume that you run the command as user openhabian.

Yes I run the command as user openhabian.
My output:

drwxr-xr-x 10 openhab openhab 4096 Aug 30 17:49 /var/lib/openhab/tmp/

run

sudo chmod g+w /var/lib/openhab/tmp/

After that you can do a trial again as user openhabian.

Same issue, still no joy.

you still get permission denied when running the command being logged in as user openhabian while permission of the directory is now starting with drwxrwx ?

just stop openhab and rm -rf /var/lib/openhab/tmp/* of whatever the tmp dir is.

However, after logging in to the openhab console, the files are created despite the error message. Maybe the user openhab also requires write access to that file. In this case the file needs to created with proper access rights at the time of creation, and not afterwards.

-rwxr--r--  1 os      openhab 22232 Sep  2 13:48 jansi-2.4.0-c1d0c4d295b150e-libjansi.so
-rw-r--r--  1 os      openhab     0 Sep  2 13:48 jansi-2.4.0-c1d0c4d295b150e-libjansi.so.lck

These files get deleted after logging out from openhab console.

After: sudo chmod g+w /var/lib/openhab/tmp/
I get: drwxrwxr-x 10 openhab openhab 4096 Sep 4 20:28 /var/lib/openhab/tmp/

and login in openhab-cli console:

Failed to load native library:jansi-2.4.0-748ad38dab8c5e9e-libjansi.so. osinfo: Linux/arm
java.lang.UnsatisfiedLinkError: /var/lib/openhab/tmp/jansi-2.4.0-748ad38dab8c5e9e-libjansi.so: /var/lib/openhab/tmp/jansi-2.4.0-748ad38dab8c5e9e-libjansi.so: cannot open shared object file: No such file or directory

Has there been a resolution to the error msg you are reporting? I am having this problem now. Running from the Github [openHABian v1.8b]. Downloaded on 2 Nov 23.

anything besides the message that is not working as expected ?
Although the message states that the library cannot be found it is there. So it looks like it is a race condition as one user assumed here.

I have the same issue for a long time so far (since 4.0M2). Now I am on 4.1.0.M2. First it was reported on March 2023 in Milestone thread.