I’ve been having the problem that to start OH2 on my Pi3 takes VERY long (>30 mins until zwave start initialising).
I am currently using 2.2 snapshot 1008 on a Jessie Raspian using APT, but the problem has been there for a long long time and throughout various OH versions.
java didn’t seem to do anything really at times. Now stracing the java process, I noticed it’s accessing the lock file /var/lib/openhab2/tmp/lock over and over, and I also noticed the file was three days old although I had been restarting OH several times in the meantime.
After deleting the tmp dir including the lockfile (and cache dir), startup was MUCH faster. I tried cache deletion earlier, but only that did not make a notable difference.
I had the Pi crash or did kill -9 java at times, that’s why the lock file was there.
The point, though, is: why didn’t it get deleted on startup?
Is anyone else experiencing this kind of startup delay ? If so, see if to delete the lock file makes a difference for you.
I see java at 100% + CPU during this and there’s occasional progress log messages, but it’s way too slow and I don’t really know what it’s doing. Seems like a single full CPU core is busy. Any hint what debugging setting to apply for that ?
The point, though, is: why didn’t it get deleted on startup?
ok, but what about if the java process or whole system crashes ? Wouldn’t it need to be deleted on every startup ?