Avahi daemon not found but started

Hey all,

the noAvahi-server is working as expected, but when i try to start the avahi version, the syslog comes up with following message:

Mar 29 11:32:27 carambola2 user.err vhusbdar7x9xa: Failed to create AVAHI client: Daemon not running

The server is still working, but without avahi support. Here the complete syslog:

Mar 29 11:32:27 carambola2 user.info vhusbdar7x9xa: >>> Starting v1.7.8 (Built: Jan 29 2014, 09:29:12)<<<
Mar 29 11:32:27 carambola2 user.info vhusbdar7x9xa: Using default configuration /root/withAvahi/config.ini
Mar 29 11:32:27 carambola2 user.info vhusbdar7x9xa: Serial:c49300002957
Mar 29 11:32:27 carambola2 user.info vhusbdar7x9xa: Server licensed to=unlicensed max_devices=1
Mar 29 11:32:27 carambola2 user.debug vhusbdar7x9xa: TCPServer starting...
Mar 29 11:32:27 carambola2 user.info vhusbdar7x9xa: TCPServer bound to port 7575
Mar 29 11:32:27 carambola2 user.debug vhusbdar7x9xa: TCPServer (7575) started
Mar 29 11:32:27 carambola2 user.err vhusbdar7x9xa: Failed to create AVAHI client: Daemon not running

When i start the noAvahi-server, same result, just without the error:

Mar 29 11:34:21 carambola2 user.info vhusbdar7x9x: >>> Starting v1.7.8 (Built: Jan 29 2014, 09:29:20)<<<
Mar 29 11:34:21 carambola2 user.info vhusbdar7x9x: Using default configuration /root/withoutAvahi/config.ini
Mar 29 11:34:21 carambola2 user.info vhusbdar7x9x: Serial:c49300002957
Mar 29 11:34:21 carambola2 user.info vhusbdar7x9x: Server licensed to=unlicensed max_devices=1
Mar 29 11:34:21 carambola2 user.debug vhusbdar7x9x: TCPServer starting...
Mar 29 11:34:21 carambola2 user.info vhusbdar7x9x: TCPServer bound to port 7575
Mar 29 11:34:21 carambola2 user.debug vhusbdar7x9x: TCPServer (7575) started

Here the avahi syslog:

Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: Found user 'nobody' (UID 65534) and group 'nogroup' (GID 65534).
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: Successfully dropped root privileges.
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: avahi-daemon 0.6.31 starting up.
Mar 29 10:39:22 carambola2 daemon.warn avahi-daemon[1080]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: Loading service file /etc/avahi/services/http.service.
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: Loading service file /etc/avahi/services/ssh.service.
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: Joining mDNS multicast group on interface br-lan.IPv4 with address 192.168.178.26.
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: New relevant interface br-lan.IPv4 for mDNS.
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: Network interface enumeration completed.
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: Registering new address record for 192.168.178.26 on br-lan.IPv4.
Mar 29 10:39:22 carambola2 daemon.info avahi-daemon[1080]: Registering HINFO record with values 'MIPS'/'LINUX'.
Mar 29 10:39:23 carambola2 daemon.info avahi-daemon[1080]: Server startup complete. Host name is carambola2.local. Local service cookie is 1672908340.
Mar 29 10:39:24 carambola2 daemon.info avahi-daemon[1080]: Service "Secure Shell on carambola2" (/etc/avahi/services/ssh.service) successfully established.
Mar 29 10:39:24 carambola2 daemon.info avahi-daemon[1080]: Service "Web Server on carambola2" (/etc/avahi/services/http.service) successfully established.

Here the avahi-config:

[server]
#host-name=foo
#domain-name=local
use-ipv4=yes
use-ipv6=no
check-response-ttl=no
use-iff-running=no
enable-dbus=no
[publish]
publish-addresses=yes
publish-hinfo=yes
publish-workstation=no
publish-domain=yes
#publish-dns-servers=192.168.1.1
#publish-resolv-conf-dns-servers=yes
[reflector]
enable-reflector=no
reflect-ipv=no
[rlimits]
#rlimit-as=
rlimit-core=0
rlimit-data=4194304
rlimit-fsize=0
rlimit-nofile=30
rlimit-stack=4194304
rlimit-nproc=3

Had to set "enable-dbus=no". Avahi wouldn't start without this setting.

Hope you can help me with the avahi version.
Thanks

verloren

#2

Hi Veloren, Im thinking the openwrt version of avahi may not support dynamic client creation, and instead requires a service file to be manually created. See here http://linux.die.net/man/5/avahi.service for more details. Looking at the avahi log it seems its only looking for files in the /etc/avahi/services directory.

Hi admin,

thank you for your answer. The service file solution sounds interesting. So you think i should create a service file, restart avahi daemon an then start the server? If so, i need a little more information on the service file.
What service -> type should i use? What txt-record? The name and the port is self explainig.

If this works, the syslog error still should appear!?

#4

Save this in a file called virtualhere.service file in /etc/avahi/services and give it a try. Note the txt-record is your serial number i have copied from your log above

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name>VirtualHere USB Sharing</name>
<service>
<type>_vhusb._tcp</type>
<port>7575</port>
<txt-record>c49300002957</txt-record>
</service>
</service-group>

#5

So, i created that file, restarted avahi. Syslog as expected (new service created). Started the server and no avahi auto find functionality. Syslog still with 'can't create client' error.

#6

Do not use the avahi version of the server. Use the one without the a extension i.e vhusbdar7x9x. The "cannot create client" error will not occur..

Download and install this http://hobbyistsoftware.com/bonjourBrowser . If you can see the service listed there, then Virtualhere client will be able to automatically find the server. You need to be able to see the service in that browser. If you cant that means your avahi service file was not setup correctly.

#7

ok, i am using the no avahi server. "Avahi Zeroconf browser" is installed (on ubuntu). Screenshot under: http://s23.postimg.org/7xbgd62mz/virtualhere.png
You see the Avahi browser with _vhusb._tcp, the VirtualHere client, the client message window and the emtpy server list.
So all settings should be correct.

#8

Are you using wine? Virtualhere definately wont work with wine because a large part of the virtualhere client works inside the kernel as a driver. You need to run it natively on either windows or osx...