Do I need avahi?

poma pomidorabelisima at gmail.com
Sat Jul 27 18:26:49 UTC 2013


On 27.07.2013 15:55, Timothy Murphy wrote:
> I recently noticed that I have been getting warnings
>   avahi-daemon[5884]: dbus-protocol.c: 
>     Too many objects for client ':1.15', client request failed.
> on my server.
> I must admit I didn't know I was running avahi on the server.
> 
> I looked at a couple of avahi howtos,
> and it seemed that for almost any usage other packages are required,
> in particular nss-mdns .
> If this is in fact required by avahi, it seems surprising
> that it is not automatically installed at the same time.
> (None of the examples of avahi usage actually worked on my system.)
> 
> But my real query is whether avahi (or zeroconf)
> could actually offer me anything useful.
> I'm running dhcpd on the server,
> and I'm not looking for information about printers
> or other users on my home network.
> 
> Also, is there any way of discovering who "client 1.15" is?
> And is anything likely to go wrong if I simply "service avahi-daemon stop"?
> 

Never say never. :)

Besides printer discovery,
Client:
/usr/lib/systemd/system/cups-browsed.service
…
Description=Make remote CUPS printers available locally
After=cups.service avahi-daemon.service
Wants=cups.service avahi-daemon.service
…
EOF

est possible other services discovery.

Service Types:
/usr/share/avahi/service-types
http://www.dns-sd.org/ServiceTypes.html
man 5 avahi.service

Avahi config
Client & Server:
/etc/nsswitch.conf
…
hosts:      files mdns4_minimal [NOTFOUND=return] dns myhostname
…
EOF

completed by 'nss-mdns' POSTIN scriptlet,
uses /lib64/libnss_mdns4_minimal.so.2
required by Avahi.
http://0pointer.de/lennart/projects/nss-mdns/

/etc/avahi/avahi-daemon.conf
…
[server]
use-ipv4=yes
use-ipv6=no
allow-interfaces=$(firewall-cmd --list-interfaces)
…
EOF
man 5 avahi-daemon.conf

firewall-cmd --permanent --add-service=mdns
firewall-cmd --reload
systemctl unmask/enable/start avahi-daemon.service
man 1 firewall-cmd
man 1 systemctl
getent hosts client/server.local

e.g. NFS share discovery,
Server:
/etc/avahi/services/nfs-share1.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<!-- This is a custom avahi nfs service file -->

<service-group>
  <name replace-wildcards="yes">NFS share1 on %h</name>
  <service>
    <type>_nfs._tcp</type>
    <port>2049</port>
    <txt-record>path=/share1-dir</txt-record>
  </service>
</service-group>
EOF

/etc/exports
/share1-dir                          client(rw,insecure,sync)
EOF

Client(NFS):
konqueror/dolphin/krusader zeroconf:/
driven by 'kdenetwork-kdnssd' - requires "insecure"(NFS Server)
man 5 exports

UI tools for mDNS browsing:
avahi-browse -altv
avahi-discover
man 1 avahi-browse
man 1 avahi-discover


poma


ML - http://lists.freedesktop.org/mailman/listinfo/avahi
URL - http://avahi.org




More information about the users mailing list