我正在运行一个基于 ubuntu:14.04 的容器,我需要能够在avahi-browse
其中使用。然而:
(.env)root@8faa2c44e53e:/opt/cluster-manager# avahi-browse -a
Failed to create client object: Daemon not running
(.env)root@8faa2c44e53e:/opt/cluster-manager# service avahi-daemon status
Avahi mDNS/DNS-SD Daemon is running
我遇到的实际问题是pybonjour
错误;pybonjour.BonjourError: (-65537, 'unknown')
但我读过这与 avahi-daemon 的问题有关。
所以; 如何从容器连接到 avahi-daemon?
PS 我必须在 avahi-daemon.conf 填充中关闭 dbus 才能启动它,否则 avahi-daemon 将无法启动,并出现如下 dbus 错误:
(.env)root@8faa2c44e53e:/opt/cluster-manager# avahi-daemon
Found user 'avahi' (UID 103) and group 'avahi' (GID 107).
Successfully dropped root privileges.
avahi-daemon 0.6.31 starting up.
dbus_bus_get_private(): Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.6.31 exiting.