Solved

Samba Errors (Connection Reset by Peer) Problem

Posted on 2006-07-08
7
794 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 500 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 87

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
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 87

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now