Openhab2 crashes regularly

Hi

I’ve just moved from OH 1.8.3 to 2, and most things seem to work as they should, but I have quite frequent crashes. It seems as it is connected to when I connect to it to do something through myopenhab, but I’m not sure about this. The log files doesn’t provide a noob like me with any useful information, but the seconds leading up to the crash looks like this:

Any ideas?

2017-03-02 21:13:21.788 [DEBUG] [o.client.mqttv3.internal.ClientState] - Openhab2: received bytes count=1
2017-03-02 21:13:21.789 [DEBUG] [o.client.mqttv3.internal.ClientState] - Openhab2: received bytes count=34
2017-03-02 21:13:21.789 [DEBUG] [mqttv3.internal.wire.MqttInputStream] - null: 501
2017-03-02 21:13:21.790 [DEBUG] [o.client.mqttv3.internal.ClientState] - Openhab2: received key=0 message=PUBLISH qos:0 retained:false dup:false topic:"/Miriam/Soverom/Temperature" payload:[hex:32312e3530 utf8:“21.50” length:5]
2017-03-02 21:13:21.790 [DEBUG] [client.mqttv3.internal.CommsCallback] - Openhab2: new msg avail, notify workAvailable
2017-03-02 21:13:21.791 [DEBUG] [client.mqttv3.internal.CommsReceiver] - Openhab2: network read message
2017-03-02 21:13:21.791 [DEBUG] [client.mqttv3.internal.CommsCallback] - Openhab2: call messageArrived key=0 topic=/Miriam/Soverom/Temperature
2017-03-02 21:13:21.793 [DEBUG] [client.mqttv3.internal.CommsCallback] - Openhab2: notify spaceAvailable
2017-03-02 21:13:21.793 [DEBUG] [client.mqttv3.internal.CommsCallback] - Openhab2: wait for workAvailable
2017-03-02 21:13:21.802 [DEBUG] [o.client.mqttv3.internal.ClientState] - Openhab2: received bytes count=1
2017-03-02 21:13:21.803 [DEBUG] [o.client.mqttv3.internal.ClientState] - Openhab2: received bytes count=23
2017-03-02 21:13:21.804 [DEBUG] [mqttv3.internal.wire.MqttInputStream] - null: 501
2017-03-02 21:13:21.805 [DEBUG] [o.client.mqttv3.internal.ClientState] - Openhab2: received key=0 message=PUBLISH qos:0 retained:false dup:false topic:"/Miriam/Lux/Analog" payload:[hex:363537 utf8:“657” length:3]
2017-03-02 21:13:21.805 [DEBUG] [client.mqttv3.internal.CommsCallback] - Openhab2: new msg avail, notify workAvailable
2017-03-02 21:13:21.806 [DEBUG] [client.mqttv3.internal.CommsReceiver] - Openhab2: network read message
2017-03-02 21:13:21.806 [DEBUG] [client.mqttv3.internal.CommsCallback] - Openhab2: call messageArrived key=0 topic=/Miriam/Lux/Analog
2017-03-02 21:13:21.808 [DEBUG] [client.mqttv3.internal.CommsCallback] - Openhab2: notify spaceAvailable
2017-03-02 21:13:21.809 [DEBUG] [client.mqttv3.internal.CommsCallback] - Openhab2: wait for workAvailable
2017-03-02 21:13:23.187 [DEBUG] [org.quartz.core.JobRunShell ] - Calling execute on job MapDB_SchedulerGroup.Commit_Transaction
2017-03-02 21:13:23.188 [DEBUG] [rg.quartz.core.QuartzSchedulerThread] - batch acquisition of 1 triggers
2017-03-02 21:13:23.189 [DEBUG] [rg.quartz.core.QuartzSchedulerThread] - batch acquisition of 1 triggers
2017-03-02 21:13:28.187 [DEBUG] [org.quartz.core.JobRunShell ] - Calling execute on job MapDB_SchedulerGroup.Commit_Transaction
2017-03-02 21:13:28.188 [DEBUG] [rg.quartz.core.QuartzSchedulerThread] - batch acquisition of 1 triggers
2017-03-02 21:13:28.189 [DEBUG] [rg.quartz.core.QuartzSchedulerThread] - batch acquisition of 1 triggers
2017-03-02 21:13:33.187 [DEBUG] [org.quartz.core.JobRunShell ] - Calling execute on job MapDB_SchedulerGroup.Commit_Transaction
2017-03-02 21:13:33.187 [DEBUG] [rg.quartz.core.QuartzSchedulerThread] - batch acquisition of 1 triggers
2017-03-02 21:13:33.188 [DEBUG] [rg.quartz.core.QuartzSchedulerThread] - batch acquisition of 1 triggers
2017-03-02 21:13:36.809 [DEBUG] [io.socket.engineio.client.Socket ] - writing ping packet - expecting pong within 60000ms
2017-03-02 21:13:36.810 [DEBUG] [io.socket.engineio.client.Socket ] - flushing 1 packets in socket
2017-03-02 21:13:37.116 [DEBUG] [io.socket.engineio.client.Socket ] - socket received: type ‘pong’, data ‘null’

