Tomcat IPv4 over IPv6

Revision as of 15:53, 31 March 2015 by WikiFreak (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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