Uploaded image for project: 'ZZZ-WSO2 ESB'
  1. ZZZ-WSO2 ESB
  2. ESBJAVA-4915

"No buffer space available (maximum connections reached?)" error during WebSocket transfer

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.0.0-RC4
    • Fix Version/s: 5.1.0
    • Component/s: Inbound Endpoints
    • Labels:
      None
    • Severity:
      Major
    • Estimated Complexity:
      Moderate
    • Test cases added:
      Yes

      Description

      WSO2 ESB websocket transfer opens many TCP ports without closing it.
      After few hours of working on environment, WSO2 is showing exception like below:

      Caused by: java.io.IOException: Unable to establish loopback connection
      	at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:101)
      	at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:68)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:170)
      	at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
      	at java.nio.channels.Pipe.open(Pipe.java:155)
      	at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
      	at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
      	at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:126)
      	... 40 more
      Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): connect
      	at sun.nio.ch.Net.connect0(Native Method)
      	at sun.nio.ch.Net.connect(Net.java:454)
      	at sun.nio.ch.Net.connect(Net.java:446)
      	at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
      	at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
      	at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:130)
      	at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:83)
      

      Attached:

      • WSO2 project, just copied from SourceView (in WSO2 ESB management console),
      • list of open ports after few minutes of running project,
      • example html file to perform tests with HTTP endpoint and WebSocket configured in WSO2 ESB
      • stack trace of the error on testing environment

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kevin@wso2.com Kevin Ratnasekera
                Reporter:
                adam.d.zareba@gmail.com Adam Zaręba
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: