Subject: problem with afpd dropping connection

From: "Michael" <[email-masked]>
Date: Mon, 27 Mar 2000 17:38:20 -0800

System is i86 based 2.2.14 linux running netatalk-1.4b2+asun2.1.3

upon connection to the linux box, a mac will drop the session after a
few minutes with the message that the server disconnected.

ps ax reveals the afpd child is still running.

Attempting to reconnect starts a new child (the old one remains)

The new connection remains stable for a minute or so and then goes
away with the same message:

File server <servername>unexpectedly disconnected

This process can be repeated until the max allowed daemon limit is
reached (default 5) at which time, the daemons if killed will allow
you to repeat the process.

Anyone know what's going on here or have any
idea how to solve the problem?

Michael
[email-masked]

---

From: Kendall Lister <[email-masked]>
Date: Tue, 28 Mar 2000 13:25:15 +1000 (EST)

> File server <servername>unexpectedly disconnected

Is there any chance that you have hosts.allow/deny settings that prevent
all connections and don't explicitly allow afpd/atalkd connections? Adding
these two to our system (which denies ALL:ALL) stopped the unexpected
disconnections from occurring; presumably afpd/atalkd are following our
tcp_wrapper setup.

--
 Kendall Lister, Systems Operator for Charon I.S. - [email-masked]
  Charon Information Services - Friendly, Cheap Melbourne ISP: 9589 7781

---

From: David Blache <[email-masked]>
Date: Tue, 28 Mar 2000 09:57:46 -0600

Please excuse my ignorance.  I'm a relative newbie.

I've installed a non-RPM version of the netatalk 1.4b2+asun2.1.3-6 package
on my redhat i386 box.  I had to modify a couple MakeFiles to get it to
compile correctly. 

My first question: It's been running for a while now.  But I've noticed a
throughput problem.  I wish to store MP3s on my linux box, sharing the MP3
directory with atalk so that I can play them on my mac.  That way I can
theoretically ftp into my Linux box remotely to access them, and use them
transparently on my mac.  The problem is, while playing MP3s from this
shared directory, my MP3 player will cut off intermittently.  I'm not sure
what is the cause of this.  But it doesn't happen when MP3s are local.  And
it doesn't happen when they are on another mac on my LAN.  The only thing I
have been able to attribute it to is netatalk.

My second question: A friend suggested that I install the latest rpm.  I've
downloaded netatalk-1.4b2+asun2.1.3-7.i386.rpm.  And I ran a rpm -i --test
on it.  I got no errors.  So then I did a rpm -i --replacefiles
--installdocs on it.  I did the --replacefiles because I wanted it to
replace my old non-rpm installation of netatalk.

The following output is the result:

warning: /etc/pam.d/netatalk saved as /etc/pam.d/netatalk.rpmorig
warning: /etc/rc.d/init.d/atalk saved as /etc/rc.d/init.d/atalk.rpmorig
warning: The DDP services appear to be present in /etc/services.
warning: Please check them against services.atalk in the documentation.

I get the distinct impression that --replacefiles was the wrong thing to do
:/

Advice?

-- 

         Beware of programmers carrying screwdrivers.

---

From: Martin Espinoza <[email-masked]>
Date: Tue, 28 Mar 2000 08:18:08 -0800 (Pacific Standard Time)

> disconnections from occurring; presumably afpd/atalkd are following our

For me, I had the macs dropping the session when you tried to transfer
a file over about 1k :) I ended up putting "server -alltrans" in the
afpd.conf file, and the OS9 macs began using Appletalk over IP or whatever
it's called (Sorry, I'm not a very good mac guy, since I hate the things :)
And that problem went away for me.

---

From: Patrik Schindler <[email-masked]>
Date: Tue, 28 Mar 2000 18:30:22 +0200

At 9:57 Uhr -0600 28.03.2000, David Blache wrote:

Hello David (the world is small) ;-)

>transparently on my mac.

I see.

> The problem is, while playing MP3s from this
>shared directory, my MP3 player will cut off intermittently.

Which one do you use?
What System Version do you use?
What Mac do you use?

>I'm not sure

I'm using 2.1.3 myself and cannot reproduce your problems with SoundApp on a 200MHz PMac 7500.

Do you have other problems accessing files on your linux box?

:wq! PoC

---

From: "Michael" <[email-masked]>
Date: Tue, 28 Mar 2000 09:45:08 -0800

