Startup takes up to 70 Minutes - Raspberry Pi 3 Model B

When I start openhab2 (by e.g. booting the Raspberry) I can see on the openhab logs what time the Items are added. But it takes more than 70 Minutes untill the first rule (when System started) is procesed.

PaperUI or Habpanel even longer: >90 Minutes

Is there a way to find out what is the reason for that? Maybe a Binding or Service?

  • Platform information:
    • Hardware: Raspberry Pi 3 Model B Rev 1.2
    • OS: Raspbian 9.13
    • Java Runtime Environment: JRE 1.8.0_181
    • openHAB version: 2.5.9-1

Probably remove all bindings, then add them back one by one until you find the one causing the issue?

How much RAM is consumed on your Pi?

I have a 3B+ and it takes less than 10 minutes for a complete startup (might be less than 5 minutes, but I never check).

1 Like

90 Minutes without Smarthome is kind of annoying for my family. And for me too. Is there a easier way to see what is when loaded with a timestamp/wallclock? Should be obvious if known where to look!?

How many rules/lines of rule code do you have?

Sorry, took some time to combine all rules, remove empty lines and comments.

31 rules
3050 lines
About 330 Items (incluing non-thing items)

Doesn’t seem excessive.

Note that it is possible to inadvertently construct rules that do take an inordinately long time to compile.

but that would have little bearing on Items creation delayed. May we see the logs that you are using as clues here?

Why are you assuiming a rule? Any experience with the same issue?

The log is /var/log/openhab2/openhab.log and there are entries for the items that had been added and a entrie for the first rule (system started). There are more than 70 Minutes in between. The delay of the Webservices (PaperUi, Habpanel) of >90 Minutes are found out by try and wait.

Please re-read my post.

First rule is pretty simple, just changing some items from null to defined state. Nothing bigger in it. Also the webservices should not be effected, am I right? I just clone the microSD and will try it on my spare Raspberry.

I’d reinstall your box before looking for other possible reasons.
Get another SD card, install openHABian there and ex/import your config using openhab-cli.
You seem to be using standard JRE which might be the problem, Zulu (standard in openHABian) is substantially faster in some parts of the code. Or your SD card may already be worn out.

Only if that does not make a difference it’s worth looking after rules or bindings.


This are helpful possiblities.

Update with my clone test:
Second Raspberry Model, cloned SD card:

  • 19 Minutes until the frist rule is fired
  • 19 Minutes until Webservices are working.
    Original Raspberry:
  • 32 Minutes until the first rule is fired
  • 64 Minutes until Webservices are working.

The only difference is:

  • Missing NanoCUL for Homematic on USB Port
  • Different SD (Althoug is the same manufacturer and the same size)
  • Different Raspberry (Althoug is the same model, even the same country it was build)

Next step will be:

  1. Replacing SD
  2. Replacing Raspberry
  3. Try without NanoCul

I will keep you updated. Thanks so long for your assistance.

None of that makes sense if you only clone your SD card.
Start by reinstalling as I already advised.

I absolutely treasure your advice and knowledge, honestly. And reinstalling is definitly on my Wish-List. But for my understanding, if clonig the whole SD (inclusive boot partition and debian partition) and usage afterwards in a second same raspberry model is solving the delay, the problem can not be the whole OS. (Except if there a problems with the USB drivers in combination with the NanoCUL. If so, I expect a change in step 3)

Reinstalling will not really give me an answers, why its working on one device and not on another one.

In cloning your SDcard and running it on another raspberry you would only eliminate hardware issues. Markus gave the advice to eliminate issues that stem from (e.g.) suboptimal configuration changes that might happen due to numerous updates on OS level. With a fresh install you may detect that easily and will have a responsive system again.
For comparison: my boot time (OH only) is around 5 minutes. That is on a RasPi 4 running on a mSATA disk instead of SDcard (which gives the system a noticable performance boost), no changes in the ZWave network. Normally app. 2 minutes after restarting the system I can use the openHAB App again.

1 Like

Interesting thread.

I just updated my openHAB installation and it takes ages until it’s up again.
After a short diagnosis it turned out that apt needs half an eternity to download packages…

Maybe you also install some extra packages?

Good hint. Yes if you have configured your system to download all bindings rather than to use a local .kar file that download phase can be annyoingly long.
But generally speaking, you should take a systematic approach rather than search for the needle in the haystack and look after ideas of various people that don’t know your setup.
That’s why FIRST, you should create/move to a starting point that is well-known to work, hence my advice to reinstall.
Then SECOND you should ramp up Karaf logging to debug levels. This will give you hints what stage(s) of startup are lame. The binding download is a prime candidate you’ll spot quickly.
But there’s others such as rules compilation or ever-ongoing restarts of modules.
Once again, the reinstall step is crucial because it resets your system to avoid at least quite some bad settings that can cause this that you might have introduced yourself (eventually without knowing).

Glaad for every hint that could give me answers! But I am not exactly sure:

What you mean by

How can apt need an eternity if I am not running it manually by funning “apt-get upgrade”?

I have installed the bindings by PaperUI, I have never saw an option to use binding by downloading it every time? I thought installing them by PaperUI will download them.

Regarding starting point, here is the updated: I am still working on it daily, but almost everything was getting complicated. First I installed openhabian and just used .cfg, .thing, .items, .rules, .persistance files to transfer everything. Made some bigger steps since I assumed everthing will work out. Openhab was not loading all rules files and I was not able finding out why. Then i started again from the scratch and was approaching in little steps. (Funny fact: Shelly Binding is running perfectly on “debian openhab” and throwing massive errors on “openhabian openhab” but same version of everything. Maybe Java)
The Problem is, to walk in little steps costs a hell lot of time is neccesarry.
Starting Openhab is now about 4-7 Minutes. I am still not done. Right now I will try to figure out, why is openhab again not loading all rules and needs 7 instead of 4 minutes to start, depending of one specific rule which is existing or not. I will let you know. But I am still not done, many steps are missing.

Depends on the install method you initially chose (expert, standard, …).
With proper Karaf debugging, watch startup closely and you’ll quickly see if it starts downloading.

Why don’t you use openHABian ? It’s right there to relieve you of all those steps.


I am not sure anymore, did it by PaperUi long time ago. I was not able to find it in karaf, but:
cat /var/lib/openhab2/config/org/openhab/addons.config
gives me standard:


So i guess my bindings are all fully downloaded and I don’t need .kar files?

I will, but I will need to study how to properly debug first. I will report.

To be hones, I have installed Debian and Openhab long time ago. As the system was working perfectly (except for the startup delay lately), I never had a reason (or time) to change the OS.

Since then I configured some stuff by PaperUi and some stuff by files (.cfg, services, .things, etc.). But I always wanted a “just files setup”. I prefer to control openhab totaly or backup everything easily by samba. So those steps are wanted to move PaperUI set-ups to files (.cfg, services, etc).

The “B” is wrong. This is the setting about downloading bindings.

We’re every time getting back to my initial recommendation:
You have bad settings somewhere in your system so instead of searching everything setup again, from scratch.

openHABian is Debian/Raspbian, too so no change actually.
But you have to upgrade at times anyway.

That has nothing to do with openHABian, it works both ways. Samba included, too.

You can take the chance to configure everything from scratch to get files-only, however check out first.

1 Like