From michal at traffixsystems.com Fri Jun 24 06:51:22 2011 From: michal at traffixsystems.com (Michal Lefler) Date: Fri, 24 Jun 2011 16:51:22 +0300 Subject: [sctp-dev] Problem in receiving notifications on SCTP channel events Message-ID: Hi. We use SCTP channel, with asynchronous reads by a selector. We are using it as we saw in the SCTP example: private boolean read(SelectionKey k) { final SctpChannel ch = ... ... MessageInfo messageInfo = ch.receive(bb, ch, associationHandler); ... In our associationHandler implementation, we override all the methods in "AbstractNotificationHandler", and for now, we simply write a log line for each. The problem is that we don't get any immediate notification when network interfaces are disconnected. It becomes very problematic when we have no more connected network interfaces left, and we don't get any notification for that. We do get few notifications after about a minute, which is far too late for us. We also don't get any other indication that anything is wrong. It doesn't seem as if the SCTP implementation notices that anything is wrong at all. When the network interfaces are back, the system is not recovering. Is there a way we can get any immediate notification (or any other indication, such as an exception) when network interfaces are disconnected? Thanks, Michal. Michal Lefler Chief Architect / Traffix Systems T +972(0)9-788-9237, M +972(0)52-534-0905 Skype michal.lefler We invite you to join the LinkedIn Diameter discussion group www.traffixsystems.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20110624/40ef7127/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 4710 bytes Desc: image001.jpg Url : http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20110624/40ef7127/attachment.jpe From chris.hegarty at oracle.com Fri Jun 24 08:41:08 2011 From: chris.hegarty at oracle.com (Chris Hegarty) Date: Fri, 24 Jun 2011 16:41:08 +0100 Subject: [sctp-dev] Problem in receiving notifications on SCTP channel events In-Reply-To: References: Message-ID: <4E04B014.9070009@oracle.com> Hi Michal, Notification of these events is being passed by the native SCTP stack to the Java implementation. If they are not coming in a timely manner then it may be that there is a property in the OS controlling the heartbeat timeout that could help. What platform are you running on? Another question, are you saying that the notification is slow because of the fact that the selector doesn't fire? or is it just that you happen to be using this model rather then blocking. Do you know if the same delay is seen when using blocking SCTP channels? I'm sorry but I haven't done much testing of this type of scenario. -Chris. On 06/24/11 02:51 PM, Michal Lefler wrote: > Hi. > > We use SCTP channel, with asynchronous reads by a selector. > > We are using it as we saw in the SCTP example: > > private boolean read(SelectionKey k) { > > final SctpChannel ch = ? > > ? > > MessageInfo messageInfo = ch.receive(bb, ch, associationHandler); > > ? > > In our associationHandler implementation, we override all the methods in > "AbstractNotificationHandler", > > and for now, we simply write a log line for each. > > The problem is that we don't get any immediate notification when network > interfaces are disconnected. > > It becomes very problematic when we have no more connected network > interfaces left, and we don't get any notification for that. > > We do get few notifications after about a minute, which is far too late > for us. > > We also don't get any other indication that anything is wrong. > > It doesn't seem as if the SCTP implementation notices that anything is > wrong at all. > > When the network interfaces are back, the system is not recovering. > > Is there a way we can get any immediate notification (or any other > indication, such as an exception) when network interfaces are disconnected? > > Thanks, Michal. > > *Michal Lefler* > > *Chief Architect* / *Traffix Systems* > > *T* +972(0)9-788-9237, *M* +972(0)52-534-0905 > > *Skype *michal.lefler > > *We invite you to join the** LinkedIn Diameter discussion group > *** > > www.traffixsystems.com > > Description: Description: Description: sig 1 > >