> Is there any chance that you have hosts.allow/deny settings that
> prevent all connections and don't explicitly allow afpd/atalkd
> connections? Adding these two to our system (which denies ALL:ALL)
> stopped the unexpected disconnections from occurring; presumably
> afpd/atalkd are following our tcp_wrapper setup.
> 

Exactly our setup. hmmm..... you mean to say the connection manages 
to get established THEN disconnected... oh well. I'll try this and 
see if it works. Thanks for the tip.

I think one of the things that bothers me the most is all the afpd 
children that seem to be 'stuck'. I think there is a flaw in the code 
somewhere. Seems to me that these children should time out and die 
when their connection is no longer valid.
[email-masked]

---

From: David Blache <[email-masked]>
Date: Tue, 28 Mar 2000 11:57:46 -0600

> Hello David (the world is small) ;-)

Wow! Hi PoC! =)

> What System Version do you use?

SoundJam or SoundApp (happens with either one)

OS 8.6

iMac 233

I'll have to verify if the same problem occurs with my other mac (Starmax
3000/180 - 604e)

> Do you have other problems accessing files on your linux box?

Well now something funny is going on.  I see the linux box (The Vault) in
the chooser.  But when I double-click it, I get a long pause, followed by
this message:

    No response from the server. Please try again.

It doesn't ask for a name or password.  It just can't connect.

ps uwax | grep atalk gives me:

$ ps uwax | grep atalk
root       529  0.0  0.4  1180  544 ?        S    11:13   0:00 atalkd
root       703  0.0  0.5  1504  720 ?        S    11:13   0:00
/usr/local/atalk/etc/afpd -F /usr/local/atalk/etc/afpd.conf

So atalkd and afpd are running.  I'm not sure what the problem is...  :/

-David

---

From: "Robert J. Rust" <[email-masked]>
Date: Tue, 28 Mar 2000 12:01:02 -0600

I've had this problem as well using SoundJam as an MP3 player.  My server is
running Debian 2.2 and the Mac is a G4.  Both are connected to a 10/100
switch, so there is plenty of bandwidth.  It appeared that after about a
minute of playback, it would start getting very choppy.  I haven't seen this
problem since I put in the switch, but I'm not sure what got rid of it.  I'd
be interested in hearing more.

Robert

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert J Rust
Microcomputer Specialist
UW - River Falls IT Services
(715) 425-4357
[email-masked]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> From: Patrik Schindler <[email-masked]>
> Date: Tue, 28 Mar 2000 18:30:22 +0200
> To: netatalk Admins List <[email-masked]>
> Subject: Re: netatalk throughput problem (and more)
> Resent-From: [email-masked]
> Resent-Date: Tue, 28 Mar 2000 12:05:49 -0500 (EST)
>

---

From: David Blache <[email-masked]>
Date: Tue, 28 Mar 2000 12:18:11 -0600

No, that's not the same problem.  The problem I am having is that the MP3
stops playing altogether.  It's as if I pressed stop on the player.  They
aren't choppy that I can tell.  They just play for a couple seconds, and
then stop.