A few generic questions

– What hardware is openhab running on?
– How do you know it is actually crashing ? What to do you see ?
– During the ‘crash’ do you have access to it ? (webgui or ssh)
– Does the application ‘crash’ or the whole system it is running on ?
– What do you do to recover ?

regards

Hi

Thanks for answering!

Raspberry pi 3
When it crashes i cannot access it through the Web interface. Also if i try
to access through ssh, it is not able to connect. In the log file it stops
right after what i posted in the previous post and does not start until i
unplug power and reconnect. I can ping the pi while it is unresponsive and
do get answers…

can you check the logs in /var/log from ssh and try to see what messages you get right around the time of the crash? I would check everything but focus on messages, syslog, auth files. from the logs you pasted I do not see any crash on the openhab side so it may be related to the raspberry hardware / OS

Hope it helps

Thanks for the tip. I looked through the files, but could not see anything
obvious. There is one thing that seems strange, that the system restarts at
a certain time (xx.18.14), but this might also be because it hasn’t gotten
a time from the network yet? As in the log below, the time goes back some
minutes when it crashes. This is the same every time it crashes.

ar 3 15:29:02 openHABianPi rsyslogd-2007: action ‘action 17’ suspended,
next retry is Fri Mar 3 15:30:32 2017 [try http://www.rsyslog.com/e/2007 ]
Mar 3 15:30:32 openHABianPi rsyslogd-2007: action ‘action 17’ suspended,
next retry is Fri Mar 3 15:32:02 2017 [try http://www.rsyslog.com/e/2007 ]
Mar 3 15:32:03 openHABianPi rsyslogd-2007: action ‘action 17’ suspended,
next retry is Fri Mar 3 15:33:33 2017 [try http://www.rsyslog.com/e/2007 ]
Mar 3 15:32:34 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 3
Mar 3 15:32:37 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 3
Mar 3 15:32:40 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 7
Mar 3 15:32:47 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 10
Mar 3 15:32:57 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 11
Mar 3 15:33:08 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 12
Mar 3 15:33:20 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 15
Mar 3 15:33:34 openHABianPi rsyslogd-2007: action ‘action 17’ suspended,
next retry is Fri Mar 3 15:35:04 2017 [try http://www.rsyslog.com/e/2007 ]
Mar 3 15:33:35 openHABianPi dhclient: No DHCPOFFERS received.
Mar 3 15:33:35 openHABianPi dhclient: No working leases in persistent
database - sleeping.
Mar 3 15:35:01 openHABianPi CRON[16064]: (root) CMD (command -v debian-sa1

/dev/null && debian-sa1 1 1)
Mar 3 15:35:05 openHABianPi rsyslogd-2007: action ‘action 17’ suspended,
next retry is Fri Mar 3 15:36:35 2017 [try http://www.rsyslog.com/e/2007 ]
Mar 3 15:18:14 openHABianPi rsyslogd: [origin software="rsyslogd"
swVersion=“8.4.2” x-pid=“394” x-info=“http://www.rsyslog.com”] start
Mar 3 15:18:14 openHABianPi systemd[1]: Mounted Configuration File System.
Mar 3 15:18:14 openHABianPi systemd[1]: Started Remount Root and Kernel
File Systems.
Mar 3 15:18:14 openHABianPi systemd[1]: Started Apply Kernel Variables.
Mar 3 15:18:14 openHABianPi systemd[1]: Started Various fixups to make
systemd work better on Debian.
Mar 3 15:18:14 openHABianPi systemd[1]: Starting Load/Save Random Seed…
Mar 3 15:18:14 openHABianPi systemd[1]: Started Load/Save Random Seed.
Mar 3 15:18:14 openHABianPi systemd[1]: Started Create Static Device Nodes
in /dev.
Mar 3 15:18:14 openHABianPi systemd[1]: Starting udev Kernel Device
Manager…
Mar 3 15:18:14 openHABianPi systemd[1]: Starting Local File Systems (Pre).
Mar 3 15:18:14 openHABianPi systemd[1]: Reached target Local File Systems
(Pre).
Mar 3 15:18:14 openHABianPi systemd[1]: Mounting /tmp…
Mar 3 15:18:14 openHABianPi systemd[1]: Started udev Kernel Device Manager.
Mar 3 15:18:14 openHABianPi systemd[1]: Started Copy rules generated while
the root was ro.
Mar 3 15:18:14 openHABianPi fake-hwclock[165]: Fri Mar 3 14:17:01 UTC 2017
Mar 3 15:18:14 openHABianPi systemd-fsck[184]: /dev/mmcblk0p2: clean,
49285/964768 files, 680118/3855744 blocks
Mar 3 15:18:14 openHABianPi systemd-udevd[204]: specified group 'i2c’
unknown
Mar 3 15:18:14 openHABianPi systemd-udevd[204]: specified group 'spi’
unknown
Mar 3 15:18:14 openHABianPi systemd-udevd[204]: specified group 'gpio’
unknown

another crash:

Mar 2 21:12:44 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 4
Mar 2 21:12:48 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 10
Mar 2 21:12:58 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 16
Mar 2 21:13:10 openHABianPi rsyslogd-2007: action ‘action 17’ suspended,
next retry is Thu Mar 2 21:14:40 2017 [try http://www.rsyslog.com/e/2007 ]
Mar 2 21:13:14 openHABianPi dhclient: DHCPDISCOVER on eth0 to
255.255.255.255 port 67 interval 8
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$
Mar 2 20:18:14 openHABianPi kernel: [ 0.000000] Booting Linux on
physical CPU 0x0
Mar 2 20:18:14 openHABianPi kernel: [ 0.000000] Initializing cgroup
subsys cpuset
Mar 2 20:18:14 openHABianPi kernel: [ 0.000000] Initializing cgroup
subsys cpu
Mar 2 20:18:14 openHABianPi kernel: [ 0.000000] Initializing cgroup
subsys cpuacct

Any news on this topic? I’m experiencing the same problem since last update (2.1.0 release). I came from 2.0 release.

It is now crashing very rarely. The improvements I did related to power seem to work ok. I added a USB hub with power to limit the power drawn from the main power supply.

I am back to 2.0 now and everything is rocking stable.

The log looks like the DHCP lease expired and it failed to renew it (no response from any DHCP server). That would mean the system is still running fine, but is cut off from network because it does not have any address anymore. No idea why would that happen.

To test the theory, you could disable DHCP and configure static address on the machine with OpenHAB.

Thanks for the advice. Should it be enough to add the IP address here in the /boot/cmdline.txt file, or do I need to do something else also? I have a DHCP running on my router, will that create an issue?

DHCP (server) running on your router does not matter. I am suggesting to try not using DHCP (client) on the OpenHAB machine, but use static ip address instead.

I do not actually know how to do it in OpenHAB, I do not use it yet. I am just lurking here trying to figure out if I’ll use OpenHAB in my future home. This looked like general Linux issue, so I gave my two cents.