i just tried it, but after “Fix Permissions” the error is still there, when I start “sudo openhab-cli console”
Also seeing this message (noted above) openHAB 4.0 Milestone discussion - Setup, Configuration and Use / News & Important Changes - openHAB Community. I was unaware of the “fix permissions” idea, but that did not work for me either. My noob analysis was that it was a timing issue with karaf. For me everything still works and the files are created, just not soon enough?. My Rpi3 on M2 does not have this issue whereas my Rpi4 on M2 does.
in the past this was related to permissions of directory /var/lib/openhab/tmp.
What is the result of:
ls -ld /var/lib/openhab/tmp
Upgraded from M1 to M2 and now I have several error messages Transformation service SCRIPT for pattern graaljs:.... not found!
As a consequence several of my items and rules are not ok. In M1 I had to convert from JS to SCRIPT.
If you look above there are several posts. You need to go back to JS
with file extension .js
. Each language now has it’s own pattern. The docs have been updated for further details.
@Wolfgang_S here:
openhabian@openhabian:~ $ ls -ld /var/lib/openhab/tmp
drwxr-xr-x 13 openhab openhab 4096 May 5 20:48 /var/lib/openhab/tmp
I’ve got another serious problem. Every ~30h I get
2023-05-05 19:59:52.451 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.openhab.core.thing.internal.CommunicationManager@f90ddb' takes more than 5000ms.
and a few minutes later OpenHab restarts automatically.
@Wolfgang_S
for the rpi4 OH4M2 with the message
ls -ld /var/lib/openhab/tmp
drwxrwxr-x 9 openhab openhab 4096 May 4 18:14 /var/lib/openhab/tmp
for the Pi3 OH4M2 -no message
openhabian@openhab:~ $ ls -ld /var/lib/openhab/tmp
drwxr-xr-x 10 openhab openhab 4096 May 4 18:46 /var/lib/openhab/tmp
Since openhab is both owner and group I think these are functional equivalent?
Hi ML1982
I have the same problem.
With me happens when i load text files rules.
After loading i have a loop restart.
Using container version i dont have that problem.
I suspect the rule transformation JSONPATH.
I don’t have text based rules.
but the behaviour is getting stranger:
openhabian@openhabian:~ $ sudo openhab-cli console
Logging in as openhab
DefaultAuthFuture[ssh-connection]: Failed (IOException) to execute: Connection reset
openhabian@openhabian:~ $ sudo openhab-cli console
Logging in as openhab
Failed to get the session.
openhabian@openhabian:~ $ sudo openhab-cli console
Logging in as openhab
Password:
Failed to load native library:jansi-2.4.0-b5b4640aaf69ffc1-libjansi.so. osinfo: Linux/arm
java.lang.UnsatisfiedLinkError: /var/lib/openhab/tmp/jansi-2.4.0-b5b4640aaf69ffc1-libjansi.so: /var/lib/openhab/tmp/jansi-2.4.0-b5b4640aaf69ffc1-libjansi.so: cannot open shared object file: No such file or directory
_ _ _ ____
___ ___ ___ ___ | | | | / \ | __ )
/ _ \ / _ \ / _ \ / _ \ | |_| | / _ \ | _ \
| (_) | (_) | __/| | | || _ | / ___ \ | |_) )
\___/| __/ \___/|_| |_||_| |_|/_/ \_\|____/
|_| 4.0.0.M2 - Milestone Build
Use '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
To exit, use '<ctrl-d>' or 'logout'.
openhab>
I had a look at the old thread where a problem was reported related to libjansi, too.
Rechecking it based on the message it indeed is different - I am sorry for that.
Nevertheless while in the old thread libjansi ( copy ) resp. it’s lock file couldn’t be created. The error message was about the lock file while this time it is about the lib.
Looking into the /var/lib/openhab/tmp folder during runtime of “openhab-cli console” a copy of libjansi should be created in the folder and the lock file.
Do you see these files ?
Running “ps -ef | grep jansi” you should see the path where libjansi is taken from ( source of copy ).
Is that the case ?
When I converted from OH 3.4 to 4.0 I’ve decided to give HTTP binding a try (I was using SmartHome/J HTTP Binding). But HTTP binding does not support special characters (that is the reason why I was using SmartHome/J HTTP Binding in 3.4). The error message is Requesting 'https://api.telegram.org/bot****************/sendMessage?chat_id=5003595502&text=Alerta%20-%20O%20videoporteiro%20não%20está%20registado' (method='GET', content='null') failed: 400 Bad Request
Do I need to return to SmartHome/J HTTP Binding ? How ? I can wait for HTTP binding to be updated.
Looking into the /var/lib/openhab/tmp folder during runtime of “openhab-cli console” a copy of libjansi should be created in the folder and the lock file.
Do you see these files ?
yes
openhabian@openhabian:/var/lib/openhab/tmp $ ls -lsh | grep jansi
24K -rwxr--r-- 1 root root 22K May 6 11:01 jansi-2.4.0-6a213f869437973-libjansi.so
0 -rw-r--r-- 1 root root 0 May 6 11:01 jansi-2.4.0-6a213f869437973-libjansi.so.lck
Here is the output of the ps command, I’m not sure I fully understand what you mean.
Running “ps -ef | grep jansi” you should see the path where libjansi is taken from ( source of copy ).
Is that the case ?
openhabian@openhabian:/var/lib/openhab/tmp $ ps -ef | grep jansi
root 9492 9489 3 11:01 pts/0 00:00:02 /usr/bin/java -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.us erdata=/var/lib/openhab -Dopenhab.logdir=/var/log/openhab -Dfelix.cm.dir=/var/lib/openhab/config -Djava.library.path=/var/lib/openhab/tmp/lib -Djetty.host=0.0.0.0 -Djetty.http.compl iance=RFC2616 -Dorg.apache.cxf.osgi.http.transport.disable=true -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure =8443 -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError -Dkaraf.instances=/usr/share/openhab/runtime/instances -Dkaraf.home=/usr/share/openhab/runtime -Dkar af.base=/var/lib/openhab -Dkaraf.etc=/var/lib/openhab/etc -Dkaraf.log=/var/lib/openhab/log -Djava.io.tmpdir=/var/lib/openhab/tmp -Djava.util.logging.config.file=/var/lib/openhab/etc /java.util.logging.properties -classpath /usr/share/openhab/runtime/system/org/apache/karaf/org.apache.karaf.client/4.4.3/org.apache.karaf.client-4.4.3.jar:/usr/share/openhab/runtim e/system/org/apache/sshd/sshd-osgi/2.9.2/sshd-osgi-2.9.2.jar:/usr/share/openhab/runtime/system/org/apache/sshd/sshd-scp/2.9.2/sshd-scp-2.9.2.jar:/usr/share/openhab/runtime/system/or g/apache/sshd/sshd-sftp/2.9.2/sshd-sftp-2.9.2.jar:/usr/share/openhab/runtime/system/org/fusesource/jansi/jansi/2.4.0/jansi-2.4.0.jar:/usr/share/openhab/runtime/system/org/jline/jlin e/3.21.0/jline-3.21.0.jar org.apache.karaf.client.Main
openhab+ 10080 9648 0 11:02 pts/1 00:00:00 grep --color=auto jansi
@Wolfgang_S
I also have both files. That is what confused me and led me to the timing idea.
As to
I get Rpi3 (no message)
openhabian@openhab:~ $ ps -ef | grep jansi
openhab+ 22887 22416 0 09:40 pts/0 00:00:00 grep --color=auto jansi
Rpi4 (message)
openhabian@openhab:~ $ ps -ef | grep jansi
openhab+ 916 508 0 09:41 pts/0 00:00:00 grep --color=auto jansi
The files go away once the openhab-cli session is closed.
I looked at the tmp folder and the only difference is that in the Rpi3 (no message) I have a mvn directory. Could that be an issue?
Have you checked your CPU usage? Those are usually the sorts of issues I see when OpenHAB has the CPU pegged for one reason or another.
as i wrote, every ~30h I have a restart of openhab.
and ~2h after restart I have a high CPU usage.
I already tried, what is written here:
But I’ve still a high CPU Usage after ~2-3h:
I have found the work around in Cody’s post here does NOT survive a restart of the host computer. Since you said:
I’m guessing you restart and the setting in the above post are lost and same thing happens. I’ve found that if I reset the safeCall to 100, openHAB runs for weeks without running away. Typical CPU usage is in the single digits.
When it pins the CPU, follow Cody’s advise in this post above and run top in the terminal, get the pid of openHAB then run
top -H -p <pid of openHAB >
with the pid you got from top where it says pid of openHAB above
Anyhow, having to log into the openHAB console and running the commands every time you restart the host is a pain. Cody mentioned that you could probably write a rule to reset the safeCall setting on a restart automatically but I don’t know how.
I also think this is ah… kind of a kludge
Curious @ML1982 do you run jRuby rules? What rules languages do you use?
Is this a problem with jRuby or openHAB in general? Anyone feel like explaining to me
@ML1982 @Andrew_Rowe If your setups contain a lot of items and you have default persistence configured (or persistence for a lot of items), you are probably experiencing an issue recently found in th implementation of nearly all persistence services. This is already fixed for MapDB and InfluxDB in recent snapshots and a fix for RRD is on the way.
I’m guessing you restart and the setting in the above post are lost and same thing happens. I’ve found that if I reset the safeCall to 100, openHAB runs for weeks without running away. Typical CPU usage is in the single digits.
Have a look at this file.
/var/lib/openhab/etc/services.cfg
You can change the parameters of the workaround there and it will survive a reboot.
Is this a problem with jRuby or openHAB in general? Anyone feel like explaining to me
No, I had the problem before I installed ruby today. I only installed ruby because of the advice in the workaround.
I only use ECMA2021 scripts.
Openhab just restarted after 4 hours… the workaround doesn’t work for me.
I have three startup errors that may be related to the “CPU usage and restart bug”.
Ignoring invalid configuration for pool 'felix.fileinstall.filename': file:/var/lib/openhab/etc/org.openhab.threadpool.cfg - value must be an integer
The transformation add-on 'javascript' does not exist - ignoring it.
I’ve have to restart this bundles after each restart of OH manually:
You should fix 1 and can ignore 2.