netatalk fails to start on boot when "roaming mode" enabled

Bug #176472 reported by Tommy Trussell
10
Affects Status Importance Assigned to Milestone
sysvinit
Invalid
Undecided
Unassigned
netatalk (Ubuntu)
Expired
Undecided
Unassigned
upstart (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: netatalk

I've been running Netatalk on a system since it was running Dapper 6.06 or Edgy 6.10. Now I'm running Gutsy 7.10 and noticed Netatalk doesn't start at boot, though it starts readily when invoked manually using

sudo /etc/init.d/netatalk start

There are no messages logged anywhere regarding the failed start so it's hard to know where to look for the problem. I honestly don't remember if it started correctly under Ubuntu Feisty 7.06. There are no error messages when it's started manually -- just a "normal" entry in /var/log/messages saying papd CUPS support is enabled.

I found a forum discussion about it -- http://ubuntuforums.org/showthread.php?t=486949

Based on this discussion I looked at the system-V and upstart scripts, and the scripts seem to be where they should be. I also tried removing the bootsplash and netatalk still does not start on boot. I have not tried any changes to my /etc/hosts or network configuration.

I see several bugs where people had trouble installing netatalk, such as Bug #109917, Bug #158076, Bug #157685 and Bug #159202 -- all of these seem to be difficulties with the network interface. That may be the problem here -- maybe the interface is not ready when Netatalk starts, HOWEVER why does it not log anything at all -- not even the attempt to start?

Could there be something odd about the netatalk code that doesn't play well with upstart?

P.S.: I AM using netatalk "insecurely" on my LAN since I have not recompiled the package to use ssh as reported in Bug #26452 -- my file sharing clients connect using cleartext passwords.

Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

I had a few minutes today to tinker with this ... I added an echo message to the second line of /etc/init.d/netatalk so I could look for any sign that the netatalk script is being invoked but dying early. I never saw it, nor is it logged anywhere. (and yes, there is a link from /etc/rc2.d/S50netatalk to the netatalk script in init.d)

Then I read /usr/share/doc/upstart/README.Debian.gz and added --debug to my kernel parameters in /boot/grub/menu.lst

I saw lots of additional messages on the console about the various rc scripts being invoked but never saw anything about netatalk, nor was ANY of this logged anywhere.

AFTER lots of reading it looks like the messages should be in /var/log/boot, but that file contains
"(Nothing has been logged yet.)" and the date stamp is from last April.

$ ls -la /var/log/boot
-rw-r----- 1 root adm 31 2007-04-15 06:49 /var/log/boot

are the permissions wrong???

Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

OK now I see that the logd isn't working, as described in Bug #98955

Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

Last night it occurred to me to try installing sysvinit (to replace upstart) and sure enough, netatalk started at boot when sysvinit is installed. I then put the system back to its previous state (with upstart instead of sysvinit), and netatalk no longer started on boot.

When you apt-get install sysvinit on an Ubuntu Gutsy 7.10 system, here are the packages it touches:

twt@emonster:~$ sudo apt-get install sysvinit
[sudo] password for twt:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  apparmor apparmor-utils startup-tasks system-services ubuntu-minimal upstart
  upstart-compat-sysv upstart-logd
The following NEW packages will be installed:
  sysvinit
0 upgraded, 1 newly installed, 8 to remove and 0 not upgraded.
Need to get 110kB of archives.
After unpacking 4395kB disk space will be freed.
Do you want to continue [Y/n]?

** For anyone reproducing this procedure, I recommend going to the console and switching to single user mode (using the telinit 1 command for example) and making sure everything else is stopped before replacing upstart. It's really hard to shut the system down when upstart is still running with all its pieces gone. I had removed it in multi-user mode and finally resorted to killing the power to the cpu. **

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Upstart doesn't run the sysv-rc scripts, sysvinit still does

Does netatalk include an inittab line?

Changed in upstart:
status: New → Incomplete
Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

I am not certain I understand... I am not familiar with any packages that would modify inittab, so if I'm missing something please let me know.

I just looked and there appear to be no additions to /etc/inittab -- it seems to contain only the "ordinary" sections for default, boot-time, runlevel, ctrl-alt-del, etc.

The netatalk package inserted K50netalalk links in /etc/rc0.d, rc1.d and rc6.d, and S50netatalk links in /etc/rc2.d/ rc3.d rc4.d and rc5.d directories, all of which point to ../init.d/netatalk and the permissions on the /etc/init.d/netatalk script are the same as all the other scripts in that directory.

I added a few echo lines to the script with a unique message to confirm that it isn't being invoked at all, otherwise it's the default script installed by the package.

I am attaching the netatalk script (including my obnoxious echo messages) in case there's something interesting to look for in it. (When I boot my gutsy system none of the echo messages I have inserted appear UNLESS I install the sysvinit package.)

please let me know if there's anything else I should look for.

Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

clarification -- apparently I removed all but the first echo message, and the script is "stock" except for one line I modified and annotated.

Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

I am realizing I don't understand at all how upstart "knows" what to start and how and when, so I have started by reading http://upstart.ubuntu.com/wiki/ and while most of the links at the end are broken, the last link (not broken) is the most useful -- http://www.netsplit.com/2006/12/14/upstart-0-3/

I also just noticed the doc in /usr/share/doc/upstart -- yay! this is very clear and is the place I should have started reading. If you haven't already, maybe it would be worthwhile pointing to the upstart doc from the man pages for init and from the README in /etc/init.d/ (at least in Ubuntu Gutsy 7.10, the text of that README does not mention upstart concepts at all).

If I should file upstart or documentation bugs with those suggestions please let me know.

Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

reading back through this bug I noticed that I HAD already found /usr/share/doc/upstart/README.Debian.gz back in December but obviously I had forgotten it, and apparently adding --debug to the kernel parameters didn't make anything any clearer. My current guess is there's something about the netatalk script that makes upstart ignore it -- but a message somewhere would be helpful so I know where to look.

Revision history for this message
tsanga (tsanga13) wrote :

Are there any further developments with this? I, too, have trouble with netatalk not starting at boot. Tried putting it in /etc/rc.local but that didn't do it.

Revision history for this message
tsanga (tsanga13) wrote :

Figured it out!

I had to disable "roaming mode" in NetworkAdmin. Seems like something with roaming mode wasn't making eth0 available to netatalk at startup. With it turned off, netatalk starts properly in the few times I've rebooted.

Reference:
https://help.ubuntu.com/community/NetworkAdmin

Changed in upstart:
status: New → Invalid
Changed in sysvinit:
status: Incomplete → Invalid
Revision history for this message
Silvermoon (mistemi) wrote :

Hi,
what helped for me was to add a line consisting only of:
eth0
at the end of
/etc/netatalk/atalkd.conf

:)

Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote :

Is this still an issue for you? What Ubuntu version do you use? Thank you for telling us!

Changed in netatalk (Ubuntu):
status: New → Incomplete
Revision history for this message
Tommy Trussell (tommy-trussell) wrote :

I apologize for the lack of updates but I quit using Netatalk when I "retired" most of my oldest Macintosh hardware running Mac OS 9 and Ubuntu 6.06 on the PowerPC hardware and Ubuntu 7.10 on the Intel hardware. Nowadays I've updated the Intel hardware to 12.04 LTS and abandoned the PowerPC. I appreciate the feedback from tsanga but at this point I don't recall whether I tested his workaround.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for netatalk (Ubuntu) because there has been no activity for 60 days.]

Changed in netatalk (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.