File tree Expand file tree Collapse file tree 4 files changed +29
-0
lines changed
Expand file tree Collapse file tree 4 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ Release 4.0.0 - 2011-11-30
3939 BOOKKEEPER-122: Review BookKeeper server documentation (fpj & ivank)
4040
4141 BOOKKEEPER-130: Add developer KEYS file to svn (ivank)
42+
43+ BOOKKEEPER-66: use IPv4 for builds (mmorel via ivank)
4244
4345 bookkeeper-server/
4446
Original file line number Diff line number Diff line change 2020# * limitations under the License.
2121# */
2222
23+ # check if net.ipv6.bindv6only is set to 1
24+ bindv6only=$( /sbin/sysctl -n net.ipv6.bindv6only 2> /dev/null)
25+ if [ -n " $bindv6only " ] && [ " $bindv6only " -eq " 1" ]
26+ then
27+ echo " Error: \" net.ipv6.bindv6only\" is set to 1 - Java networking could be broken"
28+ echo " For more info (the following page also applies to bookkeeper): http://wiki.apache.org/hadoop/HadoopIPv6"
29+ exit 1
30+ fi
31+
2332BINDIR=` dirname " $0 " `
2433BK_HOME=` cd $BINDIR /..; pwd`
2534
@@ -108,6 +117,9 @@ OPTS="-cp $BOOKIE_CLASSPATH $OPTS $BOOKIE_EXTRA_OPTS"
108117
109118OPTS=" $OPTS $BOOKIE_EXTRA_OPTS "
110119
120+ # Disable ipv6 as it can cause issues
121+ OPTS=" $OPTS -Djava.net.preferIPv4Stack=true"
122+
111123if [ $COMMAND == " bookie" ]; then
112124 exec java $OPTS org.apache.bookkeeper.proto.BookieServer --conf $BOOKIE_CONF $@
113125elif [ $COMMAND == " localbookie" ]; then
Original file line number Diff line number Diff line change 2020# * limitations under the License.
2121# */
2222
23+ # check if net.ipv6.bindv6only is set to 1
24+ bindv6only=$( /sbin/sysctl -n net.ipv6.bindv6only 2> /dev/null)
25+ if [ -n " $bindv6only " ] && [ " $bindv6only " -eq " 1" ]
26+ then
27+ echo " Error: \" net.ipv6.bindv6only\" is set to 1 - Java networking could be broken"
28+ echo " For more info (the following page also applies to hedwig): http://wiki.apache.org/hadoop/HadoopIPv6"
29+ exit 1
30+ fi
31+
2332BINDIR=` dirname " $0 " `
2433HW_HOME=` cd $BINDIR /..; pwd`
2534
@@ -104,6 +113,9 @@ if [ "$HEDWIG_LOG_CONF" != "" ]; then
104113fi
105114OPTS=" -cp $HEDWIG_CLASSPATH $OPTS $HEDWIG_EXTRA_OPTS "
106115
116+ # Disable ipv6 as it can cause issues
117+ OPTS=" $OPTS -Djava.net.preferIPv4Stack=true"
118+
107119if [ $COMMAND == " server" ]; then
108120 exec java $OPTS org.apache.hedwig.server.netty.PubSubServer $HEDWIG_SERVER_CONF $@
109121elif [ $COMMAND == " help" ]; then
Original file line number Diff line number Diff line change 5656 <groupId >org.apache.maven.plugins</groupId >
5757 <artifactId >maven-surefire-plugin</artifactId >
5858 <version >2.9</version >
59+ <configuration >
60+ <argLine >-Djava.net.preferIPv4Stack=true</argLine >
61+ </configuration >
5962 </plugin >
6063 <plugin >
6164 <groupId >org.apache.maven.plugins</groupId >
You can’t perform that action at this time.
0 commit comments