I believe I have set up my MQTT correctly, here are the steps I followed.
SSH into openHABian
Ran the config tool
Added Mosquitto from the additional components
Restarted mosquitto service and openhab2 service and check for errors
Reboot machine
Within PaperUI I made sure to add the MQTT binding
I configured the binding as such and also configured my iusername and password within paperui as well. (openhabian) and the password provided during installation
Now I expected to be able to add the broker to my “things” but when I did, it seems i get this error in the ui and I can’t find much about it. “UNINITIALIZED - HANDLER_INITIALIZING_ERROR”
The stack trace I see in the logs is:
2020-05-08 18:13:51.390 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ‘mqtt:broker:a7533eb9’: org.eclipse.smarthome.io.transport.mqtt.MqttBrokerConnection.setTrustManagers([Ljavax/net/ssl/TrustManager;)V
java.lang.NoSuchMethodError: org.eclipse.smarthome.io.transport.mqtt.MqttBrokerConnection.setTrustManagers([Ljavax/net/ssl/TrustManager;)V
at org.openhab.binding.mqtt.handler.BrokerHandler.assignSSLContextProvider(BrokerHandler.java:139) ~[?:?]
at org.openhab.binding.mqtt.handler.BrokerHandler.initialize(BrokerHandler.java:230) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [137:org.openhab.core:2.5.0.201907171010]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [137:org.openhab.core:2.5.0.201907171010]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Did you use a password to connect to your MQTT broker?
Best is to use the IP address 192.168.2.7 like in the MQTT explorer
Make sure that the username and password are correct.
Uh, I think they were asking because you don’t want to have Moquette installed as well, you have a perfectly fine broker already in Mosquitto.
Your error message is all about SSL, if you wanted that you’d have to set up certificates and things that you haven’t mentioned.
But why would want SSL on a localhost link?
Yes indeed. Yet that’s the error message.
If you try connecting to some non-existent broker with or without SSL, log messages are quite different.
Maybe something messed up - I would first try setting SSL on and saving, then setting off and saving.
Ok I tried what you said but so far no change. This is a screenshot of all my things. I only have one broker thing and one thing that is supposed to use that broker.
I tested today that using external clients I am able to connect (without ssl) and pub sub some random topic. This definitely seems to be something weird with the broker I’m using within openhab. Does the fact that I’m in snapshot mode matter? Currently using 2.5.0 Snapshot of the broker add-on