Difference between revisions of "Tomcat IPv4 over IPv6"

(Created page with "Category:Linux Category:Development You can use IPv4 as default instead of IPv6. =IPv4 instead of IPv6= The easiest way is to change the JAVA_OPTS variable. Edi...")
(No difference)

Revision as of 16:53, 31 March 2015


You can use IPv4 as default instead of IPv6.


IPv4 instead of IPv6

The easiest way is to change the JAVA_OPTS variable.


Edit your Tomcat launcher (instance) script:

vim /etc/default/tomcat8


Adjust your JAVA_OPTS line, add -Djava.net.preferIPv4Stack=true

JAVA_OPTS="${JAVA_OPTS} -Djava.net.preferIPv4Stack=true"


Take changes into account

service tomcat8 restart