[sctp-dev] We need your help: sctp sends more than 2000pakage/1secend

Chris Hegarty chris.hegarty at oracle.com
Wed Mar 25 16:27:22 UTC 2015


Hi,

I am not aware of any issues in this area. Would it be possible for you 
to create a minimal testcase that duplicates the issue, so that  I can 
try it locally?

-Chris.

On 25/03/15 06:52, xieqiang at zbeninfo.com wrote:
> Hi,
> My project uses sctp(sigtran),but We find a problem.
> OS:linux centos 6.4 X64
> JDK:jdk-7u51-linux-x64
> When client sends more than 2000pakage/1secend,throws some exception:
> java.net.SocketException: Connection reset by peer
> at sun.nio.ch.SctpChannelImpl.send0(Native Method)
> at
> sun.nio.ch.SctpChannelImpl.sendFromNativeBuffer(SctpChannelImpl.java:1039)
> at sun.nio.ch.SctpChannelImpl.send(SctpChannelImpl.java:991)
> at sun.nio.ch.SctpChannelImpl.send(SctpChannelImpl.java:971)
> at
> com.zbeninfo.protocols.sctp.AssociationImpl.doSendSctp(AssociationImpl.java:659)
> java.net.SocketException: Socket is shutdown for writing
> at sun.nio.ch.SctpChannelImpl.send0(Native Method)
> at
> sun.nio.ch.SctpChannelImpl.sendFromNativeBuffer(SctpChannelImpl.java:1039)
> at sun.nio.ch.SctpChannelImpl.send(SctpChannelImpl.java:991)
> at sun.nio.ch.SctpChannelImpl.send(SctpChannelImpl.java:971)
> at
> com.zbeninfo.protocols.sctp.AssociationImpl.doSendSctp(AssociationImpl.java:659)
> The connection is ok:
> [root at server-84 bin]# netstat -an|grep 2050
> sctp 192.168.1.84:2050 LISTEN
> sctp  231688 150296 192.168.1.84:2050 192.168.1.85:2050 ESTABLISHED
> Use tcp for test is ok.
> After Analysis ,We find:
> The client send INIT(outbound stream 32,inbound stream 32) ,
> The server receive INIT(outbound stream 32,inbound stream 32),
> But,com.sun.nio.sctp.Association.maxOutboundStreams() is 10.
> End of comm_up,the server send INIT_ACK (outbound stream 10,inbound
> stream 32).
> Could you please tell us what problem about this?
> Attach is  pcap file for tcpdump catch.
> snippetsofcode :
> class AssociationHandler extends
> AbstractNotificationHandler<AssociationImpl> {
> @Override
> public HandlerResult handleNotification(AssociationChangeNotification
> not, AssociationImpl associtaion) {
> switch (not.event()) {
> case COMM_UP:
> if (not.association() != null) {
> this.maxOutboundStreams = not.association().maxOutboundStreams();//get
> the vlaue is 10
> this.maxInboundStreams = not.association().maxInboundStreams();
> }
> if (logger.isInfoEnabled()) {
> logger.info(String.format("New association setup for Association=%s with
> %d outbound streams, and %d inbound streams.\n",
> associtaion.getName(), this.maxOutboundStreams, this.maxInboundStreams));
> }
> associtaion.createworkerThreadTable(Math.max(this.maxInboundStreams,
> this.maxOutboundStreams));
> try {
> associtaion.markAssociationUp();
> associtaion.getAssociationListener().onCommunicationUp(associtaion,
> this.maxInboundStreams, this.maxOutboundStreams);
> } catch (Exception e) {
> logger.error(String.format("Exception while calling onCommunicationUp on
> AssociationListener for Association=%s", associtaion.getName()), e);
> }
> return HandlerResult.CONTINUE;
> Toney
> from china.


More information about the sctp-dev mailing list