Impossible to tell. I’d guess you’re stuck in some kind of race condition.
Is it reproducible behavior ? Forcefully restart OH to see. Clean the cache, eventually.
Enable debug level logging on org.apache and org.openhab so there’s an extensive log you might have a chance of spotting some cause or turning point.
Yes, it is reproducible - since the upgrade, I have restarted the system (sometimes only openHAB service) 5…7 times, always same delay.
I have cleaned the cache only once, so I will try again.
Plus I will try to enable debug level logging.
Okay, stopped the service, cleaned cache and restarted with both log levels set to DEBUG.
Startup is in progress for >35mins now.
Here is the log: openhab.log (88.7 KB)
Any ideas of what could be wrong?
Not sure if this is the root cause but at least a starting point. I see in the logs that a new hue:bridge thing was added and the server is constantly updating discovery results.
Try disabling the hue binding.
If this does not help try disabling other bindings.
Agree remove all bindings and then re add them one by one if that fixes the delay. My system is fully restarted in under sixty seconds for which I am Thankful for at the moment as doing development on Actions means a restart everytime I trial a new jar. I do not use a PI.
Addons can be more then bindings like the Mary text to speech.
Hit pause on any rules and use the pause buttons on things as well if you narrow it down to a binding. The pause button is very handy for this kind of thing.
Start listing all installed bindings and we could tell you which ones are the most suspicious. As an example example, no need to uninstall astro or ntp.
Start by uninstalling all non official bindings, even more if you use versions not built with your current version of OH.
My rough guess on that is that you probably have a thing which is “flickering” and does not reach online status. Loading of rules etc. is one of operation after which start level indicator goes up. Only things are making it conditional, so all of them have to get online (if binding supporting them is present).
Are you able to reach the karaf console when it is doing this? you may be able to do a bundle:list and see what has started and possibly it may list what is starting next. Not sure if it would be useful as never had this happen.
Wow, many hints, thanks a lot!
Yesterday, I removed the Hue and Mary Text to speech bindings, but startup still took over an hour.
There is nothing else running on the 4GB PI4B, so this should be fine.
My system information shows 1.5% CPU load, 1054MB used, 2770MB free, 477 CPU threads.
I will test if I can reach the karaf console and see what bundle:list shows.
I will also go on disabling bindings, but with a startup time of 1h, this is time consuming…
Start from scratch > remove everything, start, increase number of plugins, re-start, …
Use “dychotomy methodology” (you have 21 plugins, list them alphabetically and add them in batch, so go through (for example) : 0 plugin (working) > 10 plugins failed) > 5 plugins (working) > 7 plugins (failed) > 6 (culprit)