AW: read_socket_data: recv failure for 4

Russell, Toby Russell.Toby at
Sun Mar 3 22:16:06 GMT 2002

Thanks for replying. It seems like an old problem; I have seen many posts on
the net. I found this, which seems to apply to this particular problem (from

"Every so often these days (circa win98, win2k), we see error messages 
like the following showing up in the logs:
	[2000/09/08 18:06:24, 0]
	 write_socket_data: write failure. Error = Broken pipe
	[2000/10/05 11:08:16, 0] lib/util_sock.c:read_socket_data(477)
	 read_socket_data: recv failure for 1252. Error = Connection reset
	 by peer

  These are unexpected client disconnections, as seen by Samba.
Interestingly, they can also cause the client to report "The network is 
busy" while trying to (re-)map the file.

  If you happen to be using security = server, the Samba messages
can be eliminated by setting keepalive = 0.  If you are using any
other security setting, use keepalive = 30 to tell Samba to
clean up more often (this won't reduce the messages, though!)

  They usually indicates an error by the client, which caused
it to
	1) blue screen
	2) reboot
	3) silently disconect and reconnect.

  The latter is the annoying one... 

  The usual cause is a networking problem.  What the team's seen 
a lot lately are bad drivers for ethernet cards (especially on 
Windows ME) or mismatches between ethernet cards and hubs.

  Both ends of each connection between a hub and a machine must 
be running at the same speed, either 10 or 100 Mbit/S and at the 
same duplex setting (half- or full-duplex, sometimes called simplex 
and duplex)."

I have changed the keepalive setting and am waiting to see if this will fix

Toby Russell
(Applications Providing/UNIX)

Telefon          +49 (0) 30 72 62 3- 6669
Telefax          +49 (0) 30 72 62 3- 6689
Mobil             +49 (0) 172 6847428
E-Mail            Russell.Toby at
Internet          www.BerlinDat:de

Gesellschaft für Informationsverarbeitung und Systemtechnik mbH
Rohrdamm 7
13629 Berlin

-----Ursprüngliche Nachricht-----
Von: Sam Johnston [mailto:samj at]
Gesendet am: Freitag, 1. März 2002 23:06
An: samba-technical at
Betreff: read_socket_data: recv failure for 4

Hello all,

I've previously posted questions about read_socket_data: recv failure 
for 4 and have been receiving (with alarming regularity) requests for 
information about how to solve the problem, like this one:

I have samba running on a solaris 7 box and yesterday, for the first time,
on two seperate occasions, people were kicked off, and the log file filled
with the following messages:

[2002/02/28 15:03:54, 0] lib/util_sock.c:read_socket_data(477) 
  read_socket_data: recv failure for 4. Error = Connection reset by peer
[2002/02/28 15:03:54, 1] smbd/service.c:(583) 
  s03985 ( closed connection to service faktor_5
The stress is upon me. I have got to somehow work out what is wrong before
monday, and only the weekend lies between me and that dreaded day. Any help
would be greatly appreciated. FYI, samba is using an NT box as a password
server, and the samba/solaris box is on a different network to the clients
who experienced this problem yesterday.

Unfortunately I don't remember how I fixed it - I think I changed a 
handful of (not necessarily samba only) settings and restarted to 
resolve it. I recall something about name resolution - perhaps DNS PTR 



Sam Johnston
Australian Online Solutions
1300 132 809

More information about the samba-technical mailing list