[SOLVED] After upgrade to 2.4 stable I'm flooded with java.lang.IllegalStateException

For me it looks like that:

addons.cfg contains (stripped from comments):

ui =basic,paper,habpanel
persistence = rrd4j, mapdb
voice =voicerss

addons.config contained:

action=",mqtt"
binding="http1,mqtt1,tankerkoenig,exec,mqtt,systeminfo,amazonechocontrol,sonos"
legacy=B"false"
misc=",openhabcloud,restdocs"
package="standard"
persistence="rrd4j,\ mapdb"
remote=B"true"
service.pid="org.openhab.addons"
transformation="javascript,jsonpath,map"
ui="basic,paper,habpanel"
voice="voicerss"

Immidiate candidates are mqtt1 binding and action!
Removed that file and restarted.

It looks as if the system is really “cooling down”! I’d call that solved!

I did do the update of my openhabian system by the automated update with openhabian-config, the fact that the mqtt binding and action remained in the system migth be true for installations!!!

2 Likes

Great that it also seems to solve your issue @opus!

I found that if you comment lines from addons.cfg the changes are not applied. What does work is setting the addons lists to an empty list or the other settings to the default value before commenting them. :neutral_face:

Thanks for helping!:+1::+1:
It took some time, “Der Junge musste an die Luft!” (sorry, does make sense only in german!)

Hi @wborn,

I am facing the same issue:

I do not have a addons.cfg file. My addons.config looks like this:

binding="yahooweather,astro,fritzboxtr0641,exec,mqtt1,http1,systeminfo,homematic,miio,samsungtv"
misc="market,restdocs,openhabcloud"
package="standard"
persistence="rrd4j"
service.pid="org.openhab.addons"
transformation="map,regex"
ui="basic,paper,habpanel,homebuilder,habmin"

Could there be an issue in my file? Do I need to change sth.?

@Woogi, you don’t have legacy bindings enabled for mqtt1 and http1. You enable them in addons.cfg by adding the line:

legacy="true"

@Woogi : fritzboxtr0641 as binding looks strange, to not say unexpected. This is probably not the right binding name.

With that configuration and the error logging that got added in 2.5.0-SNAPSHOT it indeed shows it can’t install the mqtt1 binding:

21:08:06.420 [ERROR] [.core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-mqtt1'
21:09:05.885 [ERROR] [.core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-mqtt1'

You can enable the legacy bindings in Paper UI as well.

See: MQTT Binding 2.4 - what changed? not working anymore.

That will add some additional lines to the addons.config file:

legacy=B"true"
remote=B"true"

It’s OK:

openhab> feature:list|grep fritz
openhab-binding-avmfritz                    │ 2.5.0.SNAPSHOT   │          │ Uninstalled │ openhab-addons-2.5.0-SNAPSHOT        │ AVM FRITZ!Box Binding
openhab-binding-fritzbox1                   │ 1.14.0.SNAPSHOT  │          │ Uninstalled │ openhab-addons-2.5.0-SNAPSHOT        │ Fritzbox Binding
openhab-binding-fritzboxtr0641              │ 1.14.0.SNAPSHOT  │ x        │ Started     │ openhab-addons-2.5.0-SNAPSHOT        │ Fritzbox TR064 Binding

HI @wborn,

thank you for the detailed description, that helped me a lot to understand the issue as a non Linux guy :smiling_face_with_three_hearts:.

I enabled legacy bindings in Paper UI. Followed by the log

2019-01-05 21:26:48.600 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2019-01-05 21:26:48.605 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'mymosquitto'

I guess the MQTT was the problem. By now, no warning message appeared.

Thanks as well to @scottk and @Lolodomo :pray:

Cheers,
Woogi

1 Like

I am also suffering from IllegalExceptions (posted here where you can see my log file )

Following this thread has led me to thinking there is an issue with MQTT. I installed mqtt 2.4.0 via PaperUI and have been using that fine.

However following the above checking cpu usage etc I have enabled debugging and my logs are now full of:

2019-01-07 18:35:03.121 [DEBUG] [core.karaf.internal.FeatureInstaller] - Installed 'openhab-binding-mqtt1'
2019-01-07 18:35:51.559 [DEBUG] [core.karaf.internal.FeatureInstaller] - Running scheduled sync job
2019-01-07 18:36:00.364 [DEBUG] [core.karaf.internal.FeatureInstaller] - Installed 'openhab-binding-mqtt1'
2019-01-07 18:36:51.566 [DEBUG] [core.karaf.internal.FeatureInstaller] - Running scheduled sync job
2019-01-07 18:37:00.392 [DEBUG] [core.karaf.internal.FeatureInstaller] - Installed 'openhab-binding-mqtt1'

The above is popping up every minute. I’ve never attempted to install mqtt1, how do I stop it?

I have tried enabling legacy but still the same loop. I don’t want to remove mqtt 2.4 as I have a weather station integrated to a site map and it’s working fine.

Any help would be appreciated
Thanks

Check your addons.cfg if any bindings are loaded through that file. Comment all lines if you are using PaperUI for installing and configuring your openHAB system.

If your addons.cfg is fine, clean the cache and tmp folders:

I think I may have fixed it

I enabled expert mode and legacy bindings. When I did this mqtt1 must have fully installed as I then had multiple mqtt connections trying to connect.

When I went to Addons > bindings in paperui it now listed mqtt v1 and v2 as installed. I uninstalled v1, restarted OH and so far the log file is looking a lot healthier.

I will post back if the problem returns.

What you saw is exactly the same.
I bet before you deleted mqtt1 it would have shown in the file

var/lib/openhab2/config/org/openhab/addons.config
My guess, you had mqtt1 installed, you updated to oh2.4, by that mqtt1 got automatically installed, mqtt1 removed but the “desire” to install mqtt1 remained, hence the problems.

Not by me. This was a clean install of OH2.4 about 2 weeks ago and mqttv2 installed via paperui. I have never done anything with v1 so not sure where it came from

Another look at the logs and so far so good…

That does sound weird!

just to note, I had the same problem, never touched MQTT, but mqtt1 was in my addons.config, and causing errors after updating from Milestone 4 to 2.4 Release. Removing it from the file fixed the problem.

This is the source code file for addons.cfg which gets installed with openHAB, there are no bindings configured for automatic installation!!!

@sihui:
Note that the mqtt1 did show in the addons.config and not in the add-ons.cfg!

In my case I would say the mqtt1 got removed for mqtt2 (legacy bindings not selected), but remained in add-ons.config.

Here’s what I saw after upgrading:

pi@raspberrypi2:~ $ cat /var/lib/openhab2/config/org/openhab/addons.config 
binding="denonmarantz,serial1,mqtt1,zwave,lutron"
felix.fileinstall.filename="file:/var/lib/openhab2/etc/org.openhab.addons.cfg"
package="standard"
service.pid="org.openhab.addons"
transformation="jsonpath,map"
ui="basic,paper"

The other bindings listed are the ones I have installed through PaperUI. I don’t believe I ever installed MQTT, 1 or 2.

Answer was meant to be posted to

A clean install cannot have any addons listed in addons.cfg (or even addons.config)