Skip to content
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

Commissioner discovery over DNS-SD returns no results #12216

Closed
sharadb-amazon opened this issue Nov 24, 2021 · 5 comments
Closed

Commissioner discovery over DNS-SD returns no results #12216

sharadb-amazon opened this issue Nov 24, 2021 · 5 comments
Assignees
Labels
bug Something isn't working examples

Comments

@sharadb-amazon
Copy link
Contributor

sharadb-amazon commented Nov 24, 2021

Problem

  • Expected behavior: tv-casting-app should be able to discover on network commissioners using DNS-SD and list them to the user on startup
  • Actual Behavior: tv-casting-app, does NOT discover any commissioners
  • Steps to reproduce:
  1. Build and run a commissioner that advertises itself over DNS-SD like chip-tv-app
  2. Build and run the chip-tv-casting-app
  3. Note that the console output on the tv-casting-app's side has a line stating: "CHIP:SVR: No commissioner discovered, commissioning must be initiated manually!" like the one below:
$ ./out/host/chip-tv-casting-app
[1637777886.417526][2375:2375] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-2Kct3K)
[1637777886.420274][2375:2375] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1637777886.420446][2375:2375] CHIP:DL: NVS set: chip-counters/reboot-count = 54 (0x36)
[1637777886.424698][2375:2375] CHIP:DL: Failed to get Ethernet interface
[1637777886.425141][2375:2375] CHIP:DL: Failed to reset Ethernet statistic counts
[1637777886.425390][2375:2375] CHIP:DL: Failed to get WiFi interface
[1637777886.425497][2375:2375] CHIP:DL: Failed to reset WiFi statistic counts
[1637777886.439353][2375:2375] CHIP:DIS: Attempt to mDNS broadcast failed:  ../../third_party/connectedhomeip/src/inet/UDPEndPoint.cpp:1044: OS Error 0x02000065: Network is unreachable
[1637777891.442438][2375:2375] CHIP:SVR: No commissioner discovered, commissioning must be initiated manually!
...
...

A similar issue is observed when using the "chip-tool discover commissioners" command.

Proposed Solution

TBD?

NOTE: This issue started happening after the following commit was made: 7c47bed

@sharadb-amazon
Copy link
Contributor Author

sharadb-amazon commented Nov 24, 2021

Also note, in the test above, I ran the chip-tv-app and the chip-tv-casting-app on the same Docker (Ubuntu) instance, in case that is relevant.

@andy31415
Copy link
Contributor

Maybe fixed in #12161 if the error is apps listening on 5353 and conflicting.

When you see the failure, could you run a netstat -a -n -p | grep 5353 and see how many things are listening on that port? Generally there should be only one but my guess is you have several.

@andy31415
Copy link
Contributor

Likely running chip-tv-app and chip-tv-casting-app is the cause (both run on 5353 and conflict). You could use network namespaces to run separate networks for each and then your tests may pass (currently test_suites.sh does this for linux test runs).

@cecille
Copy link
Contributor

cecille commented Nov 24, 2021

I suspect this is related to #11635. Can you confirm

  • which mdns implementation is being used (platform or minimal) on both the commissioner and the app?
  • what os you're using to run these (both on linux, both on mac, separate devices etc.)
  • whether you're running another mdns instance alongside these (avahi, bonjour etc.)

I agree with Andrei - the PR he linked may be the answer here. Another option is to force both to use the platform mdns implementation (chip_mdns="platform")

@sharadb-amazon
Copy link
Contributor Author

#12161 fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working examples
Projects
None yet
Development

No branches or pull requests

5 participants