-
Notifications
You must be signed in to change notification settings - Fork 782
openHAB startup loop #4726
Comments
You seem to have addons in your addons folder - there seems to be a problem with this in openHAB at the moment as you can see on these reports. So to rule out any such openHAB/Karaf-specific side effects, I would suggest to remove those to simplify the analysis. So could you give a short and precise description of the issue, please? Is it "openHAB keeps executing startup rules in a loop"? What is the minimal setup to make this happen? |
Well cannot easily play around too much, it's my house :-) and I need those addons for it to work, too I think the startup rules being executed over and over is just a symptom and consequence of the rules files being loaded, the interesting question is why are the rules files loaded again and again. |
It happened again when upgrading to #1133. I don't think it's related to this felix addon issue. There's no hint why this behavior is supposed to be related to addons. I had temporarily removed them, too, but that made no difference. I believe in some sort of circular or way-too-deep-nested reference or dependency of files on each other. Please note that for each items file to be loaded, there's lines 'Refreshing resource xxx.rules' for EVERY rules file. Is that normal ?? Rules hadn't been loaded at that stage yet. Can't believe it is. Also note the various 'Removing file xxx from repo' entries. All rules files get loaded (again?) after items are processed. I believe this issue just hasn't surfaced elsewhere just because I have quite many and large .items files. Here's my latest openhab.log. |
Have you already tried to use one item file only? So merging all your item files to a big one?
I understand that playing around with your house setup in "productive" is a bad thing. |
Didn't try so far, I tried right now to combine all items into one file, plus upgraded to # 1140.
How am I supposed to do that ? I don't know what item or rule or combination thereof is triggering the faulty behavior. |
After latest upgrade, I ended up with my jsondb shrunk to zero. I had to manually add all things (zwave controller) or confirm them in PaperUI Inbox. 2017-12-17 10:34:54.528 [DEBUG] [el.core.internal.ModelRepositoryImpl] - Refreshing resource 'Szenen.rules' |
@mstormi I am not using the DSL files myself, but doesn't it depend if rules are not proceeded because items are missing, so they are retriggered if a new item is added? Can you have a look at the resp. sources? |
Hmm yes you're likely right. As I noticed after writing my comment, my jsondb was completely empty (whyever - that's a different issue). Allow me to once more point you at ESH#1896 which is about enforcing a deterministic processing order. Wouldn't it make sense, too, to finally implement that one ? My guess is that once implemented, we won't see my issue any more. And it's probably even easier and way more promising to 'just' implement that instead of trying to nail down the exact circumstances of this startup sequence failure by means of 'trial and error'. |
Sure, I assume we would all be happy if this will be implemented. |
Ist Simon Kaufmann nicht dein Kollege und derjenige der das könnte ? Oder auf wen warten wir da alle ? |
Hm, I have to read the whole topic again, but at the moment I didn't know why sjka should be responsible to implement that feature. |
Well for sure he's not responsible but he's one of just very few people to have the required insight and to be capable of doing it. |
As @maggu2810 wrote in #4726 (comment) this issue is about trying to execute rules which depend on items which are not initialized yet. I am pretty sure this will be covered by #1896. So let's make this issue depend on #1896 and close it one this has been implemented. |
I just upgraded from OH snapshot 1119 to latest 1132.
On starting up, OH kept initializing over and over. It kept processing the .rules, .items and .persist files again and again and again.
I've uploaded my full openhab.log as created during that startup. It's probably best to check that right away. I didn't notice anything special in there but then again, I've no idea what to look for.
There's a large number of log entries regarding rules called "Init virtual Items". There's one such rule in most rules files and all of these trigger on "System started" but they don't do anything fancy except to initialize a couple of items and variables.
I stopped that initialization cycle, deleted cache and tmp dir and moved all of my rules files away, then restarted. After a few minutes OH has successfully started/initialized and I moved the rules files back in, now its working.
I have been playing that move-away-back-in-rules game on every startup in order to get OH up and running for many weeks and since many snapshot generations now.
Not sure if ESH #1896 is related, but I'm anxiously waiting for someone to take on that one.
openhab.log
The text was updated successfully, but these errors were encountered: