NetService icon indicating copy to clipboard operation
NetService copied to clipboard

NetService not working on swift Docker Official Image

Open miguelriotinto opened this issue 3 years ago • 3 comments

When trying NetService with NetService-example on the swift Docker Official Image, I am getting the following warning messages and NetService is not working (not publishing, nor browsing services):

root@docker-desktop:/singular/NetService-Example-master# .build/debug/NetService-Example *** WARNING *** The program 'NetService-Example' uses the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see http://0pointer.de/blog/projects/avahi-compat.html

Building and running NetService-example in Xcode, seems to be working fine.

Any idea on how to get NetService to work on the swift Docker Official Image?

miguelriotinto avatar Jan 04 '23 13:01 miguelriotinto

NetService uses Avahi, so start debugging there. Can you publish a service with Avahi? Once you’ve got that working, I expect NetService to just work as well.

Bouke avatar Jan 04 '23 14:01 Bouke

Installed avahi-utils and "avahi-browse -a" returns:

root@docker-desktop:/singular/NetService-Example-master# avahi-browse -a Failed to create client object: Daemon not running

The avahi daemon is apparently not running in the container. I confirmed this with "/etc/inet.d/avahi-daemon status":

root@docker-desktop:/singular/NetService-Example-master# /etc/init.d/avahi-daemon status Avahi mDNS/DNS-SD Daemon is not running

Trying to start the Avahi daemon with "/etc/init.d/avahi-daemon start" but still daemon is not starting...

miguelriotinto avatar Jan 04 '23 14:01 miguelriotinto

mkdir /run/dbus
dbus-daemon --system
avahi-daemon -D

ishabalin avatar Dec 19 '23 07:12 ishabalin