← Back to team overview

mosquitto-users team mailing list archive

Bridging issues

 

I'm trying to configure bridging in a master-slave type configuration where the slaves connection to the masters and subscribe to the topics in the IN direction only.  I was having issues with 0.15 but seeing as the release of 1.0 is soon I decided to check out the branch and build it.  I seem to be having two different issues at the moment.

First issue is if I use a username/password for the bridge.  I see that the slave connects, connects to the three topics that I want it listening to, and then a socket error.
Slave output:
1343748661: Connecting bridge mosquitto_master
1343748661: Bridge test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master sending CONNECT
1343748661: Received CONNACK on connection test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master.
1343748661: Bridge test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master sending SUBSCRIBE (Mid: 154, Topic: a/#, QoS: 0)
1343748661: Bridge test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master sending SUBSCRIBE (Mid: 155, Topic: b/#, QoS: 0)
1343748661: Bridge test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master sending SUBSCRIBE (Mid: 156, Topic: d/#, QoS: 0)
1343748661: Received PUBREC from test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 11)
1343748661: Socket read error on client test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master, disconnecting.
Master output:
1343748692: New connection from 127.0.0.1.
1343748692: New client connected from 127.0.0.1 as test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master.
1343748692: Sending CONNACK to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (0)
1343748692: Sending PUBREC to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 11)
1343748692: Sending PUBREC to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 12)
1343748692: Sending PUBREC to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 13)
1343748692: Sending PUBREC to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 14)
1343748692: Sending PUBREC to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 15)
1343748692: Sending PUBREC to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 16)
1343748692: Sending PUBREC to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 17)
1343748692: Sending PUBREC to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 18)
1343748692: Received PUBLISH from test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (d0, q1, r1, m157, '$SYS/broker/connection/test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master/state', ... (2 bytes))
1343748692: Sending PUBACK to test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master (Mid: 157)
1343748692: Socket error on client test-us-east-mqtt-40e9eb38.swypeconnect.com.mosquitto_master, disconnecting.

The second issue presents itself if I don't have a username/password set for the bridge, I have an ACL still set, but anonymous users can read from the topics I wish to subscribe to.  I can successfully bridge the slave to the master and messages that are published to the master are in turn published to the slave but the slave does not publish those messages to other clients listening to those messages.  If I publish directly to the slave the clients do get the messages that they are subscribed to.

I'm using CentOS 6.2 on both slave and master.

Follow ups