But until I resolve this new problem of not being able to connect, I can't
verify the behavior.  :(

-David

---

From: Ron Chmara <[email-masked]>
Date: Tue, 28 Mar 2000 11:19:07 -0700

> on my redhat i386 box.  I had to modify a couple MakeFiles to get it to

i386? Wow. That box is bound to have fairly low LAN bandwidth, probably
an 8 bit network card....

> what is the cause of this.

MP3 streams can be fairly bandwidth intensive to a 386 or a fairly active
lan.... normally, it wouldn't make much difference, but if your MP3 player
has a small buffer (so it's not proloading enough data), and you're using
ancient hardware, that just might be too slow to work... try increasing the
incoming buffer on the player.

> I get the distinct impression that --replacefiles was the wrong thing to do

rpm -U is what you generally want to use to Upgrade your existing
installation... --replacefiles can blow away your config informarion.

-Bop

--
Brought to you from boop!, the dual boot Linux/Win95 Compaq Presario 1625
laptop, currently running RedHat 6.1. Your bopping may vary.

---

From: David Blache <[email-masked]>
Date: Tue, 28 Mar 2000 12:27:05 -0600

> an 8 bit network card....

Oops no, I didn't mean to say that.  It's an AMD K6 300 running on an EPoX
EP-58 MVP3C-M motherboard.  I just meant to convey that in general I use the
i386 binaries.  I'll be more specific next time.

---

From: David Blache <[email-masked]>
Date: Tue, 28 Mar 2000 12:29:06 -0600

on 3/28/2000 12:19 PM, Ron Chmara at [email-masked] wrote:

> probably

Also, my network is 100 BaseT (100 megabit?) on all computers except my
gateway box, which is at 10 BaseT (due to the connection to a cable modem).

---

From: David Blache <[email-masked]>
Date: Tue, 28 Mar 2000 12:31:34 -0600

> incoming buffer on the player.

I think I should point out that I am not streaming them.  I am simply
sharing the directory over atalk and playing them "locally" on my iMac.  As
far as the mp3 player is concerned, it is playing a local mp3.  There is no
way to set the buffer for local playing AFAIK.

> installation... --replacefiles can blow away your config informarion.

Ok. Thanks.

---

From: "Seth D. Mattinen" <[email-masked]>
Date: Tue, 28 Mar 2000 11:39:25 -0800

> I'm using 2.1.3 myself and cannot reproduce your problems with SoundApp on a

I'm using 1.4b2+asun2.1.3 on LinuxPPC with unswitched 100Base-TX, and I've
played MP3 files before just like you're trying to do with no problems.

Are you getting excessive collisions if you're not using switches?
Have you tried to reproduce this problem on another Mac?

For what it's worth, I've also burned CD's off the netatalk server with a 4x
writer.

> It doesn't ask for a name or password.  It just can't connect.

Are your AppleShare volumes mounting with IP or AppleTalk? IP is much, much
faster than AppleTalk. Try restarting netatalk on the linux box, and do a
"Get Info" on the mounted server volume to see if it's using IP or
AppleTalk.

--
Seth D. Mattinen   [email-masked]   http://roller.reno.nv.us/
PGP Key: finger [email-masked]
There are two sides to every story. Every story has an end.

---

From: Patrik Schindler <[email-masked]>
Date: Wed, 29 Mar 2000 01:59:04 +0200 (MEST)

> when their connection is no longer valid.

Hm, they do here (Linux glibc 2.1, Kernel 2.2.14)

:wq! PoC

---

From: Patrik Schindler <[email-masked]>
Date: Wed, 29 Mar 2000 02:04:02 +0200 (MEST)

> an 8 bit network card....

So you want to tell us that a 386 isn't capable of getting a maximum of
256KBits per second transmitted?
Sorry, I cannot agree with this.

If you say AIFF or any other uncompressed data, I agree.

:wq! PoC

---

From: Patrik Schindler <[email-masked]>
Date: Wed, 29 Mar 2000 02:08:45 +0200 (MEST)

> SoundJam or SoundApp (happens with either one)

Nothing fairly strange...

> I'll have to verify if the same problem occurs with my other mac (Starmax

Done? What did you see?

>     No response from the server. Please try again.

Have a look at the syslog (/var/log/messages or such). What do you see if
you try to connect?
I guess you have TCP/IP configured right on this Mac ;-)
Does the pause vanish if you try to press the option key while
double-klicking the vault (establish only an AppleTalk Connection)?

> So atalkd and afpd are running.  I'm not sure what the problem is...  :/

Have a look at afpd.conf. Normally you don't need any thing set there in
(all comments).

:wq! PoC

---

From: Ron Chmara <[email-masked]>
Date: Tue, 28 Mar 2000 17:25:39 -0700

> Sorry, I cannot agree with this.

Well, It's no longer relevant, but if he was using, say, a 386 with 8Mb
of RAM, at a screamin 8Mhz, it wouldn't surprise me if it counldn't handle
the task of stearming at a fairly constant 256, in addition to any other
tasks that were imposed upon it.

-Bop

---

From: David Blache <[email-masked]>
Date: Tue, 28 Mar 2000 21:18:46 -0600

>> I'll have to verify if the same problem occurs with my other mac (Starmax

I can't verify this until I restore connectivity.  :(  (See below...)

> Have a look at the syslog (/var/log/messages or such). What do you see if

I don't see anything added to the messages log when i try to connect.  But I
do see this earlier in the log:

Mar 28 11:13:33 localdomain atalkd[529]: restart (1.4b2+asun2.1.3)
Mar 28 11:13:34 localdomain sendmail: sendmail startup succeeded
Mar 28 11:13:34 localdomain atalkd[529]: zip_getnetinfo for eth0
Mar 28 11:13:34 localdomain gpm: gpm startup succeeded
Mar 28 11:13:36 localdomain httpd: httpd startup succeeded
Mar 28 11:13:37 localdomain xfs: xfs startup succeeded
Mar 28 11:13:38 localdomain PAM_pwdb[612]: (su) session opened for user news
by (uid=0)
Mar 28 11:13:41 localdomain PAM_pwdb[612]: (su) session closed for user news
Mar 28 11:13:41 localdomain linuxconf: Linuxconf final setup
Mar 28 11:13:43 localdomain rc: Starting linuxconf succeeded
Mar 28 11:13:43 localdomain atalkd[529]: zip_getnetinfo for eth0
Mar 28 11:13:53 localdomain afpd[703]: Can't register Guest
Volume:AFPServer@*
Mar 28 11:13:53 localdomain afpd[703]: ASIP started on 10.1.0.3:548(1)
(1.4b2+asun2.1.3) 
Mar 28 11:13:53 localdomain atalkd[529]: zip_getnetinfo for eth0
Mar 28 11:14:01 localdomain logger: Brain was restarted.
Mar 28 11:14:03 localdomain afpd[703]: Can't register The Vault:AFPServer@*
Mar 28 11:14:03 localdomain afpd[703]: main: dsi_init: Address already in
use
Mar 28 11:14:03 localdomain atalkd[529]: config for no router
Mar 28 11:14:04 localdomain atalkd[529]: ready 0/0/0
Mar 28 11:14:04 localdomain atalk: atalkd startup succeeded
Mar 28 11:14:17 localdomain atalk: papd startup succeeded
Mar 28 11:14:17 localdomain papd[750]: restart (1.4b2+asun2.1.3)

So while The Vault does show up in the chooser, since no volumes were
registered, I can't connect?

I'm lost here.

> I guess you have TCP/IP configured right on this Mac ;-)

