This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new f3aadc1d2c Emergency fix for the stop-confignode script (#6560)
f3aadc1d2c is described below
commit f3aadc1d2cf7ebe8d04c1b376daa4b7deda43ccb
Author: Junqing WANG <[email protected]>
AuthorDate: Sat Jul 2 09:58:16 2022 +0800
Emergency fix for the stop-confignode script (#6560)
---
confignode/src/assembly/resources/sbin/stop-confignode.bat | 6 +++---
confignode/src/assembly/resources/sbin/stop-confignode.sh | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/confignode/src/assembly/resources/sbin/stop-confignode.bat
b/confignode/src/assembly/resources/sbin/stop-confignode.bat
index d71f45dffc..78dca81e12 100644
--- a/confignode/src/assembly/resources/sbin/stop-confignode.bat
+++ b/confignode/src/assembly/resources/sbin/stop-confignode.bat
@@ -22,9 +22,9 @@
set current_dir=%~dp0
set superior_dir=%current_dir%\..\
-for /f "eol=; tokens=2,2 delims==" %%i in ('findstr /i "^rpc_port"
+for /f "eol=; tokens=2,2 delims==" %%i in ('findstr /i "^internal_port"
%superior_dir%\conf\iotdb-confignode.properties') do (
- set rpc_port=%%i
+ set internal_port=%%i
)
for /f "eol=; tokens=2,2 delims==" %%i in ('findstr /i "internal_address"
@@ -32,7 +32,7 @@ for /f "eol=; tokens=2,2 delims==" %%i in ('findstr /i
"internal_address"
set internal_address=%%i
)
-for /f "tokens=5" %%a in ('netstat /ano ^| findstr
%internal_address%:%rpc_port%') do (
+for /f "tokens=5" %%a in ('netstat /ano ^| findstr
%internal_address%:%internal_port%') do (
taskkill /f /pid %%a
)
rem ps ax | grep -i 'confignode.ConfigNode' | grep -v grep | awk '{print $1}'
| xargs kill -SIGTERM
diff --git a/confignode/src/assembly/resources/sbin/stop-confignode.sh
b/confignode/src/assembly/resources/sbin/stop-confignode.sh
index 0fc7b7b4c3..e3317c9605 100644
--- a/confignode/src/assembly/resources/sbin/stop-confignode.sh
+++ b/confignode/src/assembly/resources/sbin/stop-confignode.sh
@@ -20,12 +20,12 @@
CONFIGNODE_CONF="`dirname "$0"`/../conf"
-rpc_port=`sed '/^rpc_port=/!d;s/.*=//'
${CONFIGNODE_CONF}/iotdb-confignode.properties`
+internal_port=`sed '/^internal_port=/!d;s/.*=//'
${CONFIGNODE_CONF}/iotdb-confignode.properties`
if type lsof > /dev/null 2>&1 ; then
- PID=$(lsof -t -i:${rpc_port} -sTCP:LISTEN)
+ PID=$(lsof -t -i:${internal_port} -sTCP:LISTEN)
elif type netstat > /dev/null 2>&1 ; then
- PID=$(netstat -anp 2>/dev/null | grep ":${rpc_port} " | grep ' LISTEN ' |
awk '{print $NF}' | sed "s|/.*||g" )
+ PID=$(netstat -anp 2>/dev/null | grep ":${internal_port} " | grep ' LISTEN '
| awk '{print $NF}' | sed "s|/.*||g" )
else
echo ""
echo " Error: No necessary tool."