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

Bridge dropping connection #2107

Open
Rod-O opened this issue Mar 2, 2021 · 15 comments
Open

Bridge dropping connection #2107

Rod-O opened this issue Mar 2, 2021 · 15 comments

Comments

@Rod-O
Copy link

Rod-O commented Mar 2, 2021

on RPi client it restores if I restart the service, but after 7 hours I have in the logs:
Client local.XXXXXX closed its connection.
Connecting bridge XXXXX (XX.XX.XX:XXX)

on Server:
Bad socket read/write on client

@Rod-O
Copy link
Author

Rod-O commented Mar 2, 2021

I noticed this happens only with the bridge from RPi to a x64 server, I have other x64 bridges working without issues.

@ralight
Copy link
Contributor

ralight commented Mar 11, 2021

It's a bit difficult to say anything meaningful without more details I'm afraid. Could it have been a temporary network problem? Does it happen repeatedly? Always after 7 hours? :)

@Rod-O
Copy link
Author

Rod-O commented Mar 11, 2021

I know.
I've been trying to catch the error, and just yesterday I was able to reproduce,
the main server went offline because it restarted,
so the instance that bridges to this main server, wasn't able to recover because of this socket error.

@Rod-O
Copy link
Author

Rod-O commented Mar 11, 2021

Happened again, seems that the bridge is not able to recover specially when SSL is involved

@ralight
Copy link
Contributor

ralight commented Mar 11, 2021

That's useful information, thank you.

I have fixed a bridge connection related problem in 2.0.9 which could be related. Which version are you using? The packages for 2.0.9 are available as of right now if you'd like to try them. I'll try with my Pi to see if I can reproduce it.

@Rod-O
Copy link
Author

Rod-O commented Mar 12, 2021

I'm on fixes branch,
I just updated yesterday, I'll keep you posted if I see this happening again.

@Rod-O
Copy link
Author

Rod-O commented Mar 14, 2021

It happened again, after connection is lost, the bridge is unable to recover.

@ralight
Copy link
Contributor

ralight commented Mar 14, 2021

I haven't been able to reproduce this yet on my pi4 - I've been trying to simulate the connection closing to no avail. Are there any configuration / compile time options that you used that you could share?

@rgaufman
Copy link

Bridge connection is being lost for us on 2.0.9 on Raspberry Pi and X86_64 units, especially after reboot it fails to establish the connection for some reason.

It seems manually restarting Mosquitto helps, but the permanent solution for us was to downgrade to 2.0.5 which fixed the problem.

@Rod-O
Copy link
Author

Rod-O commented Apr 10, 2021

If I restart the Pi, I get the issue, if I restart the service, it connects fine.

@fti7
Copy link

fti7 commented Apr 17, 2022

Same here, Raspberry Pi Zero with Bridge Config -> X86_64 Broker
Mosquitto 2.0.5 fixes this issue

@Rod-O
Copy link
Author

Rod-O commented Apr 18, 2022

then let's close this

@Rod-O Rod-O closed this as completed Apr 18, 2022
@fti7
Copy link

fti7 commented Apr 18, 2022

@Rod-O Im sorry for my word choice. Its not really fixed. 2.0.5 is an downgrade, where the bug doesnt occur. Please Reopen :D

@Rod-O Rod-O reopened this Apr 18, 2022
@cameo69
Copy link

cameo69 commented May 13, 2023

Hi all, is there any progress on this? I have a similar issue, albeit no RaspberryPi is involved. The bridge in question is from one docker to another, both running on X86_64.

Mosquitto A <-- Mosquitto B

Config on A is like this:

connection bridge-KS-broker1
address 192.168.3.103:1883
topic # in 0 ks/ ""
cleansession false
remote_username bridge
remote_password ***
start_type automatic
restart_timeout 5 30

Restarting A is not a problem, but if for whatever reason B went down or even if the container B is restarted due to an update, bridging is dead.
Restarting A re-establishes the bridge.

@rgaufman
Copy link

Unfortunately this happens for me on 2.0.15 but 2.0.14 works correctly. Have you tried 2.0.14?

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

No branches or pull requests

5 participants