-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
mqtt connect: unqualified mDNS hostnames do not resolve #2695
Comments
Did you try to use the intermediate instead of the root cert? |
I'll try that too. I tried with * too as CA-cert, that should disable cert verification if I read somewhere (no the docs) correctly. No dice.
|
Did you check with a pass that is just simple alphanums? |
Yes, I had a special char in my original password, removed that but didn't change anything. The password is correct, username too. The password is now matching [A-Za-z0-9]. I would hope that wrong username, password or something like that would generate a sensible error. Unknown error -1 is like screaming at denvercoder9. edit³: So both a wrong username and password also generates Unknown error -1. Hmm. edit4: Wrong hostname too generates Unknown error -1. Not easy to figure this out then. |
Maybe something like DNS or firewall? I can confirm that this works without problems for me: |
Thanks for the tip. Its works by entering the IP-address of the server, both IPv4 and IPv6. But not when entering the hostname. Maybe rtl_433 isn't able to choose wisely between IPv4 and IPv6 addresses? I have mosquitto + SSL working in other applications fine, with both IPv4 and IPv6. And rtl_433 works too, if I give the IP-address (IPv4|IPv6) instead of the hostname. |
Interesting! If you can find out where the name resolutions goes wrong then we could likely fix that. |
Name resolution works. And returns the correct ip-addresses. getent "host" returns the IPv6 address. 'host', 'dig' and 'nslookup' all return the correct A and AAAA entries. And HA was able to connect with TLS to the IPv6 address. Using mosquitto_sub I can use the hostname, IPv4 and the IPv6 address. |
I suspect that |
I tried, and failed. It isn't trivial to print a struct from C I think, at least I failed. Please give some example how to do it. |
I guess it rather complicated to look into possibly |
The problem still exists. I walked in there yesterday. The error information is very cryptic and cost me a lot of time and internet research. Any chance to get this fixed for the future? Here is some debug information. What else can I provide?
|
Can you try |
looks fine...
|
Just one plain address. I still think that I would be very helpful to know why this happens. What is different to other system where this doesn't happen? Do you have similar systems where this doesn't happen? Can you find other DNS names that work? |
The debug messages were captured on a Raspberry Pi 1B with Raspberry Pi OS (Debian) and a self-compiled version of rtl_433. I also tested it on my MacBook Pro (M1), same result. Other DNS names that work? Well I tried this one; sure there is no mqtt or open port. Looks fine:
Does -F syslog:homeassistant:1514 work? yes!
|
So we can narrow it down to: there is a non-FQDN that does not resolve in the Mongoose code (some other FQDN does resolve, other code like syslog does resolve). Does qualifying the domain work, e.g. mqtt://homeassistant.localdomain...? |
But one more thing occurred to me: Edit: |
I started to suspect something like this. Either
Is it? I only know about In summary: If we could get to the error code somehow, we should warn about a failed lookup. Then users have chance to make ti work. |
I'm trying to publish to my mosquitto server with a Let's Encrypt signed cert. I have tried almost everything, but always get "MQTT: MQTT connect error: Unknown error -1".
./rtl_433 -C si -M level -f 433919000 -F 'mqtts://server.com:8883,user=harald,pass=redacted,tls_ca_cert=/usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt,tls_server_name=server.com,devices=/clan/house/[/model][/id],events=/clan/house/[/model][/id]' -F log -F json
All my other tools work. I have used rtl433 with -F json, and then piped it to mosquitto_pub, but I only now realize that I'm missing out on the topics then and really need rtl433 to form the message.
Please help
The text was updated successfully, but these errors were encountered: