Subject: Re: Problem with netatalk
To: Frederick Bruckman <fb@enteract.com>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 02/18/1999 11:47:00
On Thu, 18 Feb 1999, Frederick Bruckman wrote:

> I built and installed the netatalk-19981109 package, copied the
> default script to /usr/pkg/etc/rc.atalk, and put a hook into rc.local.
> But now afpd quits immediately. This from xconsole:
> 
> Console log for corwin.home
>  atalkd nbprgstr papd afpd.
> .
> Thu Feb 18 11:34:20 CST 1999
> Feb 18 11:34:26 corwin afpd[190]: main: asp_getsession: Invalid argument
> 
> Corwin appears in the chooser on the Quadra 630 running MacOS, but
> without afpd you can't actually connect. The file sharing works fine
> when Corwin, a Quadra 840 AV, is also booted into MacOS.
> 
> When I try to start afpd manually, "/usr/pkg/sbin/afpd -d", it writes
> this message to the console (-d is broken?): 
> 
> Feb 18 13:27:49 corwin afpd[1895]: Can't register corwin:AFPServer@*
> 
> Any ideas?

Yep. You aren't running a -current kernel.

I don't really know the right way to fix this, other than to upgrade (I
think 1.3.X was fine).

The problem has to do with how -current quotes resource limits (or used to
quote them). It would return RLIM_INFINITY (-1) for the max number of open
files. afpd allocates space for a number of connections according to (Max
# files - 10) /2. If Max # files is -1, well, it bombs.

I got Christos to change how this is handled in -current. It _should_ be
fine now.

If not, let me know and we can work on things.

Oh, the second error results from the fact that when afpd died the first
time, the atalk registration for the file server wasn't removed, so afpd
can't re-register for its desired name.

Check out nbplkup & friends for pointers on how to tell what's up, and how
to unregister dead services.

Take care,

Bill