java.net.SocketException: Invalid argument: connect

Does it work if you tell Java to use the IPv4 stack?

Use the following command line option when starting the server and client.

-Djava.net.preferIPv4Stack=true

See also here

Leave a Comment