Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to bridge mosquitto broker to Thingspeak #1064

Open
alvisslap opened this issue Dec 2, 2018 · 18 comments
Open

Unable to bridge mosquitto broker to Thingspeak #1064

alvisslap opened this issue Dec 2, 2018 · 18 comments

Comments

@alvisslap
Copy link

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
Copy link
Contributor

ralight commented Dec 2, 2018

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

@alvisslap
Copy link
Author

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
Copy link
Author

3
Same error I have with version 1.5.4

@alvisslap
Copy link
Author

alvisslap commented Dec 2, 2018 via email

@ralight
Copy link
Contributor

ralight commented Dec 4, 2018

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

@neilgallagher
Copy link

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
Copy link
Contributor

karlp commented Dec 25, 2018

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
Copy link
Author

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
Copy link

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
Copy link
Contributor

ralight commented Feb 13, 2019

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

@neilgallagher
Copy link

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
Copy link
Contributor

ralight commented Feb 14, 2019

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

@remyderuysscher
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link
Contributor

karlp commented Mar 8, 2024

@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
Copy link

flyfire-cn commented Mar 8, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants