mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Neil Horman'" <nhorman@tuxdriver.com>, Sun Paul <paulrbk@gmail.com>
Cc: "linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: Address already in use problem
Date: Wed, 21 Sep 2016 15:56:41 +0000	[thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB010623F@AcuExch.aculab.com> (raw)
In-Reply-To: <20160921154304.GB13620@hmsreliant.think-freely.org>

From: Neil Horman
> Sent: 21 September 2016 16:43
> On Wed, Sep 21, 2016 at 09:44:30PM +0800, Sun Paul wrote:
> > Hi
> >
> > we have an SCTP application running in JAVA. and we found that there
> > is a problem when we as a client trying to connect to a remote IP
> > address.
> >
> > If the remote IP address is not accessible, our application will keep
> > retrying to connect using a self-defined local port address, says
> > 51001,
> >
> > We found that after sometimes, says 2 hrs, this port 51001 is never
> > able to bind to us again. even we tried to restart the application.
> >
> Sounds like you have another application that inadvertently bound to that port.
> Its not a privlidged port, nor is it well known, so it seems plausible that
> another application would eventually bind to it.  Thats not a bug, just the way
> ip works.
> 
> run netstat -anp | grep 51001
> 
> And see what application is holding the port.

Not much chance of a distro having a netstat that gives sctp info.
You might find something in /proc/net/sctp.

3.18 contains a fix for a problem with shutdown() being called
after the remote sends an INIT to restart an active connection
when there is unacked data.
If that happens the socket isn't released ever.

A workaround is to use SO_LINGER to get the connection aborted.

	David

  reply	other threads:[~2016-09-21 15:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 13:44 Sun Paul
2016-09-21 14:04 ` Marcelo Ricardo Leitner
2016-09-21 14:15   ` Sun Paul
2016-09-21 14:21     ` Marcelo Ricardo Leitner
2016-09-21 17:28       ` Xin Long
2016-09-21 15:43 ` Neil Horman
2016-09-21 15:56   ` David Laight [this message]
2016-09-21 16:12     ` Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=063D6719AE5E284EB5DD2968C1650D6DB010623F@AcuExch.aculab.com \
    --to=david.laight@aculab.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=paulrbk@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®