You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jc...@apache.org on 2016/02/24 18:34:00 UTC
incubator-geode git commit: GEODE-944: also check loopback address.
This fixes the unit test failure on ubuntu.
Repository: incubator-geode
Updated Branches:
refs/heads/develop c32e1b4df -> d8522c23a
GEODE-944: also check loopback address. This fixes the unit test
failure on ubuntu.
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d8522c23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d8522c23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d8522c23
Branch: refs/heads/develop
Commit: d8522c23a87077699e5192041d7427192cb40c63
Parents: c32e1b4
Author: Jianxia Chen <jc...@pivotal.io>
Authored: Wed Feb 24 09:28:23 2016 -0800
Committer: Jianxia Chen <jc...@pivotal.io>
Committed: Wed Feb 24 09:28:23 2016 -0800
----------------------------------------------------------------------
.../java/com/gemstone/gemfire/distributed/LocatorLauncher.java | 5 +++--
.../java/com/gemstone/gemfire/distributed/ServerLauncher.java | 5 +++--
.../main/java/com/gemstone/gemfire/internal/SocketCreator.java | 3 +++
3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d8522c23/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
index b0be89f..cfbad53 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
@@ -1480,8 +1480,9 @@ public final class LocatorLauncher extends AbstractLauncher<String> {
}
else {
try {
- this.bindAddress = InetAddress.getByName(bindAddress);
- if (SocketCreator.isLocalHost(this.bindAddress)) {
+ InetAddress address = InetAddress.getByName(bindAddress);
+ if (SocketCreator.isLocalHost(address)) {
+ this.bindAddress = address;
return this;
}
else {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d8522c23/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
index f13bb73..4f43370 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
@@ -1958,8 +1958,9 @@ public final class ServerLauncher extends AbstractLauncher<String> {
// NOTE only set the 'bind address' if the user specified a value
else {
try {
- this.serverBindAddress = InetAddress.getByName(serverBindAddress);
- if (SocketCreator.isLocalHost(this.serverBindAddress)) {
+ InetAddress bindAddress = InetAddress.getByName(serverBindAddress);
+ if (SocketCreator.isLocalHost(bindAddress)) {
+ this.serverBindAddress = bindAddress;
this.serverBindAddressSetByUser = true;
return this;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d8522c23/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
index 9a74abd..5bfa7bd 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
@@ -1311,6 +1311,9 @@ public class SocketCreator {
if (InetAddressUtil.LOCALHOST.equals(host)) {
return true;
}
+ else if (((InetAddress) host).isLoopbackAddress()) {
+ return true;
+ }
else {
try {
Enumeration en=NetworkInterface.getNetworkInterfaces();