SocketException to Announce 'Invalid argument' for an Available Port


Throw the SocketException to announce "Invalid argument" for an available port.

SEVERE: StandardServer.await: create[8005]: Invalid argument
at Method)
at org.apache.catalina.core.StandardServer.await(

Root Cause

That socket may be created for IPv6 only.


  1. Use "sysctl net.ipv6.bindv6only" to check if "net.ipv6.bindv6only = 1" in the local environment, if so turn it off:
        sysctl -w net.ipv6.bindv6only = 0
  2. If this doesn't work, try to set it by JVM parameters. Add "" into JAVA_OPTS. See Setting Properties and Options on Startup for more information on how to set a system property.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport