Three or more years ago, I made an Arduino project for a NodeMCU (ESP8266) that connected to my MQTT server. I needed to make some changes to the code (unrelated), rebuilt, and was unable to connect to my MQTT server!
After doing some research/debugging, I found that the issue is that the latest board library (2.7.4) is apparently only doing mDNS lookups and not falling back to [or just using] DNS like it used to! It's not failing either - its returning other, random IP addresses (usually a random computer on the same subnet) so I can't trap for the issue. As a result, when I try to connect to my host "mqtt.local", it is unable to get the correct IP address and fails to connect.
I've been able to work around the issue by adding another DNS entry for just "mqtt" (dropped ".local") and connect that way but it is less then ideal. Is there any way to disable mDNS or manually do a DNS lookup for a .local address? (tried setting LWIP_DNS_SUPPORT_MDNS_QUERIES to 0 but that didn't help)
For what its worth, I do have a mDNS proxy running (since Apple has the same issue with .local hostnames). I can get the correct IP on my Mac using the mDNS proxy so even with mDNS, I should be able to resolve the address!