dbus_bus_request_name(): Connection ":1.0" is not allowed to own the service "or g.freedesktop.Avahi" due to security policies in the configuration file
<!DOCTYPE busconfigPUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig>
<!-- Only root or user avahi can own the Avahi service --> <policyuser="nobody"> <allowown="org.freedesktop.Avahi"/> </policy> <policyuser="root"> <allowown="org.freedesktop.Avahi"/> </policy>
<!-- Allow anyone to invoke methods on Avahi server, except SetHostName --> <policycontext="default"> <allowsend_destination="org.freedesktop.Avahi"/> <allowreceive_sender="org.freedesktop.Avahi"/>
<!-- Allow everything, including access to SetHostName to users of the group "adm" --> <policygroup="adm"> <allowsend_destination="org.freedesktop.Avahi"/> <allowreceive_sender="org.freedesktop.Avahi"/> </policy> <policyuser="root"> <allowsend_destination="org.freedesktop.Avahi"/> <allowreceive_sender="org.freedesktop.Avahi"/> </policy> </busconfig>
avahi-daemon协议不可用
1 2
SO_REUSEPORT failed: Protocol not available Failed to create server: No suitable network protocol available
修改/etc/avahi/avahidaemon.conf文件,在server段增加一行:
1
disallow-other-stacks=yes
avahi-daemon自启动失败
启动后没有发现avahi-daemon进程,手动运行时提示Failed to create server: No suitable network protocol available。 测试发现avahi-daemon必须先于shairport启动,如果shairport先启动,运行avahi-daemon就会出现上述错误,所以我们改写一下/etc/init.d/avahi-daemon文件,让avahi-daemon启动完之后再启动shairport,里面的方法改成: