-
Notifications
You must be signed in to change notification settings - Fork 22
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
Discovery seems to take two or more tries to work #2
Comments
@mobileoverlord @tmecklem Do either you have anything to add? I'm trying to capture the conversation on July 12th regarding this issue since others are seeing it as well. |
That captures it pretty well. I'm willing to do more investigation or capture logs if needed. I'm working with this (and experiencing it) quite a bit now. |
Believe it or not, I'm not sure that I'm seeing it on Linux. Either that or I'm getting really lucky. |
I'm wondering if you guys can capture the IP address of the node when it's not working and when it is working. There's a TTL setting for the IP registration, I'm wondering if there may be a cache issue from previous deployment attempts. I'm on Linux as well and will start investigating. The "one" test for the mDNS library "should" fail if this was an issue, but that does run locally, so maybe certain routers are at fault. |
@tmecklem could you run the |
I've updated the tests to be a bit more thorough |
|
Ok, to run mDNS locally on OSX you need to kill the default mDNS server running locally.
|
The test will probably still not work, as the address function is returning your ipv6 address, and I specifically look for the ipv4. Will try to fix. |
Address function in the test is updated to return ipv4 addresses |
I'm one of the others seeing something similar, except I haven't been able to contact the device at all. This in Linux (Ubuntu 16.10). Here's my
|
Odd that a hostname lookup would fail in .005 seconds. The mDNS server doesn't even log the event on my test for .1 seconds.
|
Can you modify your test to not include the |
There's also this bug for 16.10, https://askubuntu.com/questions/837982/how-to-configure-local-dns-lookup-in-ubuntu-16-10#838395 Oh mDNS, the ugly duckling of the network world, so much promise... |
Yes, I was wondering if it was an issue with my environment. Here's the modified test:
|
Ok, same issue. Are you able to ping any other local machines on your network? |
Update: I tried reinstalling libnss-resolve ( |
|
excellent, thank you for testing this. hopefully that resolves your network deployment tests as well. I always run an LTS version of Ubuntu, for the record. |
Yeah, sticking with LTS is probably the smarter thing to do :). Unfortunately still unable to contact the device. |
can you run are you sure the device is on the network? Is this rpi0w? |
It's a BeagleBone black, running a port of "gadget mode" from the rpi0. So it's supposed to set up a connection over the USB interface. I'm unable to ping the BBB from linux. Interestingly, I tried the same device with my mac at home, and it worked. The first ping packet always times out, but after that it's good. So the issue on linux might be unrelated. |
@aadavids Hmm... Could you try a couple things on Linux? First, could you check that the virtual Ethernet interface that shows up on Linux is getting assigned a link local IP address? For example, run |
Sorry, I won't have that much time to test things until Monday, but here's the network config:
So it looks like it's getting an ipv6 address? |
Hmm, if the virtual interface is only getting an ipv6 address, that could be an issue. I haven't tested mDNS with ipv6 and I'm pretty sure the rpi0 firmware only uses ipv4 as well. |
I had thought that IPv4 link local addresses would be assigned by default unless they were explicitly disabled. It may be that the system is waiting for DHCP to time out before assigning an address? Also, regarding rpi0 firmware only using ipv4, that's sadly correct. For some reason I had thought that it just wasn't used. Not that it will change much since applications need to support it, but I'll start moving it into the systems: nerves-project/nerves_system_rpi0#19. |
I captured some of the traffic on the virtual Ethernet interface and I can see MDNS packets. I also tried to ping the device a couple times while wireshark was running. mdns.pcapng.tar.gz So then I guess the issue seems to be that the virtual Ethernet interface is getting an ipv6 address? |
Update: Since we switched away from using IPv4 link-local addressing on USB gadget Ethernet with the official Nerves systems, mDNS has been work very well. If anyone else runs into this and is running Nerves, definitely verify that you're not using link-local addresses on the connection. |
This results in a timeout the first time that you try to contact the device running the
mdns
library. The second or third time seem to be ok.The text was updated successfully, but these errors were encountered: