<br /> My question about Spring boot jar. When running jar on production machine as: <br />
java -jar xyz.jar
It does not respond to my request. Because it is listening on ipv6.
But when I run application as <br /> java -jar xyz.jar -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses
It responds my requests.
Is it the production machine's configuration which cause the application to listen over ipv6, or is there any other reasons?
Fortunately <br /> -Djava.net.preferIPv4Stack=true <br /> -Djava.net.preferIPv4Addresses <br /> parameters solved my problem. But I am confused!!
Note: Tomcat is used as embedded server. <br />Spring boot version 1.5.4 RELEASEAnswer1:
Here <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/index.html" rel="nofollow">https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/index.html</a> I read that "The Java networking stack first checks whether IPv6 is supported on the underlying OS. If IPv6 is supported, it tries to use the IPv6 stack."
To check if your Linux machine supports IPv6, simply run "cat /proc/net/if_inet6" and if you see some output it means it's enabled.