java.net.SocketException: Invalid argument: no further information

QuickFIX/J JIRA | Christoph John | 6 months ago
  1. 0

    Youyu Shao provided some fixes on the mailing list. Original mail: On 23/06/16 02:35, Youyu Shao wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > Recently we have been seriously looking into using QuickFixJ (code base > 1.6.2). > In so doing, we have discovered several problems and subsequently resolved > in house. > > 1. Mina would throw org.apache.mina.core.RuntimeIoException wrapping > java.net.SocketException at various places. > For example, this happens at: > org.apache.mina.core.RuntimeIoException: java.net.SocketException: > Invalid argument: no further information > at > org.apache.mina.transport.socket.nio.NioSocketSession$SessionConfigImpl.setTcpNoDelay(NioSocketSession.java:208) > at quickfix.mina.NetworkingOptions.apply(NetworkingOptions.java:155) > at > quickfix.mina.AbstractIoHandler.sessionCreated(AbstractIoHandler.java:93) > at > quickfix.mina.initiator.InitiatorIoHandler.sessionCreated(InitiatorIoHandler.java:50) > ..... > When this happens, exceptionCaught method of AbstractIoHandler is not > able to properly detect there was an underlying socket IOException. > AbstractIoHandler has been modified to un-wrap the exception and see if > along the exception chain there is an IOException. > > 2. org.apache.mina.core.session.IoSession internal state is problematic. On > and off, > IoSession.isConnected() does not return the correct value after QuickFixJ > called IoSession.close() method(up on experiencing IOException). > quickfix.mina.initiator.IoSessionInitiator has been refactored to replace > the old IoConnector with a new one upon experiencing IOException. > quickfix.mina.AbstractIoHandler is adjusted accordingly to signal the > IoSessionInitiator to do so. > > 3. Modified the run() method of ConnectTask in IoSessionInitiator to be > protected by try block. This is to prevent the scheduled Task from > stop running in presence of exception. (see javadoc on > scheduleWithFixedDelay(...) method of > java.util.concurrent.ScheduledExecutorService > which states that "...If any execution of the task encounters an > exception, subsequent executions are suppressed...") > > 4. Again, org.apache.mina.core.session.IoSession internal state is > problematic. Even after the > normal disconnect() from IoSessionResponder, on and off the > IoSession.isConnected() still does not return the correct value. > quickfix.mina.IoSessionResponder is adjusted to signal the > IoSessionInitiator to replace the IoConnector. IoSessionResponderTest is > adjusted accordingly. > > > 5. quickfix.ThreadedSocketAcceptor leaks resources when stoped. > Instead of calling stopSessionTimer() in the stop() method, it should > call stopInitiators(). > > Problems identified in 1, 2, 3, and 4 ultimately manifested them in ways > that reconnecting would stop working (forever), even absent of IOExceptions. > > With the fix, we have the QuickFixJ engine running for a week where > reconnecting works with no problem. During this period the counterparty > logged out and severed the TCP connection more than 20000 times. Our test > also indicates that the fix works equally SSL vs non-SSL. > > Modified files are attached. > > AbstractIoHandler.java > <http://quickfix-j.364392.n2.nabble.com/file/n7579557/AbstractIoHandler.java> > IoSessionInitiator.java > <http://quickfix-j.364392.n2.nabble.com/file/n7579557/IoSessionInitiator.java> > IoSessionResponder.java > <http://quickfix-j.364392.n2.nabble.com/file/n7579557/IoSessionResponder.java> > IoSessionResponderTest.java > <http://quickfix-j.364392.n2.nabble.com/file/n7579557/IoSessionResponderTest.java> > ThreadedSocketInitiator.java > <http://quickfix-j.364392.n2.nabble.com/file/n7579557/ThreadedSocketInitiator.java> >

    QuickFIX/J JIRA | 6 months ago | Christoph John
    java.net.SocketException: Invalid argument: no further information
  2. 0

    Load-testing tool trouble | Wowza Support

    wowza.com | 1 year ago
    org.apache.mina.common.RuntimeIOException: java.net.SocketException: Invalid arg ument: no further information
  3. 0

    Netty - Ignore failed setting of IP_TOS

    Stack Overflow | 4 years ago | md_5
    java.net.SocketException: Invalid argument: no further information
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.net.SocketException: The server socket was closed

    GitHub | 4 years ago | matrousse
    java.net.SocketException: Invalid argument: no further information
  6. 0

    Mule throws the following errors at startup with AnypointMQ queue listener endpoint. The errors don't seem to have any effect and the component is working properly. I am attaching my project for a test. Errors: Aug 03, 2016 5:15:33 PM org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator postConfigure WARNING: GRIZZLY0005: Can not set SO_KEEPALIVE to true java.net.SocketException: Invalid argument: no further information at sun.nio.ch.Net.setIntOption0(Native Method) at sun.nio.ch.Net.setSocketOption(Unknown Source) at sun.nio.ch.SocketChannelImpl.setOption(Unknown Source) at sun.nio.ch.SocketAdaptor.setBooleanOption(Unknown Source) at sun.nio.ch.SocketAdaptor.setKeepAlive(Unknown Source) at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:795) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync(TCPNIOConnectorHandler.java:219) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected(TCPNIOConnectorHandler.java:158) at org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect(TCPNIOConnection.java:258) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:517) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.run0(FlowWorkManagerIOStrategy.java:134) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent(FlowWorkManagerIOStrategy.java:77) at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Unknown Source) Aug 03, 2016 5:15:33 PM org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator postConfigure WARNING: GRIZZLY0004: Can not set TCP_NODELAY to true java.net.SocketException: Invalid argument: no further information at sun.nio.ch.Net.setIntOption0(Native Method) at sun.nio.ch.Net.setSocketOption(Unknown Source) at sun.nio.ch.SocketChannelImpl.setOption(Unknown Source) at sun.nio.ch.SocketAdaptor.setBooleanOption(Unknown Source) at sun.nio.ch.SocketAdaptor.setTcpNoDelay(Unknown Source) at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:803) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync(TCPNIOConnectorHandler.java:219) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected(TCPNIOConnectorHandler.java:158) at org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect(TCPNIOConnection.java:258) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:517) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.run0(FlowWorkManagerIOStrategy.java:134) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent(FlowWorkManagerIOStrategy.java:77) at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Unknown Source) Aug 03, 2016 5:15:33 PM org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator postConfigure WARNING: GRIZZLY0005: Can not set SO_KEEPALIVE to true java.net.SocketException: Invalid argument: no further information at sun.nio.ch.Net.setIntOption0(Native Method) at sun.nio.ch.Net.setSocketOption(Unknown Source) at sun.nio.ch.SocketChannelImpl.setOption(Unknown Source) at sun.nio.ch.SocketAdaptor.setBooleanOption(Unknown Source) at sun.nio.ch.SocketAdaptor.setKeepAlive(Unknown Source) at org.glassfish.grizzly.nio.transport.TCPNIOTransport$DefaultChannelConfigurator.postConfigure(TCPNIOTransport.java:795) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync(TCPNIOConnectorHandler.java:219) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected(TCPNIOConnectorHandler.java:158) at org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect(TCPNIOConnection.java:258) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:517) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.run0(FlowWorkManagerIOStrategy.java:134) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent(FlowWorkManagerIOStrategy.java:77) at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Unknown Source)

    MuleSoft JIRA | 4 months ago | Michael Hyatt
    java.net.SocketException: Invalid argument: no further information

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.net.SocketException

      Invalid argument: no further information

      at org.apache.mina.transport.socket.nio.NioSocketSession$SessionConfigImpl.setTcpNoDelay()
    2. Apache MINA Core
      NioSocketSession$SessionConfigImpl.setTcpNoDelay
      1. org.apache.mina.transport.socket.nio.NioSocketSession$SessionConfigImpl.setTcpNoDelay(NioSocketSession.java:208)
      1 frame
    3. Apache ServiceMix :: Bundles :: ${pkgArtifactId}
      InitiatorIoHandler.sessionCreated
      1. quickfix.mina.NetworkingOptions.apply(NetworkingOptions.java:155)
      2. quickfix.mina.AbstractIoHandler.sessionCreated(AbstractIoHandler.java:93)
      3. quickfix.mina.initiator.InitiatorIoHandler.sessionCreated(InitiatorIoHandler.java:50)
      3 frames