Don't prefer IPv4 but add the option commented out to wrapper.config. Make the option configurable in runplain.sh

This commit is contained in:
kytv
2011-06-01 14:42:18 +00:00
parent 43332bb6d0
commit 8a56531c90
2 changed files with 14 additions and 2 deletions

View File

@@ -14,9 +14,13 @@
I2P="%INSTALL_PATH"
I2PTEMP="%SYSTEM_java_io_tmpdir"
# Having IPv6 enabled can cause problems with certain configurations. Changing the
# next value to true may help.
PREFERv4="false"
export CP="${I2P}" ; for j in "${I2P}/lib/*" ; do export CP="${CP}:${j}" ; done;
JAVA=java
JAVAOPTS="-Djava.net.preferIPv4Stack=true -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -DloggerFilenameOverride=logs/log-router-@.txt"
JAVAOPTS="-Djava.net.preferIPv4Stack=${PREFERv4} -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -DloggerFilenameOverride=logs/log-router-@.txt"
nohup ${JAVA} -cp "${CP}" ${JAVAOPTS} net.i2p.router.RouterLaunch > /dev/null 2>&1 &
echo $! > "${I2PTEMP}/router.pid"

View File

@@ -60,7 +60,15 @@ wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
wrapper.java.additional.3=-Dorg.mortbay.xml.XmlParser.NotValidating=true
wrapper.java.additional.4=-Di2p.dir.base="$INSTALL_PATH"
wrapper.java.additional.4.stripquotes=TRUE
wrapper.java.additional.5=-Djava.net.preferIPv4Stack=true
# On some IPv6 enabled systems, I2P and other network-enabled java applications
# may fail to start. For examples see
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560044.
# Two things that may help if you experience this issue
# 1) "echo 0 > /proc/sys/net/ipv6/bindv6only" as root; or
# 2) uncomment the following line:
#wrapper.java.additional.5=-Djava.net.preferIPv4Stack=true
# Jetty says this is a security risk
# Uncommenting this won't help as the router forces it to true
# If you really need this, you have to set it in jetty.xml