write_socket: Error writing 4 bytes to socket 5: ERRNO = Connection reset by peer

Kristis Makris kristis.makris at datasoft.com
Wed Jul 16 16:37:27 GMT 2003


I'm receiving the following error message using samba3-alpha23:

[2003/07/16 08:58:06, 0] lib/util_sock.c:get_socket_addr(878)
  getpeername failed. Error was Transport endpoint is not connected
[2003/07/16 08:58:06, 0] lib/util_sock.c:write_socket_data(384)
  write_socket_data: write failure. Error = Connection reset by peer
[2003/07/16 08:58:06, 0] lib/util_sock.c:write_socket(408)
  write_socket: Error writing 4 bytes to socket 5: ERRNO = Connection
reset by peer
[2003/07/16 08:58:06, 0] lib/util_sock.c:send_smb(569)
  Error writing 4 bytes to client. -1. (Connection reset by peer)

I've also seen this a few times with samba-2.2.7:

read_data: read failure for 4. Error = Connection reset by peer

Has anyone seen any similar errors messages in
/var/log/samba/<client_machine>.log ?

I have one machine (A) running as a file server using samba that comes
with the RH7.3 package samba-2.2.7-3.7.3. That machine is configured to
forward authentication to another machine (B) that runs samba3-alpha23
authenticating against an LDAP database which resides also on machine B.

This happens at least a couple of times an hour, usually when saving a
Word document to machine A, with the result of Word popping out an error
message saying that there was an error saving the document.

Machine A has the following in its smb.conf

  oplock break wait time = 10
  kernel oplocks = no

  oplocks = no
  level2 oplocks = no

which were set in the past to avoid these error messages and the
problems they caused (files_share becoming disconnected):

[2003/05/02 16:06:07, 0] smbd/oplock.c:oplock_break(796)
  oplock_break: receive_smb timed out after 30 seconds.
  oplock_break failed for file <somefilename_went_there>.doc (dev =
3a02, inode = 560363, file_id = 24).
[2003/05/02 16:06:07, 0] smbd/oplock.c:oplock_break(868)
  oplock_break: client failure in oplock break in file

Nobody has login access to either machines A or B, so there's no way 
files on them where modified while they were also used by samba. I am 
using various Win2K client machines (+SP3/+SP4) and still get the same
"write_socket:" error message. machine A is running the LVM on RedHat
7.3 using kernel 2.4.20-13.7, and the files_share is served off of a
logical volume, but I don't see any lvm-related error messages anywhere
in /var/log/messages so I don't think that's in any way related.

I've seen other people post similar reports in the past but never caught
a reply to them (or at least Google won't show me one).

The most recent one was posted by Nicholas McDowell using samba 2.2.7
(http://lists.samba.org/pipermail/samba/2003-April/094174.html), still
with no response.

What does "Connection reset by peer" mean ? That the client closed the
connection ? Why would that happen ?


More information about the samba-technical mailing list