Solved

Samba Errors (Connection Reset by Peer) Problem

Posted on 2006-07-08
7
812 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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 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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

785 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