[Bug 624043] Re: Avahi needs to be restarted after boot to broadcast netatalk services
Rory S
glide3 at gmail.com
Wed Aug 15 18:25:08 UTC 2012
Hi. I might be way off here, but I had the same problem with Fedora 17
(most recent at time of comment posting), 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
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to avahi in Ubuntu.
https://bugs.launchpad.net/bugs/624043
Title:
Avahi needs to be restarted after boot to broadcast netatalk services
Status in “avahi” package in Ubuntu:
Confirmed
Bug description:
When I boot my server, it doesn't broadcast netatalk services. I have to manually restart avahi with:
restart avahi-daemon
Once I do this, the server shows up instantly in the Finder of my Mac.
The problem is pretty much exactly the same as reported by the person here:
http://ubuntuforums.org/showthread.php?t=1482573
The only difference is that the person here fixed it by installing packages from Debian Testing, which is something I'm wary of.
I added a file /etc/avahi/services/afpd.service, with the following contents:
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
And there is no .local domain on my network that is causing problems
with avahi starting.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: avahi-daemon 0.6.25-1ubuntu6
ProcVersionSignature: Ubuntu 2.6.32-24.41-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
Architecture: amd64
Date: Wed Aug 25 09:42:25 2010
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: avahi
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/624043/+subscriptions
More information about the foundations-bugs
mailing list