Strange warning in Log

I found the following warning in my logs:

2019-12-27 15:18:34.082 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:

java.lang.NullPointerException: null

	at org.eclipse.smarthome.model.rule.runtime.internal.engine.RuleContextHelper.getContext(RuleContextHelper.java:67) ~[?:?]

	at org.eclipse.smarthome.model.rule.runtime.internal.engine.RuleEngineImpl.lambda$2(RuleEngineImpl.java:311) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_222]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_222]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_222]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_222]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

How can I track down the root cause for this problem?

Thanks,
Boby

Need more info about your OH setup…what are you running OH on, what version, what bindings, how often do you see this warning, etc…

At a glance it look rules related as no binding is mentioned. Do you have rules that are all trying to run at the same time?

Hmmm, have man rules in my rules definition. Can I raise e.g. a loglevel to get more details?
I’m running on OH2.5.0-1 on a RaspberryPi3+
At least a hint to a rule file or a line inside a rule file would be great. This is just like a bluescreen in Windows…

I’ll have a look at some rules I use to re-calculate some values, maybe there’s a possible problem - thanks for the hint!

Hard to say without seeing your rules. Do you use a lot of thread sleep in rules?

Try this, place this line org.eclipse.smarthome.threadpool:ruleEngine=20 in services/runtime.cfg and see if it helps. Just add it to the bottom of the file.

1 Like

The mention of scheduled in the error seems like a clue.
I would look hard at Cron triggered rules to begin with.