Comments (15)
from mdns-sd.
Yes. Here is a a log. The Debian Guest vm publishing a _foo._tcp
service, the log taken on the Windows Host system.
from mdns-sd.
I tried this with a Raspberry Pi running Linux and then a Windows 11 machine. With the example query program I was not able to reproduce the issue. (i.e. it worked)
C:\Users\keeps\work\mdns-sd (main)> cargo run --example query _http._tcp
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `target\debug\examples\query.exe _http._tcp`
At 452.3µs : Received other event: SearchStarted("_http._tcp.local. on addrs [192.168.0.112]")
At 330.4719ms : Received other event: ServiceFound("_http._tcp.local.", "mdns-bug2._http._tcp.local.")
At 330.9278ms: Resolved a new service: mdns-bug2._http._tcp.local. IP: {192.168.0.109} TXT properties: TxtProperties { properties: [TxtProperty {key: "path", val: Some("/")}] }
Could you please try to run the example query on Windows and see if it can find the service? If not, is it possible to add a simple logger to capture the debug log?
Not sure what's happening, but it's probably related to ordering of received packets? Or maybe ordering of records in a packet?
There was an issue with the ordering of records in a packet before. Now it should be fine as we always check for PTR record first. There is one case when the records are separated into multiple packets and PTR comes in the later packets, we might have issue there. (btw, I'm looking into refactoring this part of code, so very interested in learning possible issues in its current form).
from mdns-sd.
from mdns-sd.
Ok! Running the example query on windows shows the same thing.
Does not see services published from within the vm,
but does see service published on the local net.
The Linux the vm sees services published on the local net.
Other devices on the local net see the things published by the vm.
So the only failure is with with windows host and the linux guest.
On vmware. I don't remember this happening with openbox. But then I always used openbox wired.
Next I need to see if using a wired connection makes any difference.
-Dale
from mdns-sd.
query.txt
foo-query.zip
Attached is the example query console output and a zipped wireshark packet capture of the service being removed and then added.
It looks to me like the packet trace has the right stuff in it, but maybe there is something I'm missing...
from mdns-sd.
Thank you a lot for reproducing the issue and the captures. I didn't find obvious culprit yet. Will need to bring up a similar setup to try it out.
When I have the same window machine in the office, it's wired into Ethernet, and then it does see the avahi-publish from the Linux vm.
In this success case, is the vm network iface also in bridged mode, or not?
from mdns-sd.
from mdns-sd.
I tried in a setup of Windows 11 (WiFi home network) and VMware player Debian 11.6 stable, with bridged network iface. But was not able to reproduce the issue. I plan to add a logger for example code so that it's easier to capture debug logs.
cargo r --example query _http._tcp
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `target\debug\examples\query.exe _http._tcp`
At 410.7µs : Received other event: SearchStarted("_http._tcp.local. on addrs [192.168.70.1, 192.168.0.112, 192.168.138.1]")
At 48.877ms : Received other event: ServiceFound("_http._tcp.local.", "Service._http._tcp.local.")
At 49.1775ms: Resolved a new service: Service._http._tcp.local. host: debian-116.local. port: 8080 IP: {192.168.70.128} TXT properties: TxtProperties { properties: [TxtProperty {key: "path", val: Some("/")}] }
Btw, I was wondering if it's related to the fact you had another network (10.x.x.x) in query.txt
. Will look into that part...
>cargo run --example query _foo._tcp
Finished dev [unoptimized + debuginfo] target(s) in 0.08s
Running `target\debug\examples\query.exe _foo._tcp`
At 201.7µs : Received other event: SearchStarted("_foo._tcp.local. on addrs [192.168.1.245, 10.255.254.20, 192.168.244.1, 192.168.229.1]")
At 1.0052215s : Received other event: SearchStarted("_foo._tcp.local. on addrs [192.168.1.245, 10.255.254.20, 192.168.244.1, 192.168.229.1]")
At 3.0212461s : Received other event: SearchStarted("_foo._tcp.local. on addrs [192.168.1.245, 10.255.254.20, 192.168.244.1, 192.168.229.1]")
At 7.034332s : Received other event: SearchStarted("_foo._tcp.local. on addrs [192.168.1.245, 10.255.254.20, 192.168.244.1, 192.168.229.1]")
At 15.0611615s : Received other event: SearchStarted("_foo._tcp.local. on addrs [192.168.1.245, 10.255.254.20, 192.168.244.1, 192.168.229.1]")
At 31.0706769s : Received other event: SearchStarted("_foo._tcp.local. on addrs [192.168.1.245, 10.255.254.20, 192.168.244.1, 192.168.229.1]")
error: process didn't exit successfully: `target\debug\examples\query.exe _foo._tcp` (exit code: 0xc000013a, STATUS_CONTROL_C_EXIT)
from mdns-sd.
from mdns-sd.
I created a PR to add logging in the examples. Is it possible to run the query example with this logging support in your home network to reproduce the issue and collect the debug logs? (Or to find out what debug logs are missing?)
from mdns-sd.
It is odd that there are not PTR or SRV, TXT records received, but only an Address record received:
[2023-04-26T23:58:54Z DEBUG mdns_sd::dns_parser] read_header: id 0, 0 questions 1 answers 0 authorities 0 additionals
[2023-04-26T23:58:54Z DEBUG mdns_sd::dns_parser] read_questions: 0
[2023-04-26T23:58:54Z DEBUG mdns_sd::dns_parser] read_others: 1
[2023-04-26T23:58:54Z DEBUG mdns_sd::dns_parser] DnsAddress { record: DnsRecord { entry: DnsEntry { name: "192-168-1-103.local.", ty: 1, class: 1, unique: true }, ttl: 3600, created: 1682553534969, refresh: 1682556414969 }, address: 192.168.1.103 }
Is this address 192.168.1.103
belonging to the published service on Linux?
from mdns-sd.
from mdns-sd.
Closing
from mdns-sd.
It's a curious case. Thanks for spending time on this. If possible, we could try a couple of things (with the wi-fi error case):
-
wireshark: the previous wireshark capture seems to be on the VM? as the source IPv4 is
192.168.1.166
only. What if we do the capture on Windows side as well? and compare the difference from the VM capture? -
Instead of
avahi-publish
, what if we run mdns-sd in vm to publish?RUST_LOG=debug cargo r --example register _foo._tcp.local. Service
on the VM? and compare the debug log from Windows side?
For the firewall, I'm not an expert, and couldn't yet think of particular settings that would cause such behaviors.
(btw, no worries if you don't have bandwidth for this, just some thoughts)
from mdns-sd.
Related Issues (20)
- Updating service info when service is registered HOT 2
- A and AAAA mDNS records HOT 13
- Use `serde` for de/ser Txt Records HOT 4
- Failed to send to ... Resource temporarily unavailable (os error 11) HOT 2
- Received length loss HOT 21
- When a receiver is dropped, the error produced by sender should not be Error HOT 5
- Issues with using a multicast IP for a service HOT 7
- Services published using python-zerconf or systemd-resolved are not resolved HOT 17
- Utility function to resolve mDNS hostnames HOT 7
- Add support for traffic reduction techniques from RFC6762, sec. 7 HOT 1
- Too verbose logging, even when logging is not enabled HOT 6
- question about interaction between record refresh and cache flush bit HOT 5
- Refactor functions warned by clippy::cognitive_complexity lint HOT 2
- Some weird caching behavior HOT 8
- Having a browse running for a longer time, services with a ttl of 60 are sort of flapping HOT 13
- Test `integration_success` fails on Windows HOT 5
- submit by mistake
- Reverse DNS lookup query HOT 1
- Searching for a service returns some internal responses but does not forward anything to listener HOT 6
- panicked at 'range end index 2 out of range for slice of length 1', /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/mdns-sd-0.10.5/src/dns_parser.rs:1144:38 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdns-sd.