MQTT broker - Server closed connection without DISCONNECT

Thanks, both files are the default ones and don’t contain any rules, so it’s back to the drawing board…

Post what you have in var/lib/openhab2/config/org/openhab/mqtt.config and edit out your password. Also what’s inside mqtt-eventbus and persistence config.

Okay, so here’s my /var/lib/openhab2/config/org/openhab/mqtt.config:

:org.apache.felix.configadmin.revision:=L"2"
mqtt.async="false"
mqtt.clientId="openhab"
mqtt.pwd="notmypassword"
mqtt.qos="0"
mqtt.retain="true"
mqtt.url="tcp://10.0.1.15:1883"
mqtt.user="spcgw"
service.pid="org.openhab.mqtt"

mqtt-eventbus.config:

broker="mqtt"
commandPublishTopic="owntracksCommand"
commandSubscribeTopic="mqtt/commandUpdates/${item}/command"
service.pid="org.openhab.mqtt-eventbus"
statePublishTopic="owntracksState"
stateSubscribeTopic="mqtt/stateUpdates/${item}/state"

mqtt-persistence.config:

broker="mqtt"
message="%1$s,\ %3$s"
service.pid="org.openhab.mqtt-persistence"
topic="/SPC/"

Just for clarification, this all works fine on 2.5.0 M4, but doesn’t work on any later milestone or the 2.5.0 release build, so I have to stay on M4. I have the same issue on two totally separate systems.

@roryd Comparing your mqtt.config to mine I do not have that first line (
:org.apache.felix.configadmin.revision:=L"2") in my file.

I would comment out that line and see if that makes a difference.

/etc/hosts.allow and /etc/hosts.deny are secondary config files for tcpd services . Its a unix TCP wrapper. Main functionnality : logging/syslog and acces control.
Some example :
#vi /etc/hosts.allow
sshd : ALL
8883 : .dot.com
vsftpd : ALL : banners /etc/banners/
ALL: ALL EXCEPT 192.168.0.2

#vi /etc/hosts.deny
ALL : ALL : spawn /bin/echo “%c tried to connect to %d and was blocked” >> /var/log/tcpwrappers.log
sshd : ALL : severity emerg

sshd : .dot.com
: spawn /bin/echo /bin/date access denied >> /var/log/sshd.log \
: deny

ALL: 192.168.0.0/24
ALL: 192.168.0.

Forgive me if someone else ask the same question already , do you use the internal openhab mosquitto ? Whats your version of mosquitto ?

The internal MQTT broker is called moquette.
Mosquitto is a separate application altogether.

There is 2 broker in openhab mosquitto or moquette. I’ve assume it run on mosquitto, my bad. I got some issue with plugin/integrated broker. Trying from another host with a diffrent client like mqtt.fx or mosquitto_sub can provide different information.

I commented out that line, upgraded to the latest snapshot, and I get this:

2020-02-04 15:37:56.847 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.1.15' with clientid spcgw
2020-02-04 15:37:56.861 [WARN ] [.MqttBrokerConnectionServiceInstance] - MqttBroker connection configuration faulty: host : You need to provide a hostname/IP!
2020-02-04 15:37:57.114 [INFO ] [rnal.service.RemoteControllerService] - Using None interface
2020-02-04 15:37:57.335 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2020-02-04 15:37:57.335 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'mqtt'
2020-02-04 15:37:58.031 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 31da839f-bbda-4cab-bfc1-adddea014426, base URL = http://localhost:8080)
2020-02-04 15:38:00.056 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2020-02-04 15:38:00.203 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2020-02-04 15:38:00.309 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2020-02-04 15:38:00.375 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-02-04 15:38:07.024 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '10.0.1.15'. Next attempt in 60000ms
2020-02-04 15:38:07.084 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.1.15' with clientid spcgw
2020-02-04 15:39:07.086 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '10.0.1.15'. Next attempt in 60000ms
2020-02-04 15:39:07.094 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.1.15' with clientid spcgw

And those last two lines just repeat every 60 seconds. I’ve reverted to M4 again for the moment so that my system works.

Did you add the IP?

After making the change, stop OH, clean the cache and reboot. You may need to reboot a few times to clear all errors just allow OH to fully restart between reboots.

I have thse same lines appearing on my setup, but they dont seem to make any problems. Its just more like notification.

My mosquitto setup is working erfectly despite this error in logs.

Maybe it has something to do with this :

Hello! Sorry for bringing this topic back again but I have the exact same log entries, coming over and over again (every minute):

2020-06-24 12:18:55.538 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ‘192.168.1.199’. Next attempt in 60000ms

2020-06-24 12:18:55.545 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.1.199’ with clientid c0830b37-35a0-4ee4-849c-741e2944e7c7

2020-06-24 12:19:55.552 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ‘192.168.1.199’. Next attempt in 60000ms

2020-06-24 12:19:55.562 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.1.199’ with clientid c0830b37-35a0-4ee4-849c-741e2944e7c7

2020-06-24 12:20:55.571 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ‘192.168.1.199’. Next attempt in 60000ms

2020-06-24 12:20:55.576 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.1.199’ with clientid c0830b37-35a0-4ee4-849c-741e2944e7c7

2020-06-24 12:21:55.581 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ‘192.168.1.199’. Next attempt in 60000ms

Any ideas how to get rid of it?
Mqtt bindings are working fine.

Using openhabian with mqtt binding version 2.5.5 and mosquito broker.

Thank you guys.

Please, can someone please help me out? Searched the whole community but cannot find the answer for my problem here…
Thanks!

You may want to open your own Topic as this one is old. Also provide your MQTT configuration, what your running OH and broker on, what version and any other info that may help.