Yes.

> double-klicking the vault (establish only an AppleTalk Connection)?

No, holding Option down changes nothing.  :(

> Have a look at afpd.conf. Normally you don't need any thing set there in

There is nothing set in afpd.conf.  Someone advised me privately to add a
line to it.  But it was working before and nothing was in there.  So I am
really hesitant to do that.

Help! :(

-- 

   Never forget: 2 + 2 = 5 for extremely large values of 2.
|-------------------------------------------------------------|
| David Blache          Software Developer / Technical Writer |
|-------------------------------------------------------------|
| Microcosm Software    http://www.thesanctuary.com/microcosm |
|-------------------------------------------------------------|

---

From: David Blache <[email-masked]>
Date: Tue, 28 Mar 2000 21:45:59 -0600

>> It doesn't ask for a name or password.  It just can't connect.

I rebooted Linux (because I'm such a newbie, I had no idea how to restart
afpd and atalkd!), and now the server shows up and allows me to connect.  I
am playing an mp3 right now and so far so good - it hasn't stopped.  :)

> "Get Info" on the mounted server volume to see if it's using IP or

It says it is using AppleTalk.

What are the implications of switching it to TCP instead?  Will it be harder
to access?  Will I still use the chooser to get to it?  Will it be
transparent the way AppleTalk is now?

I just want to say thanks to all who have helped me!  This list and the
people on it are fantastic!  Thanks folks!  =)

-David

--

---

From: "Seth D. Mattinen" <[email-masked]>
Date: Tue, 28 Mar 2000 22:22:43 -0800

> am playing an mp3 right now and so far so good - it hasn't stopped.  :)

If you've got it in your init scripts, just run this as root:

/etc/rc.d/init.d/atalk stop
/etc/rc.d/init.d/atalk start

If it's not at that path, look in your /etc directory for init.d or rc.d,
and it'll be there somewhere. When you run the script without a start/stop,
it'll just say "Usage: atalk {start|stop}". That's the beauty of Linux,
don't have to restart the whole box except for kernel changes. =)

> transparent the way AppleTalk is now?

If you've got TCP/IP set up on the Mac, and on the Linux box, and TCP/IP is
generally happy everywhere, it should be using IP over AppleTalk first.
Using IP is just as transparent as using the Chooser. Older versions of
AppleShare didn't support IP, but all current ones do.

The advantage? It's a lot faster.

--
Seth D. Mattinen   [email-masked]   http://roller.reno.nv.us/
PGP Key: finger [email-masked]
Everything you want is not everything you need.

---

From: Marcus Radich <[email-masked]>
Date: Wed, 29 Mar 2000 19:10:34 +1200

Well, I part-own a Mac/Linux support company in New Zealand with 
several Linux boxes in Prepress and design (in fact, we offer a NT to 
Linux Upgrade!)

Our latest system is a Intel Lancewood motherboard with a PIII-550 
connected to 70GB Ultra2 RAID.
When you do a /sbin/hdparm -tT /dev/md0 on the machine, you get:
Timed cache buffers reads of 144MB/sec
Timed disk reads of 60.32MB/sec

That's a fast motherboard and a fast RAID...

Now, over 100BaseT from a Power Macintosh G4/450 using Appleshare 
over IP, we get 9.8MB/sec with Helios Lantest 2.5.2. Yes, that's 
MegaBytes...
Copying a 500MB scan to the server finishes in less than a minute. 
Our customers are impressed!

I use a modified version of asun214 37b, and it runs VERY well.

Just my input.....

mrad01

>The advantage? It's a lot faster.

========================================================

"Always ask the question, never assume the answer."
		Marcus Radich 1999

========================================================

---

From: Sak Wathanasin <[email-masked]>
Date: Wed, 29 Mar 2000 12:54:33 +0100

In reply to David Blache's message of the 28/03/00 at 21:18 -0600,

>registered, I can't connect?

I think this is due to a bug in one of the AppleShares; I saw that 
problem here for a while and it went away when I upgraded to the 
latest AppleShare client. Try grabbing the latest version for your OS 
from apple.com. I currently use 3.8.6 but I think that needs OS9; 
can't rememger what I used with 8.6, maybe 3.8.3.

-- 
Sak Wathanasin
Network Analysis Limited
178 Wainbody Ave South, Coventry CV3 6BX, UK

Internet: [email-masked]
Phone: (+44) 2476 419996        Mobile: (+44) 7970 751912 
Fax: (+44) 2476 690690

---

From: David Blache <[email-masked]>
Date: Wed, 29 Mar 2000 08:41:32 -0600

I think it was a problem with atalk on the Linux side.  Once I restarted
atalkd and afpd, all was well.  But thanks for the response!  The help I
have received on this list is nothing short of phenomenal! =)

