-
Notifications
You must be signed in to change notification settings - Fork 450
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
[Bug] Can't Connect to mqtt broker with IPv6 LLA #1536
Comments
Hi, @shoe-perinet-io I'm sorry for not getting back to you sooner. MQTTX should indeed support connections via IPv6. Could you connect directly using the IPv6 address to troubleshoot your issue further? This might help determine whether the problem lies with the mDNS resolution process or the MQTTX client's handling of IPv6 addresses. Your feedback on this will be critical in identifying and resolving the issue. Thank you for bringing this to our attention. |
Hi @ysfscream , I assume the problem is not in the mDNS resolve process, since my system resolver logs a successful resolved name (resolvectl monitor). This tells me, (1) MQTTX is using the system resolver and (2) MQTTX fails to handle the received IPv6 LLA:
I also tested the resolver:
as well as have verified the glibc resolver is working:
I observed, MQTTX is more chatty when it detects not a terminal at the stdout
I tried to feed unsuccessfully MQTTX the plain IPv6 address, but unfortunately it treated it as a name and tried to resolve the IPv6LLA :
I made the extra effort and tried an IPv4 proxy, which made your not IPv6 compliant MQTTX client connect. So there is no issue with the broker, so far.:
[1] https://labs.ripe.net/author/philip_homburg/whats-the-deal-with-ipv6-link-local-addresses/ |
Thank you for your detailed information and efforts in diagnosing the issue. The We will take a closer look into this issue. Your input has been very helpful in pinpointing the potential areas of concern. We appreciate your patience and help in resolving this situation. |
Yes, it does indeed. But please be advised, it only occurred when I was using the IPv6LLA as server destination in the configuration of the MQTT-Broker connection. It did not occurr when I used the fqdn 'mqtt-perimica-hw3kg.local'. Also, the name of the configuration was, unfortunately, called 'mqtt-perimica-hw3kg.local'. I guess this is misleading. But the actual target can be found with the
I strongly think your Client handles the information from the resolver wrongly. It seems not to use the proper API to cover also IPv6 LLA addresses resolved by the system-resolver. Be advised, the same behaviour can also be observed with Chromium or NodeJS. |
What did I do
Try to connect the MQTTX client to a local MQTT broker. The MQTT broker is resolved via mDNS. It is resolved to an IPv6 LLA, link local address.
server name: mqtt-perimica-hw3kg.local
server IP address: fe80::a:ed8a:9f66:8007
What happened
After resolving via mDNS to a IPv6 LLA, The MQTTX client is unable to connect. It reports retrying. The resolved monitor shows repeatedly occurring name resolution requests.
Expected
Connect to the MQTT-Broker.
Environment
More detail
→ Q: mqtt-perimica-hw3kg.local IN A
→ Q: mqtt-perimica-hw3kg.local IN AAAA
← S: success
← A: mqtt-perimica-hw3kg.local IN AAAA fe80::a:ed8a:9f66:8007
The text was updated successfully, but these errors were encountered: