From 7270de4ca2a17fa453c2361c9fe4c77a8e8f6eca Mon Sep 17 00:00:00 2001 From: slguan Date: Fri, 19 Jul 2019 18:57:06 +0800 Subject: [PATCH] Fix the issue #120, Set the default listening IP address to 0.0.0.0 --- src/system/src/mgmtShell.c | 2 +- src/system/src/vnodeShell.c | 2 +- src/util/src/tglobalcfg.c | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/system/src/mgmtShell.c b/src/system/src/mgmtShell.c index 9c4e4ca..d1e4837 100644 --- a/src/system/src/mgmtShell.c +++ b/src/system/src/mgmtShell.c @@ -56,7 +56,7 @@ int mgmtInitShell() { if (numOfThreads < 1) numOfThreads = 1; memset(&rpcInit, 0, sizeof(rpcInit)); - rpcInit.localIp = tsInternalIp; + rpcInit.localIp = "0.0.0.0"; rpcInit.localPort = tsMgmtShellPort; rpcInit.label = "MND-shell"; rpcInit.numOfThreads = numOfThreads; diff --git a/src/system/src/vnodeShell.c b/src/system/src/vnodeShell.c index 34a4084..3134a04 100644 --- a/src/system/src/vnodeShell.c +++ b/src/system/src/vnodeShell.c @@ -114,7 +114,7 @@ int vnodeInitShell() { if (numOfThreads < 1) numOfThreads = 1; memset(&rpcInit, 0, sizeof(rpcInit)); - rpcInit.localIp = tsInternalIp; + rpcInit.localIp = "0.0.0.0"; rpcInit.localPort = tsVnodeShellPort; rpcInit.label = "DND-shell"; rpcInit.numOfThreads = numOfThreads; diff --git a/src/util/src/tglobalcfg.c b/src/util/src/tglobalcfg.c index abebe47..36083a7 100644 --- a/src/util/src/tglobalcfg.c +++ b/src/util/src/tglobalcfg.c @@ -668,10 +668,6 @@ bool tsReadGlobalConfig() { taosGetPrivateIp(tsInternalIp); } - if (tsLocalIp[0] == 0) { - strcpy(tsLocalIp, tsInternalIp); - } - taosGetSystemInfo(); tsSetLocale(); @@ -685,10 +681,6 @@ bool tsReadGlobalConfig() { tsNumOfCores = 1; } - if (tscEmbedded) { - strcpy(tsLocalIp, tsInternalIp); - } - tsVersion = 0; for (int i = 0; i < 10; i++) { if (version[i] >= '0' && version[i] <= '9') { -- GitLab