No more logfiles - missing (solved)

Hi, can anybody help me finding the reason, why my installation does not write logfiles anymore?

Dateisystem 1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf
/dev/root 14822592 3088840 11101572 22% /
devtmpfs 492508 0 492508 0% /dev
tmpfs 497116 0 497116 0% /dev/shm
tmpfs 497116 6776 490340 2% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 497116 0 497116 0% /sys/fs/cgroup
/dev/mmcblk0p1 63503 21422 42082 34% /boot

There is enought space on my sd-card. I am using Raspian Jessie.

Thanx and regards,
Markus

Which openhab version do you use?

I use openHAB 2.1.0 - release build -

Are there files in /var/log/openhab2 and are there old datas in it?

yes, it stopped working on tuesday, time must have been restart time, so I think there’s probably a lock. But I already moved events.log => events.log.bak and openhab.log => openhab.log.bak

I had this problem after switching to snapshot serveral times. Now #1055 runs.
I would try
openhabian-config
01 | Update Pull the latest revision of the openHABian Configuration Tool
02 | Upgrade System Upgrade all installed software packages to their newest version
10 | Apply Improvements Apply the latest improvements to the basic openHABian setup ►
11 | Packages Install needed and recommended system packages
12 | Bash&Vim Settings Update customized openHABian settings for bash, vim and nano
13 | System Tweaks Add /srv mounts and update settings typical for openHAB
14 | Fix Permissions Update file permissions of commonly used files and folders
15 | FireMotD Upgrade the program behind the system overview on SSH login

Thank you, I’ll Traum that.

I’m sorry, I did not know that tool, yet.

ah, sorry. I use raspbian with openhab installed via apt, not the openhabian image.

Any further ideas? updates are already installed via apt

$ sudo openhabian-config

It’s definitely a 2.1.0 installation and not a snapshot build? I’ve not heard of a sudden problem in logging.

Is there anything suggestive in the openHAB console? i.e if you run the following, do you see any errors?:

ssh -p8101 openhab@localhost
#password is habopen
log:tail

It could also be a permission error. Try:

chown -R openhab:openhab /var/log/openhab2
sudo systemctl restart openhab2

now, the system creates openhab.log but still with 0kb

but, now i find this in my syslog:

Oct  5 13:28:23 servicebitch systemd[1]: Starting openHAB 2 - empowering the smart home...
Oct  5 13:28:23 servicebitch systemd[1]: Started openHAB 2 - empowering the smart home.
Oct  5 13:28:23 servicebitch start.sh[370]: Launching the openHAB runtime...
Oct  5 13:28:28 servicebitch start.sh[370]: #
Oct  5 13:28:28 servicebitch start.sh[370]: # A fatal error has been detected by the Java Runtime Environment:
Oct  5 13:28:28 servicebitch start.sh[370]: #
Oct  5 13:28:28 servicebitch start.sh[370]: #  SIGSEGV (0xb) at pc=0x7651022c, pid=532, tid=0x62e61460
Oct  5 13:28:28 servicebitch start.sh[370]: #
Oct  5 13:28:28 servicebitch start.sh[370]: # JRE version: Java(TM) SE Runtime Environment (8.0_144-b01) (build 1.8.0_144-b01)
Oct  5 13:28:28 servicebitch start.sh[370]: # Java VM: Java HotSpot(TM) Client VM (25.144-b01 mixed mode linux-arm )
Oct  5 13:28:28 servicebitch start.sh[370]: # Problematic frame:
Oct  5 13:28:28 servicebitch start.sh[370]: # V  [libjvm.so+0x1e322c]  FieldType::basic_type(Symbol*)+0x4
Oct  5 13:28:28 servicebitch start.sh[370]: #
Oct  5 13:28:28 servicebitch start.sh[370]: # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
Oct  5 13:28:28 servicebitch start.sh[370]: #
Oct  5 13:28:28 servicebitch start.sh[370]: # An error report file with more information is saved as:
Oct  5 13:28:28 servicebitch start.sh[370]: # /var/lib/openhab2/hs_err_pid532.log
Oct  5 13:28:28 servicebitch start.sh[370]: #
Oct  5 13:28:28 servicebitch start.sh[370]: # If you would like to submit a bug report, please visit:
Oct  5 13:28:28 servicebitch start.sh[370]: #   http://bugreport.java.com/bugreport/crash.jsp
Oct  5 13:28:28 servicebitch start.sh[370]: #
Oct  5 13:28:28 servicebitch start.sh[370]: /usr/share/openhab2/runtime/bin/karaf: Zeile 409:   532 Abgebrochen             ${KARAF_EXEC} "${JAVA}" ${JAVA_OPTS} -Djava.endorsed.dirs="${JAVA_ENDORSED_DIRS}" -Djava.ext.dirs="${JAVA_EXT_DIRS}" -Dkaraf.instances="${KARAF_HOME}/instances" -Dkaraf.home="${KARAF_HOME}" -Dkaraf.base="${KARAF_BASE}" -Dkaraf.data="${KARAF_DATA}" -Dkaraf.etc="${KARAF_ETC}" -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir="${KARAF_DATA}/tmp" -Djava.util.logging.config.file="${KARAF_BASE}/etc/java.util.logging.properties" ${KARAF_SYSTEM_OPTS} ${KARAF_OPTS} ${OPTS} -classpath "${CLASSPATH}" ${MAIN} "$@"
Oct  5 13:28:28 servicebitch systemd[1]: openhab2.service: main process exited, code=exited, status=134/n/a
Oct  5 13:28:28 servicebitch stop[565]: stop: Ignoring predefined value for KARAF_HOME

Eek, usually this indicates a Java bug. But if I’m honest, I’d have no idea how to fix it. Did you update Java recently?

maybe, I used apt-get update & upgrade and perhaps there’s been a java-update …

solved it by updating Java according to this guide:

1 Like

Glad you have it sorted!