-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Network Ports disappearing #5588
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
@sundeepgoel72 you ignored the issue template. Which core version? What is yourr platform? What is the MCVE sketch to reproduce? Etc. CC @LaborEtArs . |
apologies for missing, its my first post here. Have updated the issue based on template |
The request is for an MCVE sketch, where M means Minimal. Could you please reduce? e.g.: remove thingspeak, sensors, etc and provide as small a sketch as possible that shows your probe issue. What happens if you remove that delay(50) in the loop for all devices? Side note: your timing calc millis() > nextTx won't work as expected on rollover. I suggest using the periodic polledTimeout instead. There are examples and device tests you can check out for usage. |
Hi, updated issue with Minimal sketch, Same issue persists. Serial output |
When using the mDNSResponder you should add MDNS::update() in the loop. |
@LaborEtArs the ArduinoOTA.handle() call internally calls MDNS.update(). |
From the MCVE: ArduinoOTA.setHostname("myesp8266Roaming2"); Are all ESPs setting the same hostname? |
No, all have different hostnames. |
The race conditions are detected, when some other network member queries for our domain name, while we're not yet done with probing for this name. In your case, this might be a 'old' user of your device asking for the IP address (or someone who tries to update a DNS cache), while the device is restarting (an the mDNS responder is probing for the hostname). However, this shouldn't lead to a problem, IF the tiebrake is successfully handled. |
I have the same problem on win 10. Bonjour browser shows all my esp devices Devices appear frequently when I use "compile" button This is very annoying, considering the time devoted to compilation. |
While waiting for new mDNS to be debugged, you can start arduino OTA by hand:
|
Yeah same problem. I can take the esp8266-id.local address from Bonjour Browser and use that with espota.py and I can upload thru net. Edit: I slept thru the night and waking up, it does now show up on arduino ide too. Just had computer on sleep mode, so no rebooting. Edit2: disappeared from Arduino Ide again as I tried a new chip. However vMicro shows it and works with Visual Studio just as expected. I'm thinking it's a problem with Arduino IDE and not the esp8266 core? |
If the problem exists with v2.4.x core as well as with the v2.5.x core, the reason can‘t be the new mDNS responder, as it was introduced with 2.5 only. At least it can’t be the only reason... |
I may (or may not!) be be suffering the same issue. I'm using both the Arduino IDE (at times, when I'm lazy) and PlatformIO. The Arduino IDE is using 2.5.0 beta2, and PlatformIO is still using core 2_4_2. I've noticed of late only one or occasionally two/three mDNS discovery devices are showing up on the Arduino IDE, although that hasn't really bothered me, as it was just one more reason to be using PlatformIO as it is seeing them all fine! :-/ I found out at one point that disabling and re-enabling my ethernet connection seemed to wake the Arduino IDE up (sometimes, but doesn't seem to of late). This is when both PlatformIO and zeroconf browser (as I found bonjourBrowser a bit buggy at times) could see all the devices just fine. A side note - I noticed that the three devices not visible to the Arduino IDE have 'board' set to PLATFORMIO_OAK rather than ESP8266_OAK... related? Relevant? |
There was a relevant fix to mdns merged recently. Please retest with latest git. |
which is the right library to use? presume this means the issue was / is in the mdns library as opposed to the IDE itself ... |
As the issue appeared when using core v2.4.x as well as when using core 2.5.0, it might not have been (completely) solved by the update of core 2.5.0 ... |
I have 2.5.0-beta2 installed. The IDE is not giving an upgrade option, am i at the right version ? |
I take it you found the update option in the board manager then (as I was about to reply to your 'how to upgrade question' which you've since edited ;) )? The latest 'released' version is 2.5.0-beta2, but changes have been released since then, you need to consider installing the bleeding edge git version (install instructions here). |
2.5.0-beta1 had a complete MDNS responder rewrite. There have been recent fixes to mdns merged after beta2 that could be relevant. Please retest with latest git, installation instructions are on readthedocs. Or you can wait until beta3. |
I'm still not convinced recent changes to MDNS are the culprit here... after all, if other browsers such as PlatformIO and zeroconfbrowser can see the devices, then isn't MDNS working fine? There are at least two relevant issues open on the Arduino github issue tracker - 6695 - which suggests that if there are any issues on their end - it is coming from updating the But more relevantly to this issue... I'll just leave some screenshots to so some inconsistent behaviour based on IDE version and opening of the ports menu... I have one device that is running ArduinoOTA - first built against 2.5.0beta2 whilst on windows, and then against current git version of the ESP8266 core when on linux. Windows 10, Arduino IDE 1.8.8, ESP8266 v2.5.0 beta2, first open of ports menu Windows 10, Arduino IDE 1.8.8, ESP8266 v2.5.0 beta2, second of ports menu (haven't closed the IDE, or changed ANYTHING else) Ok.... so lets try on v1.8.1 as there was mention that v1.8.1 was pre some updates to the jmdns and discovery was working better. Windows 10, Arduino IDE 1.8.1, ESP8266 v2.5.0 beta2, first open of ports menu (no change on subsequent opens of menu). Whilst PlatformIO the whole time was showing... guess what... all four (actually five, but ignore Oak2 - it just work up from deepsleep in time to make an appearance for the screenshot). So what about against the latest git version, and throw linux into the mix to see if it's OS specific... Ubuntu 18.10, Arduino IDE 1.8.8, ESP8266 git version, first open of ports menu Ubuntu 18.10, Arduino IDE 1.8.8, ESP8266 git version, second open of ports menu That's it... I give up on mDNS working properly with the Arduino IDE unless they've fixed it in the beta version! |
Woohoo! 1.9.0 beta of the Arduino IDE seems to have some... issues with duplication of entries, but at least mDNS discovery seems rock solid so far in my brief 5 minutes of attempting to break it... all devices are being discovered, consistently, and upload was working just fine. This is again against 2.5.0 beta2 as that's what my Windows 10 environment is currently on. |
@pfeerick I have Win and Ubuntu systems and my main Windows machine has always struggled with port discovery. After a reboot it works for a while but no for long. I switched to http OTA updates rather than local OTA updates. Will check out 1.9.0 beta though before I discard local OTA altogether. |
@pieman64 Yeah, I've found over the years that linux is much more stable with networking stuff. On the OTA/mDNS front, the mDNS discovery that PlatformIO seems to be stable and working on Windows, hence why I point the finger at the Arduino IDE. Especially since it's mDNS discovery is just as bad on linux (well, almost as bad... sometimes the full list sticks around, or starts to reappear after a few minutes), whilst platformio is working just fine there also - and has a refresh button!! |
Latest changes looks very promising, |
looks like "disappearing network ports" problem back, when sdk was revert from pre-3.0 to 2.2.1 :( I recompile and upload the same espurna project to 2 from my 5 devices |
sdk-pre-3 is still available in tool menu, available when using Generic esp8266 board. |
Ive just had the same problem as the OP. Im pretty sure its #include <ESP8266WiFiMulti.h> thats the problem. |
For a long time OTA worked on my devices(espurna project) properly if I compiled on sdk pre-3. I decided to go back in this repository before commit f9009b8 I think that the disappearing port for OTA can cause something in mDNS |
I will check, of course... |
so, this is not this line, something else must cause this problem, I introduced your suggestion on Thursday (yesterday I did not have the opportunity to check the effects) |
all devices are still visible for OTA if the project is compiled before making mDNS changes (f9009b8) |
@reaper7 |
@d-a-v - it looks like the udp fix has solved the problem |
Several comments say this is resolved, and a whole lot of critical fixes have been merged since this was opened. Closing. |
Platform
Settings in IDE
Problem Description
I have multiple esp modules with OTA configured, all network ports are appearing fine on the bonjour browser. However, on the IDE on startup, all network ports appear but soon except one or two, all others disappear. These is no pattern to the ones which remains, it appears to be random.
Seems to be an IDE / mDNS issue rather than code / sketch related.
MCVE Sketch
Debug Messages
Serial output on startup ---------------------
[MDNSResponder] _parseQuery: Possible race-condition for host domain detected while probing.
[MDNSResponder] _parseQuery: Possible race-condition for service domain myesp8266Roaming.arduino.tcp detected while probing.
[MDNSResponder] _parseQuery: Possible race-condition for host domain detected while probing.
[MDNSResponder] _parseQuery: Possible race-condition for service domain myesp8266Roaming.arduino.tcp detected while probing.
The text was updated successfully, but these errors were encountered: