0

On a Ubuntu 20.04 machine, I've created an Avahi service file that looks like this:

<?xml version="1.0"?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name>Custom Printer</name>
        <service>
              <type>_customprinter._tcp</type>
              <port>9100</port>
              <domain-name>local</domain-name>
              <host-name>bps-323784f0.local</host-name>
              <txt-record>pdl=custom</txt-record>
        </service>
</service-group>

If I run avahi-browse _customprinter._tcp -r I get the following:

Failed to resolve service 'Custom Printer' of type '_customprinter._tcp' in domain 'local': Timeout reached

However, If I change the printer.service file to the following (remove domain-name and host-name) all of the relevant data is resolved for the service.

My avahi config file is the following:

[server]
host-name=pi4
domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
#allow-interfaces=eth0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
#disallow-other-stacks=no
#allow-point-to-point=no
#cache-entries-max=4096
#clients-max=4096
#objects-per-client-max=1024
#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000

[wide-area]
#enable-wide-area=yes

[publish]
#disable-publishing=no
#disable-user-service-publishing=no
#add-service-cookie=no
publish-addresses=yes
#publish-hinfo=no
#publish-workstation=no
publish-domain=yes
publish-dns-servers=192.168.50.1, 192.168.50.2
publish-resolv-conf-dns-servers=yes
publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no

[reflector]
#enable-reflector=no
#reflect-ipv=no

[rlimits]
#rlimit-as=
#rlimit-core=0
#rlimit-data=8388608
#rlimit-fsize=0
#rlimit-nofile=768
#rlimit-stack=8388608
#rlimit-nproc=3

What do I need to configure differently to be able to include and in the service file without breaking Avahi's ability to resolve the service?

*** I'm guessing the problem is that the in the service file must match the machines configured hostname?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.