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...") |
|||
Line 13: | Line 13: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | vim /etc/default/tomcat8 | + | # Package installation |
+ | vim /etc/default/tomcat7 | ||
+ | |||
+ | # Manual installation, Tomcat instance | ||
+ | vim /etc/init.d/tomcat8 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 26: | Line 30: | ||
Take changes into account | Take changes into account | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | service | + | service tomcat7 restart |
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 10:40, 1 April 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:
# Package installation
vim /etc/default/tomcat7
# Manual installation, Tomcat instance
vim /etc/init.d/tomcat8
Adjust your JAVA_OPTS line, add -Djava.net.preferIPv4Stack=true
JAVA_OPTS="${JAVA_OPTS} -Djava.net.preferIPv4Stack=true"
Take changes into account
service tomcat7 restart