Trying to connect to MQTT Broker with second openHAB instance

While setting up a testing instance I’m trying to connect the second instance to the mosquitto broker on the primary instance.
MQTT on the testing system will be used to subscribe to some sensor readings.

I used the same config for the Broker Thing on the testing instance as for the primary instance ( different clientID).

UID: mqtt:broker:MQTTBrokeropuspi4
label: MQTT Broker opuspi4
thingTypeUID: mqtt:broker
configuration:
  lwtQos: 0
  publickeypin: true
  keepAlive: 60
  clientID: opuspi3
  secure: true
  birthRetain: true
  shutdownRetain: false
  certificatepin: true
  password: xxxx
  qos: 0
  reconnectTime: 60000
  host: 192.168.178.40
  lwtRetain: true
  username: openhabian
  enableDiscovery: true

I’m getting only:

io.netty.channel.AbstractChannel$AnnotatedConnectException: Verbindungsaufbau abgelehnt: /192.168.178.40:8883 to OFFLINE

Where is my (stupid) mistake?

Does the mosquitto.log file contain more information about the root cause for the connection denial ?

That is all what I’m getting:

1660507975: New connection from 192.168.178.43 on port 1883.
1660507976: Socket error on client <unknown>, disconnecting.

Can’t say why the client is “unknown”, I used a fixed clientID.

…and a simple removing of the Broker Thing and creating a new one solved this one. :roll_eyes:

Now the log shows the used clientID. Maybe the change of the clientID after the initial creation was the problem.

Thanks for the help!

1 Like