Solved

Samba Errors (Connection Reset by Peer) Problem

Posted on 2006-07-08
7
837 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 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
number in printf 13 42
Using Linux to replace Windows Server 2008 R2 for network drives 5 127
Linux FTP Error 5 44
Connect to CentOS (in a local VMWare VM) using Putty 7 135
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

680 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