"Socket error on client" when Bridge publishes topics from another Broker [message #1821894] |
Fri, 21 February 2020 18:09 |
James Frankman Messages: 1 Registered: February 2020 |
Junior Member |
|
|
I am trying to configure mosquitto as a bridge that will connect to one unsecured broker on my network and will re-publish the topics to an AWS topic. I am observing the following behavior:
This successfully is published:
message received via mosquitto_pub --> mosquitto bridge --> AWS topic
This fails to be published and logs "Socket error on client":
message received via remote broker --> mosquitto bridge --> AWS topic
1. Is there a way to debug or log additional information concerning the Socket error when these occur in mosquitto?
2. What would cause a message received via a mosquitto client to be successfully published but a message received via another broker fail to be published?
Whether the message to be forwarded to the remote broker comes via a publish request from the mosquitto_pub command or whether the message to be forwarded comes from another remote broker I would expect that mosquitto would send the message the same way. However mosquitto clearly published messages to a remote broker differently depending upon if they are received via mosquitto_pub or if they are received via remote broker.
1582305952: Received PUBLISH from local.reliance_lenovo.decawave (d0, q0, r1, m0, 'dwm/node/94ad/uplink/location', ... (91 bytes))
1582305962: Received PUBLISH from local.reliance_lenovo.decawave (d0, q0, r1, m0, 'dwm/node/94ad/uplink/location', ... (93 bytes))
1582305962: Bridge local.bridgeawsiot doing local SUBSCRIBE on topic #
1582305962: Connecting bridge awsiot (a3b09wxwod6tp3.iot.us-east-1.amazonaws.com:8883)
1582305962: Bridge bridgeawsiot sending CONNECT
1582305963: Received CONNACK on connection local.bridgeawsiot.
1582305963: Sending PUBLISH to local.bridgeawsiot (d0, q0, r1, m0, 'dwm/node/94ad/uplink/config', ... (220 bytes))
1582305963: Sending PUBLISH to local.bridgeawsiot (d0, q0, r1, m0, 'dwm/node/94ad/uplink/location', ... (93 bytes))
1582305963: Socket error on client local.bridgeawsiot, disconnecting.
Here is the config:
port 21883
# Bridge to AWS IoT endpoint
connection awsiot
address someaddress.amazonaws.com:8883
# publish all received topics to aws
topic # out 0
# Setting protocol version explicitly
bridge_protocol_version mqttv311
bridge_insecure false
bridge_attempt_unsubscribe false
# AWS Bridge connection settings
cleansession true
clientid bridgeawsiot
notifications false
log_type all
# Certificates to connect to AWS based SSL/TLS support
bridge_tls_version tlsv1.2
bridge_cafile [..somefile..]
bridge_certfile [..somefile..]
bridge_keyfile [..somefile..]
###################################################### Bridge to local unsecured broker
connection decawave
address 192.168.xxx.xxx:1883
# Specifying which topics are bridged
topic dwm/node/94ad/uplink/config in 1
# Setting protocol version explicitly
bridge_protocol_version mqttv311
bridge_insecure false
|
|
|
Powered by
FUDForum. Page generated in 0.02854 seconds