[sctp-dev] How to force reuse of address?

Chris Hegarty chris.hegarty at oracle.com
Tue Jun 4 09:31:14 PDT 2013


On 06/03/2013 01:54 PM, Amit Bhayani wrote:
> Hi Guys,
>
> I was looking for way to set the SO_REUSEADDR option for SctpChannel,
> however didn't find any.

Right, currently the SCTP channels do no support SO_REUSEADDR. Though, I 
don't see any reason why they could not. That said, there appears to be 
a more specific SCTP option for this, SCTP_REUSE_PORT.

Is this something that would benefit you, if it were added?

> Basically in my linux OS once the socket goes down for what ever reason,
> the application tries to bring it up gain in few seconds. However it
> keeps throwing below exception
>
> Even after waiting for long time (more than an hour), this exception
> doesn't go

This is very strange, can you get the output of netstat when in this state?

-Chris.

>
>
> 64 [main] ERROR org.mobicents.protocols.sctp.ManagementImpl - Error
> while initiating Server=srvr1
> java.net.BindException: Address already in use
> at sun.nio.ch.Net.bind0(Native Method)
> at sun.nio.ch.Net.bind(Net.java:344)
> at sun.nio.ch.Net.bind(Net.java:336)
> at sun.nio.ch.SctpServerChannelImpl.bind(SctpServerChannelImpl.java:109)
> at com.sun.nio.sctp.SctpServerChannel.bind(SctpServerChannel.java:184)
> at
> org.mobicents.protocols.sctp.ServerImpl.doInitSocketSctp(ServerImpl.java:182)
>
>
>
> I am guessing that  SO_REUSEADDR should solve it.
>
> Do you guys think I am looking at right direction or completely missing it?
>
> Thanks a ton
>
> Amit.


More information about the sctp-dev mailing list