This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch rel/0.12
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/0.12 by this push:
new 9b83cae [To rel/0.12] Fix connection refused using session when users
forget to set client ip (#4566)
9b83cae is described below
commit 9b83cae0a0d9fae79d279851f68a06658a5980aa
Author: Mrquan <[email protected]>
AuthorDate: Tue Dec 14 20:23:35 2021 +0800
[To rel/0.12] Fix connection refused using session when users forget to set
client ip (#4566)
* fix the client ip bug in cluster
* fix a typo
Co-authored-by: 权思屹 <[email protected]>
---
cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java | 7 +++++++
docs/UserGuide/Cluster/Cluster-Setup-Example.md | 2 +-
docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java
b/cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java
index 27aa61b..73a375e 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/ClusterMain.java
@@ -96,6 +96,13 @@ public class ClusterMain {
return;
}
+ // if client ip is the default address, set it same with internal ip
+ if
(IoTDBDescriptor.getInstance().getConfig().getRpcAddress().equals("0.0.0.0")) {
+ IoTDBDescriptor.getInstance()
+ .getConfig()
+
.setRpcAddress(ClusterDescriptor.getInstance().getConfig().getInternalIp());
+ }
+
String mode = args[0];
logger.info("Running mode {}", mode);
diff --git a/docs/UserGuide/Cluster/Cluster-Setup-Example.md
b/docs/UserGuide/Cluster/Cluster-Setup-Example.md
index 81b9ee3..2570a61 100644
--- a/docs/UserGuide/Cluster/Cluster-Setup-Example.md
+++ b/docs/UserGuide/Cluster/Cluster-Setup-Example.md
@@ -202,7 +202,7 @@ internal\_ip = *A\_private\_Ip* (or *B\_private\_Ip*,
*C\_private\_Ip*)
***iotdb-engine.properties***
-rpc\_address = *A\_public\_Ip* (or *B\_private\_Ip*, *C\_public\_Ip*)
+rpc\_address = *A\_public\_Ip* (or *B\_public\_Ip*, *C\_public\_Ip*)
### Start IoTDB cluster
diff --git a/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
b/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
index 78889a7..a556cf0 100644
--- a/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
+++ b/docs/zh/UserGuide/Cluster/Cluster-Setup-Example.md
@@ -204,7 +204,7 @@ internal\_ip = *A\_private\_Ip* (or *B\_private\_Ip*,
*C\_private\_Ip*)
***iotdb-engine.properties***
-rpc\_address = *A\_public\_Ip* (or *B\_private\_Ip*, *C\_public\_Ip*)
+rpc\_address = *A\_public\_Ip* (or *B\_public\_Ip*, *C\_public\_Ip*)
### 启动IoTDB集群