Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2005 10:23:14 +1100
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Deomid Ryabkov <myself@rojer.pp.ru>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: occasional ECONNREFUSED when connect()ing.
Message-ID:  <20050218232313.GA80993@cirb503493.alcatel.com.au>
In-Reply-To: <4215EB31.8020107@rojer.pp.ru>
References:  <4215EB31.8020107@rojer.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2005-Feb-18 16:18:41 +0300, Deomid Ryabkov wrote:
>I have a strange case of occasional refused connect()'s.
>The system is running 4.10-STABLE.
...
>The question is - why do connections get refused at all?
>I can think of no valid reasons...

FWIW, I can't either.  The client is single-threaded so it's difficult
to see why this should occur.  Unfortunately, I don't have ready
access to a 4.x system with perl 5.8 but I don't see the problem with
FreeBSD 5.3.

Is there anything unusual about the system (eg SMP)?
Can you reproduce the problem on a different system running FreeBSD?
Is there anything reported on the console or syslog'd?
Have you tried looking at various netstat output to see if anything looks odd?
Have you tried tcpdump'ing lo0 and seeing if you can correlate the failures
with something in the TCP/IP packets?
Has this worked in the past?  If so, can you give an indication of when it
last worked and when it failed (as update times or similar).
Do you see the same behaviour when the client and server are on different
systems (which would point to a problem in lo(4))?

If no-one pops up and recognizes these symptoms, you could try building
a kernel with 'options TCPDEBUG' and doing setsockopt(...,SO_DEBUG) in
the client and/or server processes.  This may provide some clues, though
it will generate a lot of console output (and you'll probably need to
UTSL to understand the output).

-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050218232313.GA80993>