[Samba] The Infamous "read_data: read failure for 4 bytes"

Phil sentry0 at gmail.com
Wed Mar 5 21:17:35 GMT 2008


Hello all,

I'm far from being a samba expert and truth be told I could use some
education on networking in general but here it is...

I have a stand alone samba server that I use a stunnel to connect to.  Reads
take place fine from the server but writes *always* fail exactly one time
per open session, but if you immediately try to copy the file again it will
work (without closing the window), in fact all file transfers will work
perfectly beyond this point.  By open session I mean from the time you open
up the network drive to the time you close the window.  On the client side I
receive the message "Cannot copy FILENAME: The specified network name is no
longer available.", in the server logs I see the following;

Mar  5 15:59:52 HOSTNAME smbd[13086]: [2008/03/05 15:59:52, 0]
lib/util_sock.c:read_data(534)
Mar  5 15:59:52 HOSTNAME smbd[13086]:   read_data: read failure for 4 bytes
to client 127.0.0.1. Error = Connection reset by peer

My OS is CentOS 5, kernel 2.6.18-53.1.13.el5, samba version 3.0.25b, selinux
is in Permissive mode.

My Samba config file (relevent portions);

[global]
        workgroup = WORKGROUP
        server string = File Server
        security = user
        passdb backend = tdbsam
        smb ports = 139
        socket address = 127.0.0.1
        disable netbios = yes

[homes]
        comment = Home Directories
        read only = No
        browseable = No
        create mask = 0660
        security mask = 0660
        directory mask = 0771
        directory security mask = 0771
[shared]
        comment = Common Directory
        path = /home/shares/shared/
        valid users = @GROUPNAME
        force user = root
        force group = GROUPNAME
        read only = No
        create mask = 0660
        security mask = 0660
        directory mask = 0771
        directory security mask = 0771
        available = yes

I won't bother posting my stunnel config files at this point as this is a
samba list.  I'll make them available if requested.

Any help would be greatly appreciated as this is a production server.

Regards.


More information about the samba mailing list