Link to home
Start Free TrialLog in
Avatar of thomaswright
thomaswright

asked on

Samba Errors (Connection Reset by Peer) Problem

I have Samba Setup Running on a Fedora Core 4 Linux box. The workstations are all Windows XP Pro.  Users are losing their connection to the samba box periodically.  The error log is reporting 'connect reset by peer' messages and socket write and send errors.  There has been no change in the smb.conf file and it has been working for over a year without an issue.  I replaced the router to see if it alleviates the problem but it didn't help.  Any insight would be appreciated.


Jul  8 02:30:39 localhost smbd[4493]: [2006/07/08 02:30:39, 0] lib/util_sock.c:get_peer_addr(1000)
Jul  8 02:30:39 localhost smbd[4493]:   getpeername failed. Error was Transport endpoint is not connected
Jul  8 02:30:39 localhost smbd[4493]: [2006/07/08 02:30:39, 0] lib/util_sock.c:write_socket_data(430)
Jul  8 02:30:39 localhost smbd[4493]:   write_socket_data: write failure. Error = Connection reset by peer
Jul  8 02:30:39 localhost smbd[4493]: [2006/07/08 02:30:39, 0] lib/util_sock.c:write_socket(455)
Jul  8 02:30:39 localhost smbd[4493]:   write_socket: Error writing 4 bytes to socket 22: ERRNO = Connection reset by peer
Jul  8 02:30:39 localhost smbd[4493]: [2006/07/08 02:30:39, 0] lib/util_sock.c:send_smb(647)
Jul  8 02:30:39 localhost smbd[4493]:   Error writing 4 bytes to client. -1. (Connection reset by peer)
Jul  8 02:31:24 localhost smbd[4495]: [2006/07/08 02:31:24, 0] lib/util_sock.c:get_peer_addr(1000)
Jul  8 02:31:24 localhost smbd[4495]:   getpeername failed. Error was Transport endpoint is not connected
Jul  8 02:31:24 localhost smbd[4495]: [2006/07/08 02:31:24, 0] lib/util_sock.c:write_socket_data(430)
Jul  8 02:31:24 localhost smbd[4495]:   write_socket_data: write failure. Error = Connection reset by peer
Jul  8 02:31:24 localhost smbd[4495]: [2006/07/08 02:31:24, 0] lib/util_sock.c:write_socket(455)
Jul  8 02:31:24 localhost smbd[4495]:   write_socket: Error writing 4 bytes to socket 22: ERRNO = Connection reset by peer
Jul  8 02:31:24 localhost smbd[4495]: [2006/07/08 02:31:24, 0] lib/util_sock.c:send_smb(647)
Jul  8 02:31:24 localhost smbd[4495]:   Error writing 4 bytes to client. -1. (Connection reset by peer)


Here is the smb.conf file

[global]
workgroup = WORKGROUP
netbios name = SAMUEL
server string = linux_server
printcap name = /etc/printcap
load printers = no
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY IPTOS_LOWDELAY
domain master = Yes
local master = Yes
preferred master = Yes
name resolve order = lmhosts host bcast
password server = None
security = SHARE
guest ok = yes
dns proxy = no
force create mode = 0777
force directory mode = 0777
#guest account = guest

[data]
comment = Shared Folder
path = /data
writeable = yes
guest ok = yes
read only = No
create mask = 0771
directory mask = 0771
oplocks = No
case sensitive = no
default case = lower
preserve case = no
short preserve case = no
level2 oplocks = no
inherit permissions = yes
browsable = yes
#force group = users
#force user = smbuser
ASKER CERTIFIED SOLUTION
Avatar of pjedmond
pjedmond
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rindi
Are the users getting disconnected using a wireless connection that might have lost it's connectivity (happens often)? Are you using a DHCP Server that may be resetting it's leases? Try to use a temporary static IP address on some of the clients that are loosing the connection to find out if it is a dhcp problem...
Avatar of thomaswright
thomaswright

ASKER

Hmm, yes, there is a workstation which is wireless.  I like the idea of the static ip's too. I will try that.
What a word, "Temporary static IP". If that isn't a contradiction... :)
>Hmm, yes, there is a workstation which is wireless.

Unless there's a very good reason for this, then you are getting reduced and less bandwidth. Wireless in the UK is virtually all at the 2.4GHz area on the spectrum. This frequency is absorbed remarkably well by water...and guess what...humans are about 80% water. Therefore when a human walks between this workstation and the wireless node, there is a fairly high chance of a momentary disconnection occurring!

Allow for the fact that people absorb this frequency, and that by adding wireless networks you are adding more radiation for absorption (plus the fact I've seen seagulls fall off microwave antennaes after being 'cooked') and the fact that wireless is another (potential) security hole, then I personally dislike wireless and forbid it on any of the sites that I work at. If someone wants a connection, then they get a trailing cat 5e cable.

(   (()
(`-' _\
 ''  ''

try adding the following in your smb.conf file's global section.

smb ports = 139

then restart smb.

Sorry for the delay! The problem was actually a bad hard drive. Thanks to everyone.