Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Unknown error during service discovery #7

Open
nitrogenlogic opened this issue Jul 6, 2011 · 0 comments
Open

Unknown error during service discovery #7

nitrogenlogic opened this issue Jul 6, 2011 · 0 comments

Comments

@nitrogenlogic
Copy link

This may be a bug in Avahi's libdnssd compatibility wrapper, though the avahi-browse utility is able to browse and resolve services without issue.

When a service on the network has a description ending with a period, service resolution fails with the following error:

DNSSD Error: DNSSD::UnknownError - DNSSD operation failed with unrecognized error code: -65537:
 /var/lib/gems/1.9.1/gems/dnssd-2.0/lib/dnssd/service.rb:163:in `_process'
 /var/lib/gems/1.9.1/gems/dnssd-2.0/lib/dnssd/service.rb:163:in `process'
 /var/lib/gems/1.9.1/gems/dnssd-2.0/lib/dnssd/service.rb:257:in `resolve'
 my_code.rb:137:in `block (2 levels) in start_network_browser'
 /var/lib/gems/1.9.1/gems/dnssd-2.0/lib/dnssd/service.rb:164:in `process'
 /var/lib/gems/1.9.1/gems/dnssd-2.0/lib/dnssd/service.rb:66:in `browse'
 /var/lib/gems/1.9.1/gems/dnssd-2.0/lib/dnssd.rb:178:in `run'
 /var/lib/gems/1.9.1/gems/dnssd-2.0/lib/dnssd.rb:86:in `browse!'
 my_code.rb:130:in `block in start_network_browser'

It appears the error is generated by DNSServiceProcessResult() on line 227 of ext/service.c: https://github.com/tenderlove/dnssd/blob/master/ext/dnssd/service.c#L227

I noticed the issue when my discovery code started crashing whenever a particular computer was turned on. That computer had a service with the following Avahi service descriptor: Removing the period from the field works around the issue, but is not a solution.

<service-group>
    <name replace-wildcards="yes">HTTP Server on %h.</name>
    <service>
        <type>_http._tcp</type>
        <port>80</port>
    </service>
</service-group>

If this is a bug in Avahi, please feel free to pass this bug report to them. I'm running Ubuntu 11.04, Avahi compatibility layer version 0.6.30-0ubuntu2, ruby 1.9.2p0, dnssd gem 2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants