[SOLVED] Avahi mDNS works, then stops working
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    May 2010
    Posts
    1,058
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Avahi mDNS works, then stops working

    F15 current
    avahi-daemon installed
    nss-mdns installed
    firewall totally disabled (for now while testing)
    connected to network wirelessly

    For perhaps 5 minutes I can either ssh into or from the F15 computer using:

    ssh chris@macbook2.local

    OR

    ssh chris@f15.local

    Works fine, no problems. And then in about five minutes it work resolve in either direction:
    ssh: Could not resolve hostname f15.local: nodename nor servname provided, or not known

    I can still ssh in using an IP address. So I do:
    [chris@f15 ~]$ service avahi-daemon status
    avahi-daemon.service - Avahi mDNS/DNS-SD Stack
    Loaded: loaded (/lib/systemd/system/avahi-daemon.service)
    Active: active (running) since Thu, 07 Jul 2011 16:44:34 -0600; 30min ago
    Main PID: 22978 (avahi-daemon)
    Status: "avahi-daemon 0.6.30 starting up."
    CGroup: name=systemd:/system/avahi-daemon.service
    ├ 22978 avahi-daemon: running [f15.local]
    └ 22979 avahi-daemon: chroot helper

    So then I just restart the service, and boom everything is working fine again. Five minutes later, not working. Restart avahi = working for 5 minutes then not working. I can't figure it out, except there is a very close proximity of this in /var/logs/messages everytime mdns no longer works:

    Jul 7 16:52:33 f15 dbus: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)
    Jul 7 16:52:33 f15 dbus: [system] Successfully activated service 'net.reactivated.Fprint'

    No idea what it is but it pops up about 5-7 minutes after restarting avahi-daemon.

    Ideas?

    ---------- Post added at 05:24 PM ---------- Previous post was at 05:17 PM ----------

    *sigh* No that's not it. I just found no mDNS service in or out of the computer 3 minutes 26 seconds after restarting it, no additional items in messages. I'm kinda lost.

  2. #2
    Join Date
    Aug 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Re: Avahi mDNS works, then stops working

    I am having the same exact problem. Did you ever find a solution? (My 'quick' hack to get these machines to be seen by my various clients is to restart the the daemon every minute via cron......)

    The Avahi daemon never reports any errors in the log, firewalls disabled, etc.... Clients that can not resolve to a Fedora box running avahi-daemon vary from Fedora, Ubuntu, OS-X and Windows, they can resolve the address for a couple of minutes and than nothing, restarting the avahi daemon on the box in question resolves the problem for a few minutes and than the problem starts again...

    TIA for any assistance.

  3. #3
    Join Date
    May 2010
    Posts
    1,058
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Avahi mDNS works, then stops working

    Never found a solution. No idea what's going on. Actually kinda frustrating that a process such as this can behave this way without any logging indication as to what's going on. Maybe it would require changing log level for something to debug to find out what's happening.

  4. #4
    Join Date
    Nov 2007
    Location
    Anchorage, Alaska
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Avahi mDNS works, then stops working

    I found this thread when I was attempting to troubleshoot this same problem. I seem to have this partially figured out anyway.

    This Bugzilla thread shows they've been debugging this same problem.

    https://bugzilla.redhat.com/show_bug.cgi?id=647831

    They seem to have figured out why Avahi was shutting down after a few minutes and got that part taken care of (assuming you have the latest release), but there is also an issue of a needed hole in the firewall they haven't figured out how to implement for the mainstream. Meanwhile, I found that if I run the command;

    su -c 'lokkit --service=mdns'

    It seems to open the appropriate hole in the firewall. My F15 box now seems to see itself, via Conduit, and sees my late model networked HP Laser Printer.

    I am not out of the woods yet. I have 2 boxes on my network running Conduit. One running F14, one F15. Both now see themselves and see the aforementioned printer, but do not see each other.

  5. #5
    Join Date
    May 2010
    Posts
    1,058
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Avahi mDNS works, then stops working

    This problem is still occurring in Fedora 16 for me with both actual hardware and VM, with what is effectively RC4. So someone with better ability to investigate why it stops working, even though it's active and running according to systemctl status, needs to write up a bug. I'd do it but know very little about Avahi configuration.

  6. #6
    Join Date
    May 2010
    Posts
    1,058
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Avahi mDNS works, then stops working

    https://bugzilla.redhat.com/show_bug.cgi?id=444427

    ---------- Post added at 03:10 PM ---------- Previous post was at 03:09 PM ----------

    Solution in the meantime is to go to the Firewall application, find in Trusted Services "Multicast DNS (mDNS)" check it and apply the change.

  7. #7
    Join Date
    Aug 2012
    Location
    CPT - ZA
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Avahi mDNS works, then stops working

    Hi. I might be way off here, but I had the same problem with Fedora 17, RHEL 6.2, and CentOS 6.2.

    I have to restart "avahi-daemon.service" and or "avahi-daemon.socket" with systemctl or service every couple of minutes in order for iMac machines on the network to discover the AFP server automatically in their finder window. If they restart their machines, come out of standby, sleep or I restart the server then we have to restart this process on the server for them to be able to find the server for a short while again.


    My solution was to do all of the following. Probably the 1st that helped the most, and seems related to the firewall talk in this forum.

    the bug https://bugzilla.redhat.com/show_bug.cgi?id=647831 to me seems more related to avahi not starting ... not so much the constant restart issues.


    1: Very over the top port opening for avahi, netatalk protocols
    ---------------------------------------------------------------
    Notice the UDP and TCP lines.

    548 = AFP over TCP
    5353 = Multicast DNS
    5354 = Multicast DNS Responder IPC


    # AFP / Netatalk / Apple Talk Protocol for Trilogy
    #
    -A INPUT -p tcp -m state -m tcp --dport 548 --state NEW -j ACCEPT
    -A INPUT -p udp -m state -m udp --dport 548 --state NEW -j ACCEPT
    #
    -A INPUT -p tcp -m state -m tcp --dport 5353 --state NEW -j ACCEPT
    -A INPUT -p udp -m state -m udp --dport 5353 --state NEW -j ACCEPT
    #
    -A INPUT -p tcp -m state -m tcp --dport 5354 --state NEW -j ACCEPT
    -A INPUT -p udp -m state -m udp --dport 5354 --state NEW -j ACCEPT


    2: Change the following line in the /etc/nsswitch.conf
    ------------------------------------------------------

    #hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns myhostname
    hosts: files mdns4_minimal dns mdns4 mdns


    3. Stoped the samba and nmb services
    ------------------------------------


    4. Add the below to rc.local (which needs to be created on some distro's)
    -------------------------------------------------------------------------
    sleep 15
    /etc/rc.d/avahi-daemon stop
    /etc/rc.d/avahi-daemon start


    Hope this helps someone, drove me almost crazy.

    Regards
    Rory

  8. #8
    Join Date
    Jan 2009
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Avahi mDNS works, then stops working

    The firewall seems to be the problem.. I stopped mine and everything works well.

Similar Threads

  1. [SOLVED]
    F14 avahi mdns not configured by default?
    By chrismurphy in forum Servers & Networking
    Replies: 6
    Last Post: 7th December 2010, 09:24 PM
  2. Synaptics Touchpad KDE Issue (works, then stops)
    By PhillyFloyd in forum Hardware & Laptops
    Replies: 4
    Last Post: 14th July 2009, 08:51 AM
  3. Cannot get avahi with nss-mdns to work
    By pwalden in forum Servers & Networking
    Replies: 4
    Last Post: 24th January 2009, 04:17 PM
  4. avahi.i386 conflict with avahi.x86_64
    By saibaggins in forum Using Fedora
    Replies: 6
    Last Post: 30th November 2007, 10:53 PM
  5. Wireless works, then stops...?
    By mcrbids in forum Servers & Networking
    Replies: 0
    Last Post: 18th January 2007, 05:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •