openhab / openhab-distro

The binary distribution of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.3k stars 391 forks source link

openHAB auto-uninstalls all existing bindings after installing a new binding #635

Closed plasticbrain777 closed 6 years ago

plasticbrain777 commented 6 years ago

On openHAB 2.2.0 Release Build on RaspberryPi, I installad a new binding (wemo) and immediatly afterwards all other installed bindings were automatically uninstalled. The system had been running reliably for a week prior. (Later... I reinstalled the missing bindings and the previously configured things worked again. Doing all of this via PaperUI)

2018-01-21 17:41:46.257 [thome.event.ExtensionEvent] - Extension 'binding-wemo' has been installed.
2018-01-21 17:42:00.092 [hingStatusInfoChangedEvent] - 'chromecast:audiogroup:9002b144-c528-4295-9bc2-b02b82a6c2aa' changed from ONLINE to UNINITIALIZED
2018-01-21 17:42:00.136 [hingStatusInfoChangedEvent] - 'chromecast:audiogroup:9002b144-c528-4295-9bc2-b02b82a6c2aa' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:00.150 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:bb211de1906cf4b1800dfb5a5fa6db71' changed from ONLINE to UNINITIALIZED
2018-01-21 17:42:00.177 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:bb211de1906cf4b1800dfb5a5fa6db71' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:00.196 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:f3ceb2b04d95a2fd75e4841f2b91bbd3' changed from ONLINE to UNINITIALIZED
2018-01-21 17:42:00.250 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:f3ceb2b04d95a2fd75e4841f2b91bbd3' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:00.259 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:9fb7f9a08a01ddf4287b098b067cfe4e' changed from ONLINE to UNINITIALIZED
2018-01-21 17:42:00.263 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:9fb7f9a08a01ddf4287b098b067cfe4e' changed from UNINITIALIZED to OFFLINE
2018-01-21 17:42:00.272 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:9fb7f9a08a01ddf4287b098b067cfe4e' changed from OFFLINE to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:00.296 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:1066a6e71f14cb893550bc5e4fb3db48' changed from ONLINE to UNINITIALIZED
2018-01-21 17:42:00.314 [hingStatusInfoChangedEvent] - 'chromecast:chromecast:1066a6e71f14cb893550bc5e4fb3db48' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:00.486 [thome.event.ExtensionEvent] - Extension 'binding-chromecast' has been uninstalled.
2018-01-21 17:42:05.930 [me.event.ThingUpdatedEvent] - Thing 'yamahareceiver:zone:9ab0c000_f668_11de_9976_00a0de716c4c:Main_Zone' has been updated.
2018-01-21 17:42:06.032 [me.event.ThingUpdatedEvent] - Thing 'yamahareceiver:zone:9ab0c000_f668_11de_9976_00a0de716c4c:Zone_2' has been updated.
2018-01-21 17:42:12.433 [hingStatusInfoChangedEvent] - 'yamahareceiver:zone:9ab0c000_f668_11de_9976_00a0de716c4c:Main_Zone' changed from ONLINE to UNINITIALIZED
2018-01-21 17:42:12.457 [hingStatusInfoChangedEvent] - 'yamahareceiver:zone:9ab0c000_f668_11de_9976_00a0de716c4c:Main_Zone' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:12.471 [hingStatusInfoChangedEvent] - 'yamahareceiver:zone:9ab0c000_f668_11de_9976_00a0de716c4c:Zone_2' changed from ONLINE to UNINITIALIZED
2018-01-21 17:42:12.480 [hingStatusInfoChangedEvent] - 'yamahareceiver:zone:9ab0c000_f668_11de_9976_00a0de716c4c:Zone_2' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:12.497 [hingStatusInfoChangedEvent] - 'yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_00a0de716c4c' changed from ONLINE to UNINITIALIZED
2018-01-21 17:42:12.502 [hingStatusInfoChangedEvent] - 'yamahareceiver:yamahaAV:9ab0c000_f668_11de_9976_00a0de716c4c' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:12.619 [thome.event.ExtensionEvent] - Extension 'binding-yamahareceiver' has been uninstalled.
2018-01-21 17:42:24.141 [thome.event.ExtensionEvent] - Extension 'binding-mqtt1' has been uninstalled.
2018-01-21 17:42:37.328 [hingStatusInfoChangedEvent] - 'samsungtv:tv:74919c1d_dbc8_da2a_a081_e37c2ddea49e' changed from OFFLINE to UNINITIALIZED
2018-01-21 17:42:37.343 [hingStatusInfoChangedEvent] - 'samsungtv:tv:74919c1d_dbc8_da2a_a081_e37c2ddea49e' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-21 17:42:37.445 [thome.event.ExtensionEvent] - Extension 'binding-samsungtv' has been uninstalled.
2018-01-21 17:43:11.290 [hingStatusInfoChangedEvent] - 'wemo:MZ100:ba565258' changed from UNINITIALIZED to INITIALIZING
2018-01-21 17:43:11.333 [hingStatusInfoChangedEvent] - 'wemo:MZ100:ba565258' changed from INITIALIZING to OFFLINE
2018-01-21 17:43:47.331 [.ItemChannelLinkAddedEvent] - Link 'LightSwitch1-wemo:MZ100:ba565258:state' has been added.
2018-01-21 17:44:12.973 [ome.event.ItemCommandEvent] - Item 'LightSwitch1' received command ON
2018-01-21 17:44:12.989 [vent.ItemStateChangedEvent] - LightSwitch1 changed from NULL to ON
2018-01-21 17:45:27.079 [hingStatusInfoChangedEvent] - 'wemo:MZ100:ba565258' changed from OFFLINE to REMOVING
2018-01-21 17:45:27.093 [hingStatusInfoChangedEvent] - 'wemo:MZ100:ba565258' changed from REMOVING to REMOVED
2018-01-21 17:45:27.162 [hingStatusInfoChangedEvent] - 'wemo:MZ100:ba565258' changed from REMOVED to UNINITIALIZED
2018-01-21 17:45:27.211 [hingStatusInfoChangedEvent] - 'wemo:MZ100:ba565258' changed from REMOVED to UNINITIALIZED (HANDLER_MISSING_ERROR)`
lolodomo commented 6 years ago

@kaikreuzer: for your information, it looks like a critical issue as several users are complaining about that. Not tested on my side.

kaikreuzer commented 6 years ago

@plasticbrain777 Can you tell how you installed the original bindings and also how you installed the latest one (addons.cfg or Paper UI)?

@lolodomo Do you have a reference to the reports of the other users?

lolodomo commented 6 years ago

https://community.openhab.org/t/all-bindings-automatically-uninstalled/38339 https://community.openhab.org/t/bindings-are-uninstalling-autonomously/38111 https://community.openhab.org/t/bindings-added-through-paperui-being-auto-uninstalled/38228/9

plasticbrain777 commented 6 years ago

@kaikreuzer all bindings and other setup was done via the PaperUI interface. I installed the system from the OpenHABian image at https://community.openhab.org/t/openhabian-v1-4-released/37398. I have also installed Node-RED, google notifier, etc which weren't effected.

sotatech commented 6 years ago

This has also happened to me on several occasions. My setup is an Intel NUC with Openhabian 1.4 installed on Ubuntu server 16.04.3 - on the first occasion Habpanel was uninstalled. I assumed that I had made an error somewhere. But after that, various bindings disappeared when I added a binding via Paper UI, including MQTT, Samsung, SystemInfo and MIOS after installing Homematic. Nothing in the logs to indicate why. I have not made any changes to addons.cfg.

CubGeek commented 6 years ago

Just created an account here to respond. This issue has happened to me three times now. Once on Windows 7 x86 with Oracle Java, once on Windows 10 x64 with Oracle Java, and once on Ubuntu 16.04 with Zulu Java. Log files for the first and the last time are in the thread I started on the openHAB community site.

kaikreuzer commented 6 years ago

Thank you all, sounds like a nasty issue indeed. Is anyone of you able to provide a reproducible scenario? Like download distro - select standard package, install hue binding, restart, install network binding, boom - hue is gone?

CubGeek commented 6 years ago

More information, may or may not be helpful. Possibly of note (?): I am NOT using addons.cfg, I am NOT using .items files for anything. Everything is being done through PaperUI (hey, I'm still new to all this). After this last go-around, I was NOT looking forward to re-creating all my items, things, channels, etc.

When I re-installed the bindings, however, the previously created entries were still there and reconnected with their real-world counterparts. So, it seems that the jsondb information is persisting (or perhaps being re-loaded from one of the backups)?

When I get home this evening from work (approx 18:00, GMT-5) I'll see about installing Openhab on my test linux server and try to reproduce this. In the meantime, if anyone else has time, please give it a go!

ElwoodSC commented 6 years ago

In my case it happened not only with bindings but also with persistence addons. I also only use PaperUI to install/remove addons. When I reinstalled all my bindings/persistence after that issue occured all my previosly done settings and also the content of my persistence DBs were still intact.

Josar commented 6 years ago

might be related https://github.com/openhab/openhab-core/issues/278

kaikreuzer commented 6 years ago

@Josar Could you explain where you see the connection to that issue?

Josar commented 6 years ago

@kaikreuzer there seems to be some routine in core or elsewhere which regularly gets triggered by any binding installation which uninstalls existing installed bindings. I think the uninstall in both cases are caused by the same routine.

choddles commented 6 years ago

i did two things 1) renamed items and sitemaps in paperui & basic 2) added minecraft binding then the auto uninstall of all bindings occured. minecraft is still there ..

ooswald commented 6 years ago

Same with me - see here: https://community.openhab.org/t/installing-loxone-binding-removes-all-other-bindings/39537

I do use paper ui and text files for config.

mpuff commented 6 years ago

Today i had the same issue, i have installed openhabian on a raspberry, bevore i had openhab on docker. I copied everything like the old system, finally i installed the z-wave binding, and then i saw the message in the gui that many bindings are uninstalled after the z-wave binding was installed.

dllabs commented 6 years ago

I have had this issue twice, including just now. I use the PaperUI to install bindings.

NaScha commented 6 years ago

Last issue mentioned above is mine. I would not like to use PaperUI at all, but only pure text-based configuration. All bindings I configure in addons.cfg to become autoinstalled, will NOT be installed. If I manually install them via PaperUI and leave them configured in addons.cfg, they will be uninstalled again after machine or openhab restart.

baukeplugge commented 6 years ago

Hi I got the same only with installing an action:

just installed the Telegram Action-telegram - 1.12.0.SNAPSHOT but when that finished I got a message that the action-mqtt action has been uninstalled:

after this message I was able to reinstall the MQTT action again.

2018-02-19 10:13:33.546 [thome.event.ExtensionEvent] - Extension ‘action-telegram’ has been installed.
==> /var/log/openhab2/openhab.log <==

2018-02-19 10:13:44.532 [INFO ] [penhab.io.transport.mqtt.MqttService] - Stopping broker connection ‘mosquitto’

2018-02-19 10:13:44.647 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled ‘openhab-action-mqtt’
==> /var/log/openhab2/events.log <==

2018-02-19 10:13:44.652 [thome.event.ExtensionEvent] - Extension ‘action-mqtt’ has been uninstalled.
==> /var/log/openhab2/openhab.log <==

I'm running Openhabian on my pi3 dpkg --list | grep openhab ii openhab2 2.3.0~20180218111804-1 all openhab2

java -version openjdk version "1.8.0_152" OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76) OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)

after this message I was able to install the MQTT action again. Im only installing the addons via the PaperUI

Torsten555 commented 6 years ago

I am having the same issue with openhabian. I have installed all bindings using PaperUI. When I install a new binding, occassionally an old one gets removed like in the logs below, All I did was trigger new installation of http binding, not touching the jeelink binding.

2018-02-24 17:13:08.233 [thome.event.ExtensionEvent] - Extension 'binding-http1' has been installed.

2018-02-24 17:14:33.415 [hingStatusInfoChangedEvent] - 'jeelink:lacrosse:42' changed from ONLINE to UNINITIALIZED

2018-02-24 17:14:34.062 [hingStatusInfoChangedEvent] - 'jeelink:lacrosse:42' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

==> /var/log/openhab2/openhab.log <==

2018-02-24 17:14:39.237 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-binding-jeelink'

==> /var/log/openhab2/events.log <==

2018-02-24 17:14:39.315 [thome.event.ExtensionEvent] - Extension 'binding-jeelink' has been uninstalled.

Daemonentreiber commented 6 years ago

Im also having this issue using HABmin to install a binding. Log doesnt say much and i cant reproduce it.

Rathna-K commented 6 years ago

I am facing the same issue. all my bindings get uninstalled for no reason.

Orfait commented 6 years ago

Same for me.

kaikreuzer commented 6 years ago

All, I have tried to reproduce this and found one situation where this happens:

Taking a new installation and installing add-ons through the Paper UI results in this information written to userdata/config/org/openhab/addons.config, while Karaf also creates userdata/etc/org.openhab.addons.cfg, which is lacking the information about the newly installed add-ons. As an effect, after a restart, userdata/etc/org.openhab.addons.cfg is taken into account, which thus does not know about any recently installed add-ons and thus uninstalls them. Any subsequent installations are from that moment on correctly remembered and no unwanted uninstallation happens.

Karaf offers a new setting to disable the creation of cfg files in userdata/etc - I have created #650, which sets this flag. This solves the situation described above for me, but I cannot say whether any other situation might exist. The change makes imho sense in any case as it avoids duplicating the same information in different files and thus reduces the risk that something gets out of sync. If you are updating an existing installation, you might need to manually delete the file userdata/etc/org.openhab.addons.cfg for the change to take full effect.

kaikreuzer commented 6 years ago

FTR, the latest distro 1224 contains my fix, so please try it out and report your results!

Orfait commented 6 years ago

I modified cfg file like in #650 and deleted org.openhab.addons.cfg. I will keep you informed

JakobLichterfeld commented 6 years ago

Thanks for looking into it. Deleting userdata/etc/org.openhab.addons.cfg seems to solved the issue for me, even if the automatic deinstallation was not only triggered by an restart before...

Orfait commented 6 years ago

I just installed astro binding and got all bindings uninstalled...

Rathna-K commented 6 years ago

@kaikreuzer where is this user data in ? for example, in PI. is it /var/lib/openhab2/etc ? if so I cant find this file there.

JakobLichterfeld commented 6 years ago

This depends in your installation, see

https://docs.openhab.org/installation/linux.html#file-locations

Rathna-K commented 6 years ago

I did a find and i am not finding that file at all. I got only one file. when I install even from clean install whatever trigger some addons get uninstalled like wemo socket. any way to look for more errors and post here to help? sudo find /. -name '*addons.cfg' /./etc/openhab2/services/addons.cfg

JakobLichterfeld commented 6 years ago

with ' around your search string the * did not get resolved. Try it without the '

Rathna-K commented 6 years ago

same result. only one file found. sudo find /. -name *addons.cfg /./etc/openhab2/services/addons.cfg

heX16 commented 6 years ago

Same error: [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-binding-mqtt1'

justClouds commented 6 years ago

If I understand it correctly, I should install a snapshot build to get the fix created by @kaikreuzer as it is not in 2.2.0-1?

ToniTornado commented 6 years ago

I am on the latest snapshot build and this still happened to me today...

On openhabian my addons.config lives in /var/lib/openhab2/config/org/openhab.

I set up the whole system only 2 days ago. After installing the netatmo binding today, all other bindings got uninstalled.

My addons.config now looks now like this:

binding="netatmo"
package="standard"
service.pid="org.openhab.addons"

PS I did a manual restart of the server; I'm pretty sure I did it AFTER the bindings disappeared to try to fix it.

ohadeytan commented 6 years ago

Happened to me today with openHAB 2.4.0 Build #1343. I installed the astro binding via paperui and got:


2018-09-27 16:51:57.596 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-binding-http1'
2018-09-27 16:51:58.441 [INFO ] [b.core.service.AbstractActiveService] - HTTP Refresh Service has been shut down
2018-09-27 16:52:25.992 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-binding-rfxcom'
2018-09-27 16:52:54.058 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler
2018-09-27 16:52:55.978 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-binding-zwave'
2018-09-27 16:53:23.549 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-binding-mqtt1'
edgiru commented 6 years ago

openHAB 2.3.0 the problem still exists

underdog commented 5 years ago

so, had this issue pop up all of a sudden. it was after I was installing MQTT broker and MQTT Action. I uninstalled both items, renamed all mqtt*.cfg in the services dir, then restarted openhab2.service then reinstalled my previous bindings/actions and things seem to have stopped uninstalling now. i may go back and recreate my install of MQTT add ons and see what happens.

Timtam commented 5 years ago

same here, running openHAB 2.4. I've got netatmo binding installed, as well as openhabcloud and homekit. as soon as I install the weather binding and restart openhab, it seems to automatically uninstall weather again. Installing via PaperUI, but also added it to the first-start addons.cfg file.