-
Notifications
You must be signed in to change notification settings - Fork 13.3k
DNS lookup problem #8780
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
Comments
Why do you think of cache first? You sure networking works at all? DNS servers are printable Serial.println(WiFi.dnsIP(0));
Serial.println(WiFi.dnsIP(1));
Serial.println(WiFi.dnsIP(2)); Same for our own IP, netmask and gateway
I'd expect to see something different when it works and when it doesn't |
I'm pretty sure the network starts working fine after I connect the router to modem. I actually did not thing at DNS cache at first, and I also printed the DNS IP as suggested, but when using dhcp the dns usually is the gateway address. So, the IP didn't change when have or not data connection. If I turn on the ESP with everything Ok (wifi + data), it solves the IP and print. After removing the conection from router to modem, it continuous printing the IP for a while because of DNS cache (not exactly same time every test), and only after some minutes it begins to show error. It looks like that when it tries to solve the IP and is not successfull, the device never again tries to actually solve the IP and only returns the error from some kind of cache. |
True, DNS client stores the record based on TTL. My question was - is device actually connected, does anything but DNS work? Error code -5 means IN_PROGRESS, our code just times out the request (edit ...and we should probably replace it with TIMEOUT, since it is what happens) |
Network protocol activity can be traced or debugged with included netdump facility |
@brunoudi a DNS fix was merged. |
Edit2: I can confirm it works now that I fixed my non responding IPv4 DNS... (thank you PS5 for not having smart dns solving skills and giving me a second reason to consider something actually being wrong with network) I seem to have the same issue. My device gets ip 192.168.68.XX Frustrating =) I tried the both git master and latest stable release with same issue EDIT: I just found out that my issue seems to be that I f*cked up ipv4 configuration on my first router and no DNS for ipV4 was set properly and google nest dns failed for IPV4. and all my other devices seem to somehow managed to use IPV6 dns to resolve IPv4 |
Can we close this issue ? |
I’m not the original reporting user and don’t know if you have any rules when to close etc, as I found a valid cause to my issue and original reporting user has not replied within a year, I would feel encouraged to close this one :) |
Basic Infos
Platform
Settings in IDE
Problem Description
I have a separate router and modem.
After temporary data loss (modem disconnected, internet reconnection, etc), without WiFi connection loss ESP DNS cant solve any IP addresses.
I have enabled the DEBUG level to WIFI.
Sketch
Turn on the router WITHOUT DATA (modem connection), and start the ESP.
The output, as expected, is this:
But after data reestablishing (connecting the router to the modem), ESP still cannot resolve the IP address.
I know there is a DNS cache (I don't know exactly how long it lasts), but I left it running for 24 hours and the output remained the same.
I tried some actions, like reconnecting to WiFi, but is only solves if I restart the device.
The text was updated successfully, but these errors were encountered: