What's new

What is the Avahi-daemon for ?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Denna

Senior Member
What does the avahi-daemon do ?

Why is it needed ?​
 
its a linux version of Apple's Zeroconf implementation, Bonjour
e.g. its not needed on windows devices

i have zero apple devices in my house
there really should be a setting to turn off avahi
 
Avahi implements Bonjour - which is multicast DNS - useful for service and host discovery, and it's low impact and risk...

AirPlay, Airprint - these make good use of things here - and it's more than just Apple - Linux on the desktop (e.g. Ubuntu/Fedora/etc) make good use of this, as does Raspbian if one is doing some Pi stuff - even Windows 10 has mDNS built in (although somewhat broken, but it's there).
 
its a linux version of Apple's Zeroconf implementation, Bonjour
e.g. its not needed on windows devices

i have zero apple devices in my house
there really should be a setting to turn off avahi
There is no harm in leaving it running.
 
I have zero Apple devices in my house.
Just checked my router and /usr/sbin/avahi-daemon is not even there. Then I remembered compiling the firmware with "MDNS=n". I think it's also possible to bind mount any program to /dev/null, to prevent it from executing. Then when you run it, Linux will return "permission denied".
 
@Fitz Mutch,

Unless there another way to do it, I can install the Entware bindfs package.​

What would be the syntax for using bindfs to bind mount /usr/sbin/avahi-daemon to /dev/null ?

Does this work before the avahi-daemon runs ?

Where would you place this command ? In the /jffs/scripts/init-start or services-start scripts ?​
 
What would be the syntax for using bindfs to bind mount /usr/sbin/avahi-daemon to /dev/null ?
Will it work?

/jffs/scripts/init-start
Code:
#!/bin/sh
PRG="/usr/sbin/avahi-daemon"
/usr/bin/killall ${PRG##*/}; [ -f "$PRG" ] && [ ! -h "$PRG" ] && /bin/mount -o bind /dev/null "$PRG"
 
Will it work?

/jffs/scripts/init-start
Code:
#!/bin/sh
PRG="/usr/sbin/avahi-daemon"
/usr/bin/killall ${PRG##*/}; [ -f "$PRG" ] && [ ! -h "$PRG" ] && /bin/mount -o bind /dev/null "$PRG"
This is what I use in services-start:
Code:
#!/bin/sh

/sbin/service stop_mdns

I think that when nasapps restarts avahi-daemon gets restarted also. But it's not something I do often enough to worry about.
 
@Fitz Mutch ,

Thanks for the help.

On the current version of Asuswrt-Rmerlin, the path is /usr/sbin/avahi-daemon.

This scripts stops the avahi-daemon if it's running and then creates a bind mount to prevent it from being restarted, correct ?

What do the "-f" and "-h" options do ?

You don't think placing this in the init-start script would be too soon in the boot process ?​
 
This scripts stops the avahi-daemon if it's running and then creates a bind mount to prevent it from being restarted, correct ? What do the "-f" and "-h" options do ? You don't think placing this in the init-start script would be too soon in the boot process ?
  1. Yes, this script kills the process and then prevents it from starting.
  2. The -f and -h checks if it's a regular file and that it's not a symbolic link. Just in case someone else attempts to use this to disable other programs too... symbolic links cannot be bind mounted. It's a safety feature to prevent accidentally disabling all of busybox or rc, due to the many program names that link to busybox and rc.
  3. I think it's never too soon to bind mount. The filesystem is always up.
 
I just had this issue pop up out of the blue today. In my case it was on Asus AX86U running AsusWrt-Merlin code version 386_7.0 which I've been running from the day of release which I believe was about 10 days ago or so. I use my AX86U as a router on FiOS's network (no ISP's modem or router rather direct ethernet link into FiOS's infrastructure). Alert came in out of the blue, have not been doing any changes in my home of any kind or messed with configs, that WANlink is down /up/down/up/down/u...etc and when it stabilized I noticed these messages within syslog. Took the above-suggested code, created the suggested script, rebooted and the messages are gone(thanks for the script code, whoever developed it). However, I have another issue now, and am not sure is it my router or provider, but my WAN speed dropped 6 fold. Currently, no time to deal with the provider but will soon, and when I do if I get any useful info will update this post.
 
I just had this issue pop up out of the blue today. In my case it was on Asus AX86U running AsusWrt-Merlin code version 386_7.0 which I've been running from the day of release which I believe was about 10 days ago or so. I use my AX86U as a router on FiOS's network (no ISP's modem or router rather direct ethernet link into FiOS's infrastructure). Alert came in out of the blue, have not been doing any changes in my home of any kind or messed with configs, that WANlink is down /up/down/up/down/u...etc and when it stabilized I noticed these messages within syslog. Took the above-suggested code, created the suggested script, rebooted and the messages are gone(thanks for the script code, whoever developed it). However, I have another issue now, and am not sure is it my router or provider, but my WAN speed dropped 6 fold. Currently, no time to deal with the provider but will soon, and when I do if I get any useful info will update this post.
What issue? There is no "issue" reported in this thread. You're replying to a thread that's over 5 years old. Perhaps you intended replying to some different thread?
 
So you're seeing the same CPU usage problem that was last reported 5 years ago on a completely different firmware branch?
Yes (it was also consuming NVRAM resources) and the following was part of it (lines are from my AX86U syslog):
Jul 6 11:04:58 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-2
Jul 6 11:04:59 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-3
Jul 6 11:04:59 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-4
Jul 6 11:05:00 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-5
Jul 6 11:05:01 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-6
Jul 6 11:05:02 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-7
Jul 6 11:05:03 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-8
Jul 6 11:05:04 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-9
Jul 6 11:05:05 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-10
Jul 6 11:05:06 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-11
Jul 6 11:05:07 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-12
Jul 6 11:05:08 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-13
Jul 6 11:05:09 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-14
Jul 6 11:05:10 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-15
Jul 6 11:05:11 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-16

the script I found on this page helped disable the avahi and as soon as I ran it issue stopped.
 
Yes (it was also consuming NVRAM resources) and the following was part of it (lines are from my AX86U syslog):
Jul 6 11:04:58 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-2
Jul 6 11:04:59 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-3
Jul 6 11:04:59 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-4
Jul 6 11:05:00 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-5
Jul 6 11:05:01 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-6
Jul 6 11:05:02 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-7
Jul 6 11:05:03 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-8
Jul 6 11:05:04 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-9
Jul 6 11:05:05 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-10
Jul 6 11:05:06 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-11
Jul 6 11:05:07 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-12
Jul 6 11:05:08 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-13
Jul 6 11:05:09 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-14
Jul 6 11:05:10 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-15
Jul 6 11:05:11 avahi-daemon[1814]: Host name conflict, retrying with RT-AX86U-E078-16

the script I found on this page helped disable the avahi and as soon as I ran it issue stopped.
That's a completely different issue to the one described in that other thread. Your problem is more like the one described in this thread and other similar threads.
 
That's a completely different issue to the one described in that other thread. Your problem is more like the one described in this thread and other similar threads.
Thanks sure read(s) like it, but this script helped disable avahi, so until I read somewhere that avahi dev has resolved it, I am leaving this script running.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top