From amit.bhayani at gmail.com Mon Jun 3 05:54:59 2013 From: amit.bhayani at gmail.com (Amit Bhayani) Date: Mon, 3 Jun 2013 18:24:59 +0530 Subject: [sctp-dev] How to force reuse of address? Message-ID: Hi Guys, I was looking for way to set the SO_REUSEADDR option for SctpChannel, however didn't find any. 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 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20130603/0054940b/attachment.html From chris.hegarty at oracle.com Tue Jun 4 09:31:14 2013 From: chris.hegarty at oracle.com (Chris Hegarty) Date: Tue, 4 Jun 2013 09:31:14 -0700 (PDT) Subject: [sctp-dev] How to force reuse of address? In-Reply-To: References: Message-ID: <51AE1652.3050806@oracle.com> 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. From amit.bhayani at gmail.com Tue Jun 11 22:27:04 2013 From: amit.bhayani at gmail.com (Amit Bhayani) Date: Wed, 12 Jun 2013 10:57:04 +0530 Subject: [sctp-dev] How to force reuse of address? In-Reply-To: <51AE1652.3050806@oracle.com> References: <51AE1652.3050806@oracle.com> Message-ID: Thanks a lot Chris, however I don't see SCTP_REUSE_PORT option in http://openjdk.java.net/projects/sctp/javadoc/com/sun/nio/sctp/SctpStandardSocketOption.html Cheers, Amit On Tue, Jun 4, 2013 at 10:01 PM, Chris Hegarty wrote: > 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. >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20130612/2b2775ef/attachment.html From chris.hegarty at oracle.com Thu Jun 13 03:22:58 2013 From: chris.hegarty at oracle.com (Chris Hegarty) Date: Thu, 13 Jun 2013 11:22:58 +0100 Subject: [sctp-dev] How to force reuse of address? In-Reply-To: References: <51AE1652.3050806@oracle.com> Message-ID: <51B99D82.7060108@oracle.com> On 06/12/2013 06:27 AM, Amit Bhayani wrote: > Thanks a lot Chris, however I don't see SCTP_REUSE_PORT option in > http://openjdk.java.net/projects/sctp/javadoc/com/sun/nio/sctp/SctpStandardSocketOption.html Right, this option was only added to the socket extensions RFC after SctpStandardSocketOption was created. I will need to see which platforms support it. -Chris. > Cheers, > Amit > > > On Tue, Jun 4, 2013 at 10:01 PM, Chris Hegarty > wrote: > > 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. > >