Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Samba Errors (Connection Reset by Peer) Problem

Posted on 2006-07-08
7
Medium Priority
?
931 Views
Last Modified: 2010-05-18
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
0
Comment
Question by:thomaswright
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 2000 total points
ID: 17064777
Nothing obviously 'wrong' springs to mind, and this is an intermittent failure - the most difficult of all error types to fault find, and the exact process that you use will depend on your circumstances/wiring and parts available.

If this periodic problem is occurring on all Win XP systems, my approach would first (as you've done), try swapping the router (which is common to all connections, then keep trying the other bits as follows:

1.   Check cable between samba server and router.
2.   Swap ethernet card slot to be as close as possible to the CPU
3.   Replace ethernet card in samba server
4.   Motherboard in server - ? error on bus. Memory or CPU or other parts of the server will not give consistent errors of the form you have got.

(   (()
(`-' _\
 ''  ''
0
 
LVL 88

Expert Comment

by:rindi
ID: 17065767
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...
0
 
LVL 3

Author Comment

by:thomaswright
ID: 17065812
Hmm, yes, there is a workstation which is wireless.  I like the idea of the static ip's too. I will try that.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 88

Expert Comment

by:rindi
ID: 17065846
What a word, "Temporary static IP". If that isn't a contradiction... :)
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17066593
>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.

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

0
 
LVL 12

Expert Comment

by:ibu1
ID: 17079499
try adding the following in your smb.conf file's global section.

smb ports = 139

then restart smb.

0
 
LVL 3

Author Comment

by:thomaswright
ID: 17439810
Sorry for the delay! The problem was actually a bad hard drive. Thanks to everyone.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month6 days, 10 hours left to enroll

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question