org.apache.mina.common.RuntimeIOException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Apache MINA Developement
    via by Unknown author,
  • Close ioSession
    via by Jannie Pieterse,
  • Vert.x performance tests
    via by Gianluca Lupo,
  • When attempting to use Tyrus for load testing client websocket applications, Tyrus would throw an exception after approximately 1500 websocket connections were established. What is very odd is that this seemed to be irregardless of whether it is one process or multiple processes, so it appears to be a systemwide limit. When using other client libraries (for example, the websocket client implementation from Tomcat or Netty's client implementation) this limitation does not exist, so it appears to be an issue with Tyrus. Below are the exceptions that are generated when the limit is reached. The first exception occurs once, and the second occurs on each subsequent attempt to open a client websocket. 2013-11-20 12:18:22.842-0500 [L: ERROR] [O: c.t.t.t.ClientTask] [T: pool-2-thread-36] Error during task execution java.net.BindException: Address already in use: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_45] at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) ~[na:1.7.0_45] at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync(TCPNIOConnectorHandler.java:206) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected(TCPNIOConnectorHandler.java:154) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect(TCPNIOConnection.java:258) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.executeIoEvent(WorkerThreadIOStrategy.java:101) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:406) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:375) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:339) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:271) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) ~[grizzly-framework-2.3.7.jar:2.3.7] at java.lang.Thread.run(Unknown Source) [na:1.7.0_45] 2013-11-20 12:18:22.842-0500 [L: ERROR] [O: c.t.t.t.ClientTask] [T: pool-2-thread-29] Error during task execution java.net.SocketException: No buffer space available (maximum connections reached?): connect at sun.nio.ch.Net.connect0(Native Method) ~[na:1.7.0_45] at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.7.0_45] at sun.nio.ch.Net.connect(Unknown Source) ~[na:1.7.0_45] at sun.nio.ch.SocketChannelImpl.connect(Unknown Source) ~[na:1.7.0_45] at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.connectAsync(TCPNIOConnectorHandler.java:133) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.AbstractSocketConnectorHandler.connect(AbstractSocketConnectorHandler.java:91) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.grizzly.AbstractSocketConnectorHandler.connect(AbstractSocketConnectorHandler.java:79) ~[grizzly-framework-2.3.7.jar:2.3.7] at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientSocket.connect(GrizzlyClientSocket.java:249) ~[tyrus-container-grizzly-client-1.3.jar:na] at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientContainer.openClientSocket(GrizzlyClientContainer.java:95) ~[tyrus-container-grizzly-client-1.3.jar:na] at org.glassfish.tyrus.client.ClientManager$1.run(ClientManager.java:402) ~[tyrus-client-1.3.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[na:1.7.0_45] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_45] at org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:565) ~[tyrus-client-1.3.jar:na] at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) ~[na:1.7.0_45] at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:343) ~[tyrus-client-1.3.jar:na] at org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:218) ~[tyrus-client-1.3.jar:na] at com.thingworx.test3.client.WebsocketConnection.open(WebsocketConnection.java:87) ~[Jsr356TestClient.jar:na] at com.thingworx.test3.tasks.ConnectTask.callImpl(ConnectTask.java:18) ~[Jsr356TestClient.jar:na] at com.thingworx.test3.tasks.ClientTask.call(ClientTask.java:28) [Jsr356TestClient.jar:na] at com.thingworx.test3.tasks.ClientTask.call(ClientTask.java:12) [Jsr356TestClient.jar:na] at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_45] at java.lang.Thread.run(Unknown Source) [na:1.7.0_45]
    via by RickBullotta,
    • org.apache.mina.common.RuntimeIOException: Failed to get the session. at org.apache.mina.common.support.DefaultConnectFuture.getSession(DefaultConnectFuture.java:62) at za.co.mxit.xmpp.nio.XmppClient$XmppCf.operationComplete(XmppClient.java:1289) at org.apache.mina.common.support.DefaultIoFuture.notifyListeners(DefaultIoFuture.java:162) at org.apache.mina.common.support.DefaultIoFuture.setValue(DefaultIoFuture.java:121) at org.apache.mina.common.support.DefaultConnectFuture.setException(DefaultConnectFuture.java:82) at org.apache.mina.transport.socket.nio.SocketConnector.processSessions(SocketConnector.java:295) at org.apache.mina.transport.socket.nio.SocketConnector.access$900(SocketConnector.java:53) at org.apache.mina.transport.socket.nio.SocketConnector$Worker.run(SocketConnector.java:395) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43) at java.lang.Thread.run(Thread.java:595) Caused by: java.net.BindException: Address already in use: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:527)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,