Sitemap + MySQL not processing updates anymore

  • Platform information:
    • Hardware:IntelCore 2 Quad Q9500
    • OS: Freenas 9.10
    • Java Runtime Environment: openjdk version “1.8.0_162” OpenJDK Runtime Environment (build 1.8.0_162-b12) OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)
    • openHAB version:2.2

After some Hours Openhab stops evaluating incomming Events. Im using MQTT with mosquitto to digest incomming messages and displaying them in openhab classic Sitemaps and also store changes in MySQL database. Everything is working wonderfull for like 3h+ untill something breaks. The messages still get past mosquitto and into the Eventbus as shown by the logs but neither of my 3 browsers and two devices the sitemap is not updated anymore and also phpmyadmin is showing no more mysql activity after this point. I can reset everything to working with a simple restart of openhab but thats not my intendet use.

EVENTLOG

2018-03-07 14:11:31.535 [vent.ItemStateChangedEvent] - K_BH1750_LX changed from 40 to 30
2018-03-07 14:11:31.648 [vent.ItemStateChangedEvent] - K_BME280_T changed from 21.080 to 21.040
2018-03-07 14:11:31.749 [vent.ItemStateChangedEvent] - K_BME280_H changed from 49.542 to 50.602
2018-03-07 14:11:31.754 [vent.ItemStateChangedEvent] - K_BME280_P changed from 97527 to 97517
2018-03-07 14:11:31.762 [vent.ItemStateChangedEvent] - K_RSSI changed from -81 to -72
2018-03-07 14:12:25.285 [vent.ItemStateChangedEvent] - Get_CPU_Temps_Output changed from 40.5 to 40.75
2018-03-07 14:13:25.403 [vent.ItemStateChangedEvent] - Get_CPU_Temps_Output changed from 40.75 to 39.5
2018-03-07 14:14:25.509 [vent.ItemStateChangedEvent] - Get_CPU_Temps_Output changed from 39.5 to 40
2018-03-07 14:15:25.607 [vent.ItemStateChangedEvent] - Get_CPU_Temps_Output changed from 40 to 39.5
2018-03-07 14:16:25.706 [vent.ItemStateChangedEvent] - Get_CPU_Temps_Output changed from 39.5 to 40.25

OPENHABLOG

2018-03-07 00:41:56.861 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:home
2018-03-07 00:41:56.916 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:home
2018-03-07 00:41:56.932 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-03-07 00:41:56.956 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-03-07 00:41:57.130 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2018-03-07 00:41:57.131 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘mymosquitto’
2018-03-07 00:41:57.218 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘broker’
2018-03-07 00:41:57.767 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2018-03-07 00:41:57.815 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-03-07 06:27:43.500 [WARN ] [al.connection.YahooWeatherConnection] - Communication error occurred while getting Yahoo weather information: java.util.concurrent.TimeoutException

My Sitemaps with last update

Maybe related to this?

You would need to switch from the 2.2 release to a recent snapshot build in order to get the fix.

Seems like my problem and i updated to 2.3.0-Snapshot to see if it helps.

Sadly even upgrading to 2.3.0-SNAPSHOT doesnt resolve the problem. Still mosquitto is getting messages and handing them over to the eventbus but after time sitemapupdates and percistance stop working with no error in openhablog. :frowning:

atm im using this script to start the deamon:

#!/bin/sh
#
# $FreeBSD:$
#
# PROVIDE: openhab
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Configuration settings for openhab in /etc/rc.conf:
# Mandatory:
# openhab_enable (bool):
#   Set to "NO" by default.
#   Set it to "YES" to enable openhab
#
# Optional:
# openhab_user (bool):
#   Set to "openhab" by default.
#
# openhab_http_port (num):
#   Default to 8080
#
# openhab_https_port (num):
#   Default to 8443
#
# openhab_telnet_port (num):
#   Default to 5555
#
# openhab_home (str):
#   Default to "/usr/local/openhab"
#

. /etc/rc.subr

name="openhab"
rcvar="${name}_enable"
pidfile="/var/run/${name}.pid"
load_rc_config "${name}"

: ${openhab_enable="NO"}
: ${openhab_user="openhab"}
: ${openhab_http_port=8080}
: ${openhab_https_port=8443}
: ${openhab_telnet_port=5555}
: ${openhab_home="/home/openhab/openhab2"}

required_files="${openhab_home}/conf/services/runtime.cfg"


java_command="/usr/local/bin/java
         -Dopenhab.home=${openhab_home}
         -Dopenhab.conf=${openhab_home}/conf
         -Dopenhab.runtime=${openhab_home}/runtime
         -Dopenhab.userdata=${openhab_home}/userdata
         -Dopenhab.logdir=${openhab_home}/userdata/logs
         -Dfelix.cm.dir=${openhab_home}/userdata/config
         -Djetty.host=0.0.0.0
         -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0
         -Dorg.osgi.service.http.port=${openhab_http_port}
         -Dorg.osgi.service.http.port.secure=${openhab_https_port}
         -Djava.awt.headless=true -XX:+UseG1GC
         -Djava.endorsed.dirs=/usr/local/openjdk8/jre/lib/endorsed:/usr/local/openjdk8/lib/endorsed:${openhab_home}/runtime/lib/endorsed
         -Djava.ext.dirs=/usr/local/openjdk8/jre/lib/ext:/usr/local/openjdk8/lib/ext:${openhab_home}/runtime/lib/ext
         -Dkaraf.instances=${openhab_home}/runtime/instances
         -Dkaraf.home=${openhab_home}/runtime
         -Dkaraf.base=${openhab_home}/userdata
         -Dkaraf.data=${openhab_home}/userdata
         -Dkaraf.etc=${openhab_home}/userdata/etc
         -Dkaraf.restart.jvm.supported=true
         -Djava.io.tmpdir=${openhab_home}/userdata/tmp
         -Djava.util.logging.config.file=${openhab_home}/userdata/etc/java.util.logging.properties
         -Dkaraf.startLocalConsole=false
         -Dkaraf.startRemoteShell=false
	 -classpath ${openhab_home}/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.1.3.jar:${openhab_home}/runtime/lib/boot/org.apache.karaf.jaas.boot-4.1.3.jar:${openhab_home}/runtime/lib/boot/org.apache.karaf.main-4.1.3.jar:${openhab_home}/runtime/lib/boot/org.osgi.core-6.0.0.jar org.apache.karaf.main.Main"

command="/usr/sbin/daemon"
command_args="-p ${pidfile} -u ${openhab_user} -f ${java_command}"

start_precmd="pid_touch"
start_cmd="openhab_start"
stop_cmd="openhab_stop"
status_cmd="openhab_status"
pid_touch() {
    touch ${pidfile}
    chown ${openhab_user} ${pidfile}
}

openhab_start() {
        cd ${openhab_home}
    echo "Starting ${name}..."
    exec ${command} ${command_args}
}

openhab_stop() {
    rc_pid=$(openhab_check_pidfile ${pidfile})
    if [ -z "${rc_pid}" ]; then
        [ -n "${rc_fast}" ] && return 0
        echo "${name} not running? (check ${pidfile})."
        return 1
    fi
    echo "Stopping ${name}..."
    kill -KILL ${rc_pid} 2> /dev/null && echo "Killed."
    rm -f ${pidfile}
        sleep 1
}

openhab_status() {
    rc_pid=$(openhab_check_pidfile $pidfile)
    if [ -n "${rc_pid}" ]; then
        echo "${name} is running as pid ${rc_pid}."
    else
        echo "${name} is not running."
        return 1
    fi
}

openhab_check_pidfile() {
    _pidfile=$1
    if [ -z "${_pidfile}" ]; then
        err 3 'USAGE: openhab_check_pidfile pidfile'
    fi
    if [ ! -f ${_pidfile} ]; then
        debug "pid file (${_pidfile}): not readable."
        return
    fi
    read _pid < ${_pidfile}
    if [ -z "${_pid}" ]; then
        debug "pid file (${_pidfile}): no pid in file."
        return
    fi
        echo -n ${_pid}
}

run_rc_command "$1"

So nobody has any Idea ? .-. hm im deaktivating most of my rules and constantly update to new Snapshots to see if it helps .

Well i seem to have found my problem and it revolves around one of my rules seem top throw a silent exception as i was requesting historical data from percistance services.

rule "Calc akku use JansZimmer"
when
	Item JZ_Power received update
	
then
	//CALCULATING MINIMUM NEEDED INTERVAL I DAYS TO GET MEANINGFULL RESULTS
	var int days = 1
	var Number tester = JZ_Power.deltaSince(now.minusDays(days))
	
	if(enable_DEBUG_PowerDrain){
		logInfo("JZ_Akku", " "+tester)
	}
	
	if(tester !== null){
		postUpdate(JZ_Power_Delta,tester)
	}
	else{
		postUpdate(JZ_Power_Delta,-1)
	}	
	
	while (tester >= -0.0001 && JZ_Power.historicState(now.minusDays(days)) !== null) {
		tester = JZ_Power.deltaSince(now.minusDays(days))
		days = days+1
	}
	
	if(enable_DEBUG_PowerDrain){
		logInfo("JZ_Akku", "Days set: "+days)
	}
	
	if(JZ_Power.historicState(now.minusDays(days)) !== null){
		tester = JZ_Power.deltaSince(now.minusDays(days))
		var Number left = JZ_Power.state
		var Number togo = ((left-3)/(-tester)) * days
		
		if(enable_DEBUG_PowerDrain){
			logInfo("JZ_Akku", "Left: "+togo)
		}
		
		postUpdate(JZ_Power_Left,togo)	
	}
	else{
		postUpdate(JZ_Power_Left,-1)	
	}
end

sry to annoy you here.