Sorry for the formatting... not sure what happened.
I hope it will be better this time:

--

Hello all,

I get the following exception when calling ServerSocketChannel.open():

Exception in thread "main" java.net.SocketException: Invalid argument
    at sun.nio.ch.Net.socket0(Native Method)
    at sun.nio.ch.Net.serverSocket(Net.java:415)
    at sun.nio.ch.ServerSocketChannelImpl.<init>(ServerSocketChannelImpl
.java:88)
    at sun.nio.ch.SelectorProviderImpl.openServerSocketChannel(
SelectorProviderImpl.java:56)
    at java.nio.channels.ServerSocketChannel.open(ServerSocketChannel.
java:108)

Here's some code to illustrate the issue:
    https://github.com/nyg/java-http-server

I do use java.net.preferIPv4Stack=false & co.

Using ServerSocketChannel works as expected when not run on OpenBSD.

Using ServerSocket (and listening to an IPv6 address) instead of
ServerSocketChannel works as expected.

I had the same error with the jdk v121. I upgraded to the September 14
snapshot and to jdk v144 and still have the issue.


Any help appreciated :)
Nick



On 15 September 2017 at 23:28, <n...@tuta.io> wrote:
>
> Hello all,
> ...
> Nick

Reply via email to