[jira] [Commented] (DIRMINA-379) setKeepAlive/setTcpNoDelay and exceptions in Windows Vista
[ https://issues.apache.org/jira/browse/DIRMINA-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13109432#comment-13109432 ] Suhas Sutar commented on DIRMINA-379: - Guys, I am using v1.1.7 and need to address this issue for my application. I cannot upgrade because of my timelines but upgrading is not going to help as this seem to be still unresolved. I am looking for some suggestions. Thanks in advance! setKeepAlive/setTcpNoDelay and exceptions in Windows Vista -- Key: DIRMINA-379 URL: https://issues.apache.org/jira/browse/DIRMINA-379 Project: MINA Issue Type: Bug Components: Core Affects Versions: 1.0.3, 1.1.0, 2.0.0-M1 Environment: Windows Vista Home Premium Italian Java SE 1.5.0_11, Java SE 1.6 Update 1, Java SE 1.4.2_12 Reporter: Stefano Bagnara When I ran my application under Vista I get this exception: Exception in thread Thread-4 org.apache.mina.common.RuntimeIOException: java.net.SocketException: Invalid argument: sun.nio.ch.Net.setIntOption at org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.setKeepAlive(SocketSessionImpl.java:252) at org.apache.mina.transport.socket.nio.SocketSessionImpl.init(SocketSessionImpl.java:94) at org.apache.mina.transport.socket.nio.SocketConnector.newSession(SocketConnector.java:350) at org.apache.mina.transport.socket.nio.SocketConnector.processSessions(SocketConnector.java:290) 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.SocketException: Invalid argument: sun.nio.ch.Net.setIntOption at sun.nio.ch.Net.setIntOption0(Native Method) at sun.nio.ch.Net.setIntOption(Net.java:152) at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:372) at sun.nio.ch.SocketOptsImpl.setBoolean(SocketOptsImpl.java:38) at sun.nio.ch.SocketOptsImpl.keepAlive(SocketOptsImpl.java:92) at sun.nio.ch.OptionAdaptor.setKeepAlive(OptionAdaptor.java:139) at sun.nio.ch.SocketAdaptor.setKeepAlive(SocketAdaptor.java:322) at org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.setKeepAlive(SocketSessionImpl.java:248) ... 7 more I had to remove the following lines from the SocketSessionImpl constructor: this.config.setKeepAlive( cfg.isKeepAlive() ); this.config.setTcpNoDelay( cfg.isTcpNoDelay() ); and now it works. No matter if I change the configuration to let them return true or false, I keep getting the exception if I don't remove the call at all. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRMINA-379) setKeepAlive/setTcpNoDelay and exceptions in Windows Vista
[ https://issues.apache.org/jira/browse/DIRMINA-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13109520#comment-13109520 ] Edouard De Oliveira commented on DIRMINA-379: - according to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7058336 it may be due to a jdk 1.5 1.6 bug it says jdk 1.7 has a rewritten Socket adaptator maybe you can try jdk 1.7 to check if it solves the issue dirty hack would be to try to delay as much as possible the socket options setting to prevent options to be set on a non open socket please note we are not releasing 1.x versions anymore setKeepAlive/setTcpNoDelay and exceptions in Windows Vista -- Key: DIRMINA-379 URL: https://issues.apache.org/jira/browse/DIRMINA-379 Project: MINA Issue Type: Bug Components: Core Affects Versions: 1.0.3, 1.1.0, 2.0.0-M1 Environment: Windows Vista Home Premium Italian Java SE 1.5.0_11, Java SE 1.6 Update 1, Java SE 1.4.2_12 Reporter: Stefano Bagnara When I ran my application under Vista I get this exception: Exception in thread Thread-4 org.apache.mina.common.RuntimeIOException: java.net.SocketException: Invalid argument: sun.nio.ch.Net.setIntOption at org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.setKeepAlive(SocketSessionImpl.java:252) at org.apache.mina.transport.socket.nio.SocketSessionImpl.init(SocketSessionImpl.java:94) at org.apache.mina.transport.socket.nio.SocketConnector.newSession(SocketConnector.java:350) at org.apache.mina.transport.socket.nio.SocketConnector.processSessions(SocketConnector.java:290) 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.SocketException: Invalid argument: sun.nio.ch.Net.setIntOption at sun.nio.ch.Net.setIntOption0(Native Method) at sun.nio.ch.Net.setIntOption(Net.java:152) at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:372) at sun.nio.ch.SocketOptsImpl.setBoolean(SocketOptsImpl.java:38) at sun.nio.ch.SocketOptsImpl.keepAlive(SocketOptsImpl.java:92) at sun.nio.ch.OptionAdaptor.setKeepAlive(OptionAdaptor.java:139) at sun.nio.ch.SocketAdaptor.setKeepAlive(SocketAdaptor.java:322) at org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.setKeepAlive(SocketSessionImpl.java:248) ... 7 more I had to remove the following lines from the SocketSessionImpl constructor: this.config.setKeepAlive( cfg.isKeepAlive() ); this.config.setTcpNoDelay( cfg.isTcpNoDelay() ); and now it works. No matter if I change the configuration to let them return true or false, I keep getting the exception if I don't remove the call at all. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRMINA-379) setKeepAlive/setTcpNoDelay and exceptions in Windows Vista
[ https://issues.apache.org/jira/browse/DIRMINA-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13112189#comment-13112189 ] Suhas Sutar commented on DIRMINA-379: - Appreciate the prompt reply. Can you please confirm that this issue has not been fixed in latest versions of MINA? setKeepAlive/setTcpNoDelay and exceptions in Windows Vista -- Key: DIRMINA-379 URL: https://issues.apache.org/jira/browse/DIRMINA-379 Project: MINA Issue Type: Bug Components: Core Affects Versions: 1.0.3, 1.1.0, 2.0.0-M1 Environment: Windows Vista Home Premium Italian Java SE 1.5.0_11, Java SE 1.6 Update 1, Java SE 1.4.2_12 Reporter: Stefano Bagnara When I ran my application under Vista I get this exception: Exception in thread Thread-4 org.apache.mina.common.RuntimeIOException: java.net.SocketException: Invalid argument: sun.nio.ch.Net.setIntOption at org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.setKeepAlive(SocketSessionImpl.java:252) at org.apache.mina.transport.socket.nio.SocketSessionImpl.init(SocketSessionImpl.java:94) at org.apache.mina.transport.socket.nio.SocketConnector.newSession(SocketConnector.java:350) at org.apache.mina.transport.socket.nio.SocketConnector.processSessions(SocketConnector.java:290) 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.SocketException: Invalid argument: sun.nio.ch.Net.setIntOption at sun.nio.ch.Net.setIntOption0(Native Method) at sun.nio.ch.Net.setIntOption(Net.java:152) at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:372) at sun.nio.ch.SocketOptsImpl.setBoolean(SocketOptsImpl.java:38) at sun.nio.ch.SocketOptsImpl.keepAlive(SocketOptsImpl.java:92) at sun.nio.ch.OptionAdaptor.setKeepAlive(OptionAdaptor.java:139) at sun.nio.ch.SocketAdaptor.setKeepAlive(SocketAdaptor.java:322) at org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.setKeepAlive(SocketSessionImpl.java:248) ... 7 more I had to remove the following lines from the SocketSessionImpl constructor: this.config.setKeepAlive( cfg.isKeepAlive() ); this.config.setTcpNoDelay( cfg.isTcpNoDelay() ); and now it works. No matter if I change the configuration to let them return true or false, I keep getting the exception if I don't remove the call at all. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira