You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2022/12/12 03:15:21 UTC

[iotdb] branch master updated: [IOTDB-5170] stop-confignode.bat, datanode will be closed at the same time (#8406)

This is an automated email from the ASF dual-hosted git repository.

caogaofei 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 bd8cfadd85 [IOTDB-5170] stop-confignode.bat, datanode will be closed at the same time (#8406)
bd8cfadd85 is described below

commit bd8cfadd855d8abdefa847518c0067475eda9390
Author: 张正明 <87...@qq.com>
AuthorDate: Mon Dec 12 11:15:16 2022 +0800

    [IOTDB-5170] stop-confignode.bat, datanode will be closed at the same time (#8406)
---
 confignode/src/assembly/resources/sbin/stop-confignode.bat | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/confignode/src/assembly/resources/sbin/stop-confignode.bat b/confignode/src/assembly/resources/sbin/stop-confignode.bat
index b28b9d0716..adfc0ef49f 100644
--- a/confignode/src/assembly/resources/sbin/stop-confignode.bat
+++ b/confignode/src/assembly/resources/sbin/stop-confignode.bat
@@ -27,15 +27,14 @@ for /f  "eol=; tokens=2,2 delims==" %%i in ('findstr /i "^cn_internal_port"
   set cn_internal_port=%%i
 )
 
-echo "check whether the rpc_port is used..., port is" $rpc_port
+echo "check whether the cn_internal_port is used..., port is %cn_internal_port%"
 
 for /f  "eol=; tokens=2,2 delims==" %%i in ('findstr /i "cn_internal_address"
 %superior_dir%\conf\iotdb-confignode.properties') do (
   set cn_internal_address=%%i
 )
 
-for /f "tokens=5" %%a in ('netstat /ano ^| findstr %cn_internal_address%:%cn_internal_port%') do (
+for /f "tokens=5" %%a in ('netstat /ano ^| findstr %cn_internal_address%:%cn_internal_port% ^| findstr LISTENING ') do (
   taskkill /f /pid %%a
     echo "close ConfigNode, PID:" %%a
 )
-rem ps ax | grep -i 'confignode.ConfigNode' | grep -v grep | awk '{print $1}' | xargs kill -SIGTERM