Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Cannot connect to a bridge

Hello there,
I am trying to configure the Mosquito broker on a Raspberry Pi 3 to:
1. Allow for a connection from a Zigbee2mqtt instance (working),
2. Configure a bridge to another Broker (Supla.org). This is not working.

By using MQTTX client I am able to connect to the Supla.org broker so I am certain it works. What I think is wrong, are config files, but I cannot figure out where. I have 2 config files for the Mosquito on the Rpi:

/etc/mosquitto/mosquitto.conf:

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

per_listener_settings true

pid_file /run/mosquitto/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

allow_anonymous false
listener 1883
password_file /etc/mosquitto/passwd

The above must work, since I am able to connect here from the MQTTX client as well.

The second file is for the bridge, /etc/mosquitto/conf.d/supla_broker.conf:

# Supla bridge config

connection saupla_bridge
address mqtt85.supla.org:8883
topic # both 0
cleansession false
remote_clientid brokerSupla
remote_password 4w9TDXU2*1V...
remote_username 07df9cbb081...
start_type automatic
try_private true
bridge_insecure false

When the Mosquito service is started, I can se the following in the log:

pi@rpi3:/etc/mosquitto/conf.d $ sudo cat /var/log/mosquitto/mosquitto.log
1695506647: mosquitto version 2.0.11 starting
1695506647: Config loaded from /etc/mosquitto/mosquitto.conf.
1695506647: Failed to associate persisted user 07df9cbb081... with ACLs, likely due to changed ports while using a per_listener_settings configuration. 
1695506647: Failed to associate persisted user 07df9cbb081... with ACLs, likely due to changed ports while using a per_listener_settings configuration. 
1695506647: Opening ipv4 listen socket on port 1883.
1695506647: Opening ipv6 listen socket on port 1883.
1695506647: Connecting bridge (step 1) saupla_bridge (mqtt85.supla.org:8883)
1695506647: mosquitto version 2.0.11 running
1695506647: Connecting bridge (step 2) saupla_bridge (mqtt85.supla.org:8883)
1695506648: Client local.brokerSupla closed its connection.
1695506648: New connection from ::1:42736 on port 1883.
1695506648: New client connected from ::1:42736 as mqttjs_3116b5eb (p2, c1, k60, u'mqtt').
1695506655: Connecting bridge (step 1) saupla_bridge (mqtt85.supla.org:8883)
1695506655: Connecting bridge (step 2) saupla_bridge (mqtt85.supla.org:8883)
1695506655: Client local.brokerSupla closed its connection.
1695506673: Connecting bridge (step 1) saupla_bridge (mqtt85.supla.org:8883)
1695506673: Connecting bridge (step 2) saupla_bridge (mqtt85.supla.org:8883)
1695506673: Client local.brokerSupla closed its connection.
1695506698: Connecting bridge (step 1) saupla_bridge (mqtt85.supla.org:8883)
1695506698: Connecting bridge (step 2) saupla_bridge (mqtt85.supla.org:8883)
1695506698: Client local.brokerSupla closed its connection.
1695506729: Connecting bridge (step 1) saupla_bridge (mqtt85.supla.org:8883)
1695506729: Connecting bridge (step 2) saupla_bridge (mqtt85.supla.org:8883)
1695506729: Client local.brokerSupla closed its connection.
1695506760: Connecting bridge (step 1) saupla_bridge (mqtt85.supla.org:8883)
1695506760: Connecting bridge (step 2) saupla_bridge (mqtt85.supla.org:8883)
1695506760: Client local.brokerSupla closed its connection.

The last 3 lines go on and on- the bridge cannot be connected. The connection on port 1883 is the Zigbee2mqtt instance. 

I would appreciate all feedback and help in figuring out why I cannot successfully create this bridge. 

--
Łukasz Przeniosło


Back to the top