RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 704809 - Need to restart avahi-daemon every few minutes
Summary: Need to restart avahi-daemon every few minutes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: avahi
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Michal Sekletar
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 670971 1075802 1172231
TreeView+ depends on / blocked
 
Reported: 2011-05-15 07:37 UTC by mo.ucina
Modified: 2018-12-05 15:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-14 08:28:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description mo.ucina 2011-05-15 07:37:56 UTC
Description of problem:

In preparation to a new ipad I decided to set up Airprint . Setup was not too problematic but in operation I find that I need to restart avahi-daemon every few minutes to get printer to be visible . If I catch it early enough I can even print documents . Looking around I believe that my problem is : https://bugzilla.redhat.com/show_bug.cgi?id=249304 . Now I see that the fix is delivered in fc15 , my question is will we see this fix in RHEL 6 / 6.1 ? Is it even doable , what is the way forward ?

Version-Release number of selected component (if applicable):

CUPS 1.4.2

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Tim Waugh 2011-05-19 10:34:11 UTC
There is still some debate about how this will be implemented upstream, and it has not actually been deployed yet (because Fedora 15 is not yet released).  Until it has been "battle tested" and has some upstream acceptance I don't think we can add this experimental feature to Red Hat Enterprise Linux.

It sounds like the main problem you are seeing right now is some kind of issue with avahi.  It certainly should be possible to provide Airprint-compatible discovery using avahi.

Changing component and reassigning.

Comment 4 RHEL Program Management 2011-07-06 01:36:28 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 5 RHEL Program Management 2012-07-10 08:26:34 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2012-07-10 23:05:43 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 7 Rory 2012-08-15 18:20:11 UTC
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.


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

Comment 8 RHEL Program Management 2012-12-14 08:20:31 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 9 Bruno Medeiros 2013-02-20 17:07:30 UTC
Rory seems right, the problem is related to firewall. After a 'service iptables stop' (didn't tested the lines above), the problem is gone.

Comment 10 Rory 2013-02-20 17:22:10 UTC
(In reply to comment #9)
> Rory seems right, the problem is related to firewall. After a 'service
> iptables stop' (didn't tested the lines above), the problem is gone.

Happy to hear it helped someone else and that I wasn't totally way off (in some cases at least).

Regarding the iptables advise I gave above: I just searched the 'vim /etc/services' file to see what ports related to this particular server / protocol (being AFP and mDNS)

then added then to 'vim /etc/sysconfig/iptables' file and restarted iptables. Both UDP and TCP just in case.

Depending on your OS (Centos/RH/Fedora) the lines can look like
-A INPUT .............
OR
-A RH-Firewall-1-INPUT .............

Opening you iptables file should assist in giving you the correct format.
The location those lines could be placed are near the port 22 default ssh rule.

I don't think I had to enable a SELinux bool to get it working.

Good luck

Comment 13 RHEL Program Management 2013-10-14 01:05:30 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 16 Michal Sekletar 2015-10-14 08:28:16 UTC
Seems like configuration issue, rather than avahi bug.


Note You need to log in before you can comment on or make changes to this bug.