eclipse-mosquitto / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
9.1k stars 2.4k forks source link

Unable to bridge mosquitto broker to Thingspeak #1064

Open alvisslap opened 5 years ago

alvisslap commented 5 years ago

HI everyone, I am having a problem when I try to create a bridge between my Mosquitto broker (I'm using v1.4.15 and running it with command line on Windows 10) and Thingspeak. Here is my mosquitto.conf file looks like: connection thingspeak address mqtt.thingspeak.com:1883 topic # out 0 remote/thingspeak/channels

bridge_protocol_version mqttv311

bridge_insecure false notifications false cleansession true log_type all

And this is the error when I try to run my broker with configuration file: 1 Can anyone tell me what I have done wrong and how can I fix it ?

ralight commented 5 years ago

Is there any chance you could try version 1.5.4? There have been a few fixes around bridges.

alvisslap commented 5 years ago

Its still the same error I get when I try to use the version 1.5.4, I also install Win32 OpenSSL v1.1.0j Light to use with the broker but nothing help ? Is there any other way you recommend me to do thank you .

alvisslap commented 5 years ago

3 Same error I have with version 1.5.4

alvisslap commented 5 years ago

Hi, I have tried it also but I still get the same error.

Vào Th 2, 3 thg 12, 2018 vào lúc 01:04 Roger Light < notifications@github.com> đã viết:

Is there any chance you could try version 1.5.4? There have been a few fixes around bridges.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/mosquitto/issues/1064#issuecomment-443550980, or mute the thread https://github.com/notifications/unsubscribe-auth/Arb1PDuUxT1EuezNK-VuQRD1IoCfe59oks5u1Fx-gaJpZM4Y9pR0 .

ralight commented 5 years ago

I've an idea of the problem and am trying to come up with the best solution.

neilgallagher commented 5 years ago

Hi, I was wondering if there was any progress on this as I am having the same problem . If I run bridge and broker on the same machine then it works. I can also use mosquitto_pub to publish messages to the broker so its not a firewall issue. Thanks

karlp commented 5 years ago

try private == false? attempt unsubscribe == false? notifications local only or off? those are the three things I normally need to check when bridging to cloud services, that I don't see in the sample configs suggested there.

alvisslap commented 5 years ago

I keep the same configuration file and use the mosquitto v1.4.14 and it works. When I run the bridge connection there's a pop up from window defender asking me to shut it down while I run mosquitto, so I think with the latest version of the mosquitto firewall maybe the issue.

neilgallagher commented 5 years ago

Hi, Just wanted to check if there was any update on this issue? Its nothing to do with try_private. It works with a previous version of mosquitto so its a bug that was introduced at some point before 1.5.4. Thanks

ralight commented 5 years ago

@neilgallagher What does your config (with passwords replaced) look like? What platform are you running on?

neilgallagher commented 5 years ago

Hi. Config below. Running on Windows 10. Same config works on version 1.48

Thanks

port 1884 persistence true persistence_file mosquitto_bridge.db persistence_location c:/mosquitto/ autosave_interval 600 connection bridge-01 address 127.0.0.1:1883 cleansession false max_queued_messages 1000 remote_username ###### remote_password ###### topic mac/+/event/+ out 1 topic mac/+/prop/ out 1 topic mac/+/ping out 1 topic mac/+/cmd/ in 1 log_type all log_timestamp true log_dest stderr try_private false

ralight commented 5 years ago

Thanks, it seems like it might be a Windows related issue then, I'll have a closer look.

remyderuysscher commented 5 years ago

I have the same problems with the docker container running 1.5 (latest) with cloudmqtt bridge. Working with 1.4.12 not working with 1.5 (any version). So it's not Windows related.

rajender-rrv commented 5 years ago

Even I have the same problem in Ubuntu16.04 and using mosquitto version 1.5.8

mosquitto.confg file

connection bridge-1 address test.mosquitto.org:1883 cleansession true topic data/flow both 1 bridge_protocol_version mqttv311

cah-sachin commented 5 years ago

I have the same problem. I am using Mosquitto 1.5.8 and trying to bridge with AWS broker. This was working in earlier version of mosquitto now it is giving following error when i try to connect to aws iot broker ,

1554071117: Socket error on client local.WL.bridge-to-aws, disconnecting.

Anyone ?

flyfire-cn commented 8 months ago

bridge_protocol_version mqttv311

image Some servers require strict judgment of the protocol version Now view through the packet capture tool when used in the bridge configuration bridge_protocol_version mqttv311 mosquitto failed to send a normal protocol byte 0x84 is now sent

server-supported mqttv31=3 mqttv311=4 mqttv50=5

Hope to repair soon.

karlp commented 8 months ago

@flyfire-cn if you're seeing the high bit set, that's "try_private" defaulting to true. make sure it's set to false. (Other users higher in this thread had that explicitly set to false, so your issue is likely unrelated)

flyfire-cn commented 8 months ago

@flyfire-cn if you're seeing the high bit set, that's "try_private" defaulting to true. make sure it's set to false. (Other users higher in this thread had that explicitly set to false, so your issue is likely unrelated)

@karlp Thank you very much. Your reply has solved my problem.