All of lore.kernel.org
 help / color / mirror / Atom feed
* Address already in use problem
@ 2016-09-21 13:44 ` Sun Paul
  0 siblings, 0 replies; 15+ messages in thread
From: Sun Paul @ 2016-09-21 13:44 UTC (permalink / raw)
  To: linux-sctp, linux-kernel

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.

Is there anyone know how we can resolve this?

-RBK

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Address already in use problem
@ 2016-09-21 13:44 ` Sun Paul
  0 siblings, 0 replies; 15+ messages in thread
From: Sun Paul @ 2016-09-21 13:44 UTC (permalink / raw)
  To: linux-sctp, linux-kernel

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.

Is there anyone know how we can resolve this?

-RBK

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
  2016-09-21 13:44 ` Sun Paul
@ 2016-09-21 14:04   ` Marcelo Ricardo Leitner
  -1 siblings, 0 replies; 15+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-09-21 14:04 UTC (permalink / raw)
  To: Sun Paul; +Cc: linux-sctp, linux-kernel

Hi,

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.
> 
> Is there anyone know how we can resolve this?

Which kernel are you using? Depending on it, that may be fixed by a
recent patchset from Xin Long, 'sctp: fix the transmit err process'
patchset more exactly.

  Marcelo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
@ 2016-09-21 14:04   ` Marcelo Ricardo Leitner
  0 siblings, 0 replies; 15+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-09-21 14:04 UTC (permalink / raw)
  To: Sun Paul; +Cc: linux-sctp, linux-kernel

Hi,

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.
> 
> Is there anyone know how we can resolve this?

Which kernel are you using? Depending on it, that may be fixed by a
recent patchset from Xin Long, 'sctp: fix the transmit err process'
patchset more exactly.

  Marcelo


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
  2016-09-21 14:04   ` Marcelo Ricardo Leitner
@ 2016-09-21 14:15     ` Sun Paul
  -1 siblings, 0 replies; 15+ messages in thread
From: Sun Paul @ 2016-09-21 14:15 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner; +Cc: linux-sctp, linux-kernel

Hi

we are using redhat 2.6.32-642.4.2.el6.x86_64

On Wed, Sep 21, 2016 at 10:04 PM, Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
> Hi,
>
> 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.
>>
>> Is there anyone know how we can resolve this?
>
> Which kernel are you using? Depending on it, that may be fixed by a
> recent patchset from Xin Long, 'sctp: fix the transmit err process'
> patchset more exactly.
>
>   Marcelo
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
@ 2016-09-21 14:15     ` Sun Paul
  0 siblings, 0 replies; 15+ messages in thread
From: Sun Paul @ 2016-09-21 14:15 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner; +Cc: linux-sctp, linux-kernel

Hi

we are using redhat 2.6.32-642.4.2.el6.x86_64

On Wed, Sep 21, 2016 at 10:04 PM, Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
> Hi,
>
> 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.
>>
>> Is there anyone know how we can resolve this?
>
> Which kernel are you using? Depending on it, that may be fixed by a
> recent patchset from Xin Long, 'sctp: fix the transmit err process'
> patchset more exactly.
>
>   Marcelo
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
  2016-09-21 14:15     ` Sun Paul
@ 2016-09-21 14:21       ` Marcelo Ricardo Leitner
  -1 siblings, 0 replies; 15+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-09-21 14:21 UTC (permalink / raw)
  To: Sun Paul; +Cc: linux-sctp, linux-kernel

On Wed, Sep 21, 2016 at 10:15:43PM +0800, Sun Paul wrote:
> Hi
> 
> we are using redhat 2.6.32-642.4.2.el6.x86_64
> 
> On Wed, Sep 21, 2016 at 10:04 PM, Marcelo Ricardo Leitner
> <marcelo.leitner@gmail.com> wrote:
> > Hi,
> >
> > 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.
> >>
> >> Is there anyone know how we can resolve this?
> >
> > Which kernel are you using? Depending on it, that may be fixed by a
> > recent patchset from Xin Long, 'sctp: fix the transmit err process'
> > patchset more exactly.
> >
> >   Marcelo

Ah no, then that's another thing. If you cannot test/use an upstream
kernel, then I'd recommend you to open a support case/bug with them.

Thanks,
Marcelo

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
@ 2016-09-21 14:21       ` Marcelo Ricardo Leitner
  0 siblings, 0 replies; 15+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-09-21 14:21 UTC (permalink / raw)
  To: Sun Paul; +Cc: linux-sctp, linux-kernel

On Wed, Sep 21, 2016 at 10:15:43PM +0800, Sun Paul wrote:
> Hi
> 
> we are using redhat 2.6.32-642.4.2.el6.x86_64
> 
> On Wed, Sep 21, 2016 at 10:04 PM, Marcelo Ricardo Leitner
> <marcelo.leitner@gmail.com> wrote:
> > Hi,
> >
> > 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.
> >>
> >> Is there anyone know how we can resolve this?
> >
> > Which kernel are you using? Depending on it, that may be fixed by a
> > recent patchset from Xin Long, 'sctp: fix the transmit err process'
> > patchset more exactly.
> >
> >   Marcelo

Ah no, then that's another thing. If you cannot test/use an upstream
kernel, then I'd recommend you to open a support case/bug with them.

Thanks,
Marcelo


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
  2016-09-21 13:44 ` Sun Paul
