From 618da0c70dbd75396c8a0a7cd6a1fd7b86168b0b Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Mon, 19 Sep 2022 14:54:49 +0800 Subject: [PATCH] Correct environment variable RSS_LOCAL_IP (#618) --- .../main/scala/com/aliyun/emr/rss/common/util/Utils.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/main/scala/com/aliyun/emr/rss/common/util/Utils.scala b/common/src/main/scala/com/aliyun/emr/rss/common/util/Utils.scala index 4f040a1c3..5661a8aab 100644 --- a/common/src/main/scala/com/aliyun/emr/rss/common/util/Utils.scala +++ b/common/src/main/scala/com/aliyun/emr/rss/common/util/Utils.scala @@ -319,7 +319,7 @@ object Utils extends Logging { private lazy val localIpAddress: InetAddress = findLocalInetAddress() private def findLocalInetAddress(): InetAddress = { - val defaultIpOverride = System.getenv("JSS_LOCAL_IP") + val defaultIpOverride = System.getenv("RSS_LOCAL_IP") if (defaultIpOverride != null) { InetAddress.getByName(defaultIpOverride) } else { @@ -344,14 +344,14 @@ object Utils extends Logging { logWarning("Your hostname, " + InetAddress.getLocalHost.getHostName + " resolves to" + " a loopback address: " + address.getHostAddress + "; using " + strippedAddress.getHostAddress + " instead (on interface " + ni.getName + ")") - logWarning("Set JSS_LOCAL_IP if you need to bind to another address") + logWarning("Set RSS_LOCAL_IP if you need to bind to another address") return strippedAddress } } logWarning("Your hostname, " + InetAddress.getLocalHost.getHostName + " resolves to" + " a loopback address: " + address.getHostAddress + ", but we couldn't find any" + " external IP address!") - logWarning("Set JSS_LOCAL_IP if you need to bind to another address") + logWarning("Set RSS_LOCAL_IP if you need to bind to another address") } address }