-David

-- 

        Circular Definition: see Definition, Circular.
|-------------------------------------------------------------|
| David Blache          Software Developer / Technical Writer |
|-------------------------------------------------------------|
| Microcosm Software    http://www.thesanctuary.com/microcosm |
|-------------------------------------------------------------|

---

From: David Blache <[email-masked]>
Date: Wed, 29 Mar 2000 08:56:47 -0600

> don't have to restart the whole box except for kernel changes. =)

Ok.  I'll practice tonight starting and stopping atalk.  Thanks for the tip.
:)

-David

-- 

       A chicken is an egg's way of producing more eggs.
|-------------------------------------------------------------|
| David Blache          Software Developer / Technical Writer |
|-------------------------------------------------------------|
| Microcosm Software    http://www.thesanctuary.com/microcosm |
|-------------------------------------------------------------|

---

From: David Blache <[email-masked]>
Date: Wed, 29 Mar 2000 08:56:59 -0600

> The advantage? It's a lot faster.

Ok...

> Our customers are impressed!

Wow! That *is* impressive.  My speeds are nothing like that.  I barely light
up my 100 BT hub when I transfer files from my mac to my linux box!

So it looks like I am going to try to get IP up and running.  Can someone
tell me what needs to be done to make the switch?

-- 

  "Monopoly? No, we just don't want competition" --Microsoft
|-------------------------------------------------------------|
| David Blache          Software Developer / Technical Writer |
|-------------------------------------------------------------|
| Microcosm Software    http://www.thesanctuary.com/microcosm |
|-------------------------------------------------------------|

---

From: Patrik Schindler <[email-masked]>
Date: Wed, 29 Mar 2000 18:36:49 +0200

At 12:54 Uhr +0100 29.03.2000, Sak Wathanasin wrote:

>I currently use 3.8.6 but I think that needs OS9; 

I'm using 3.8.6 successfully under 7.6.1 with OT 1.3.

:wq! PoC