@ 2016-09-21 15:43   ` Neil Horman
  -1 siblings, 0 replies; 15+ messages in thread
From: Neil Horman @ 2016-09-21 15:43 UTC (permalink / raw)
  To: Sun Paul; +Cc: linux-sctp, linux-kernel

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.

Neil

> Is there anyone know how we can resolve this?
> 
> -RBK
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
@ 2016-09-21 15:43   ` Neil Horman
  0 siblings, 0 replies; 15+ messages in thread
From: Neil Horman @ 2016-09-21 15:43 UTC (permalink / raw)
  To: Sun Paul; +Cc: linux-sctp, linux-kernel

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.

Neil

> Is there anyone know how we can resolve this?
> 
> -RBK
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Address already in use problem
  2016-09-21 15:43   ` Neil Horman
  (?)
@ 2016-09-21 15:56   ` David Laight
  2016-09-21 16:12       ` Neil Horman
  -1 siblings, 1 reply; 15+ messages in thread
From: David Laight @ 2016-09-21 15:56 UTC (permalink / raw)
  To: 'Neil Horman', Sun Paul; +Cc: linux-sctp, linux-kernel

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
  2016-09-21 15:56   ` David Laight
@ 2016-09-21 16:12       ` Neil Horman
  0 siblings, 0 replies; 15+ messages in thread
From: Neil Horman @ 2016-09-21 16:12 UTC (permalink / raw)
  To: David Laight; +Cc: Sun Paul, linux-sctp, linux-kernel

On Wed, Sep 21, 2016 at 03:56:41PM +0000, David Laight wrote:
> 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.
> 

True, but there is also no guarantee that the other application that claimed the
port in question is using SCTP.
Neil

> 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
> 
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
@ 2016-09-21 16:12       ` Neil Horman
  0 siblings, 0 replies; 15+ messages in thread
From: Neil Horman @ 2016-09-21 16:12 UTC (permalink / raw)
  To: David Laight; +Cc: Sun Paul, linux-sctp, linux-kernel

On Wed, Sep 21, 2016 at 03:56:41PM +0000, David Laight wrote:
> 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.
> 

True, but there is also no guarantee that the other application that claimed the
port in question is using SCTP.
Neil

> 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
> 
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
  2016-09-21 14:21       ` Marcelo Ricardo Leitner
@ 2016-09-21 17:28         ` Xin Long
  -1 siblings, 0 replies; 15+ messages in thread
From: Xin Long @ 2016-09-21 17:28 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner; +Cc: Sun Paul, linux-sctp, LKML

On Wed, Sep 21, 2016 at 10:21 PM, Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
> On Wed, Sep 21, 2016 at 10:15:43PM +0800, Sun Paul wrote:
>> Hi
>>
>> we are using redhat 2.6.32-642.4.2.el6.x86_64
>>
>> On Wed, Sep 21, 2016 at 10:04 PM, Marcelo Ricardo Leitner
>> <marcelo.leitner@gmail.com> wrote:
>> > Hi,
>> >
>> > Which kernel are you using? Depending on it, that may be fixed by a
>> > recent patchset from Xin Long, 'sctp: fix the transmit err process'
>> > patchset more exactly.
>> >
>> >   Marcelo
>
> Ah no, then that's another thing. If you cannot test/use an upstream
> kernel, then I'd recommend you to open a support case/bug with them.
>
It may be still this issue, I checked the codes of 2.6.32-642.
It's not using sctp_datamsg_free, which means once sctp_primitive_SEND
fail to send msg because of the asoc->state is unavailable, chunks have no
chance to be freed, and they hold asoc each one. so Address already in use.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Address already in use problem
@ 2016-09-21 17:28         ` Xin Long
  0 siblings, 0 replies; 15+ messages in thread
From: Xin Long @ 2016-09-21 17:28 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner; +Cc: Sun Paul, linux-sctp, LKML

On Wed, Sep 21, 2016 at 10:21 PM, Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
> On Wed, Sep 21, 2016 at 10:15:43PM +0800, Sun Paul wrote:
>> Hi
>>
>> we are using redhat 2.6.32-642.4.2.el6.x86_64
>>
>> On Wed, Sep 21, 2016 at 10:04 PM, Marcelo Ricardo Leitner
>> <marcelo.leitner@gmail.com> wrote:
>> > Hi,
>> >
>> > Which kernel are you using? Depending on it, that may be fixed by a
>> > recent patchset from Xin Long, 'sctp: fix the transmit err process'
>> > patchset more exactly.
>> >
>> >   Marcelo
>
> Ah no, then that's another thing. If you cannot test/use an upstream
> kernel, then I'd recommend you to open a support case/bug with them.
>
It may be still this issue, I checked the codes of 2.6.32-642.
It's not using sctp_datamsg_free, which means once sctp_primitive_SEND
fail to send msg because of the asoc->state is unavailable, chunks have no
chance to be freed, and they hold asoc each one. so Address already in use.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-09-21 17:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21 13:44 Address already in use problem Sun Paul
2016-09-21 13:44 ` Sun Paul
2016-09-21 14:04 ` Marcelo Ricardo Leitner
2016-09-21 14:04   ` Marcelo Ricardo Leitner
2016-09-21 14:15   ` Sun Paul
2016-09-21 14:15     ` Sun Paul
2016-09-21 14:21     ` Marcelo Ricardo Leitner
2016-09-21 14:21       ` Marcelo Ricardo Leitner
2016-09-21 17:28       ` Xin Long
2016-09-21 17:28         ` Xin Long
2016-09-21 15:43 ` Neil Horman
2016-09-21 15:43   ` Neil Horman
2016-09-21 15:56   ` David Laight
2016-09-21 16:12     ` Neil Horman
2016-09-21 16:12       ` Neil Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.