-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
libmosquitto: Long delay in mosquitto_connect() on Arm64 #2955
Comments
Okay it looks like the issue is in net__try_connect_tcp() mosquitto_connect() mosquitto_connect_bind() mosquitto_connect_bind_v5() mosquitto__reconnect() net__socket_connect() net__try_connect() net__try_connect_tcp() getaddrinfo() is returning the following addresses for test.mosquitto.org
0.0.0.0 is passed to connect() first and takes up all the time. On my x86_64 desktop the same addresses are returned but in the opposite order, so the problem is not seen. |
so what's giving you the 0.0.0.0 response? that's obviously garbage... (andentirely within yourown resolver setup...) |
Both addresses are appearing on Mobian Bookworm and Ubuntu 23.04 at my home. It looks to me like getaddrinfo() is including 0.0.0.0 when it shouldn't. The below zipped patch prints all returned addresses, give it a try if you have time: |
Okay, the 0.0.0.0 values are what you get if you pass IPV6 addresses to inet_ntoa(). Using inet_ntop() I get the following: I cannot ping that IPv6 address from home, work or this site: https://www.ipvoid.com/ipv6-ping-test Can you look into that please? |
sounds like your system believes it can do v6, but it actually can't? That site works for me to ping "test.mosquitto.org"
Note that your resolver is giving you this invalid " ::2001:41d0:1:925e:0:0" not the actual AAAA response tooo...
|
It looks like the returned addresses are correct and were simply being formatted incorrectly. If I had known an IPv6 address was being used then this ticket would probably not have been opened. |
Hi,
I am working on a PinePhone app which uses libmosquitto.
It works fine on my x86_64 development machine.
Running on the phone (mobian/bookworm) it waits in mosquitto_connect() for ~129s before opening the TCP connection.
This issue also seems to be present in the latest mosquitto git:
It works with a 3 minute keepalive:
The text was updated successfully, but these errors were encountered: