Open Anzal-calixto opened 4 months ago
try
address broker.emqx.io:1883
#bridge_cafile /etc/mosquitto/certs/ca.crt
#bridge_certfile /etc/mosquitto/certs/client.crt
#bridge_keyfile /etc/mosquitto/certs/client.key
topic home-15646/# both 0
But it feels like this might be something else.
tls settings good?
Tls settings are working fine when I try with emqx broker it's working but if I am connecting to mosquito broker it's not bridging
Try wrapping the topic in quotes
address broker.emqx.io:1883
#bridge_cafile /etc/mosquitto/certs/ca.crt
#bridge_certfile /etc/mosquitto/certs/client.crt
#bridge_keyfile /etc/mosquitto/certs/client.key
topic "home-15646/#" out 0
topic "home-15646/#" in 0
thanks @hardillb i tried using above method it doesn't seems to be working
I think there should be a "both" variant to "in" and "out", try that instead of in and out separately.
1719215263: Error creating bridge: Broken pipe. 1719215294: Connecting bridge (step 1) home_connection-15646(test.mosquitto.org:1883)
@Daedaluz tried that still gives the same error
What does emqx logs say?
1719220419: mosquitto version 2.0.11 starting 1719220419: Config loaded from /etc/mosquitto/mosquitto.conf. 1719220419: Opening ipv4 listen socket on port 1883. 1719220419: Opening ipv6 listen socket on port 1883. 1719220419: Connecting bridge (step 1) home_connection-15646 (broker.emqx.io:1883) 1719220419: mosquitto version 2.0.11 running 1719220420: Connecting bridge (step 2) home_connection-15646 (broker.emqx.io:1883) 1719220420: New connection from 127.0.0.1:60498 on port 1883. 1719220420: New client connected from 127.0.0.1:60498 as mqttjs_b48cce68 (p2, c1, k60). 1719220473: New connection from 192.168.1.174:52561 on port 1883. 1719220473: New client connected from 192.168.1.174:52561 as mqttx_384adf50 (p5,
this is the log for emqx
that looks like logs from mosquitto.
@Daedaluz In my setting my local broker is mosquitto and when i am trying to bridge this local broker to a mosquitto broker thats when it gives the error and bridge is not being connected. If i try to bridge it to an emqx broker bridge is working fine. my cloud broker is a mosquitto broker and the emqx broker is an open broker
@Daedaluz @hardillb any suggestions
@Anzal-calixto "home-15646/#"
is not a valid topic filter (because the #
is not at the end).
Please correct to home-15646/#
which is probably what you intended
Can you try with a more recent version of mosquitto (2.0.18)? 2.0.11 is 3 years old
@ckrey i tried home-1546/#
it was also havig the issue i will update mosquitto and try again
hello @ckrey i am using debian 11 it seems the latest version that is available for dedian 11 is 2.0.11
Setting up a brigde to test.mosquitto.org:1883
works well with mosquitto 2.0.11 and 2.0.18
Please show us your complete config with bridge to test.mosquitto.org (all your snippets above show the config with emqx)
sure here is the settings
address test.mosquitto.org:1883
topic home-15646/# both 0
@ckrey @Daedaluz @hardillb can you guys provide any other methods. it would be a great help
@Anzal-calixto Would you retry with this mosquitto.conf and show us your mosquitto output?:
log_dest stderr
log_type all
connection_messages true
allow_anonymous true
connection home_connection-15646
address test.mosquitto.org:1883
topic home-15646/# both 0
It works perfectly here
1728462102: mosquitto version 2.0.19 starting
1728462102: Config loaded from mosquitto-bridge.conf.
1728462102: Starting in local only mode. Connections will only be possible from clients running on this machine.
1728462102: Create a configuration file which defines a listener to allow remote access.
1728462102: For more details see https://mosquitto.org/documentation/authentication-methods/
1728462102: Opening ipv4 listen socket on port 1883.
1728462102: Opening ipv6 listen socket on port 1883.
1728462102: Bridge local.C1.local.home_connection-15646 doing local SUBSCRIBE on topic home-15646/#
1728462102: Connecting bridge home_connection-15646 (test.mosquitto.org:1883)
1728462102: Bridge C1.local.home_connection-15646 sending CONNECT
1728462102: mosquitto version 2.0.19 running
1728462102: Received CONNACK on connection local.C1.local.home_connection-15646.
1728462102: Bridge local.C1.local.home_connection-15646 sending SUBSCRIBE (Mid: 2, Topic: home-15646/#, QoS: 0, Options: 0x00)
1728462102: Received PUBACK from local.C1.local.home_connection-15646 (Mid: 1, RC:0)
1728462103: Received SUBACK from local.C1.local.home_connection-15646
@Anzal-calixto any update?
Here is the my broker configuration bridge file.
instead of this if give
home/#
the bridge will work fine.also its giving a broken pipe error.