From c0b11ae074cd4cc4f28b5d80129ee7a2a88de35c Mon Sep 17 00:00:00 2001 From: crazyhzm Date: Tue, 29 Jan 2019 13:34:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=20dubbo=E5=90=AF=E5=8A=A8=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E4=B8=ADnc=E5=91=BD=E4=BB=A4=E4=B8=8D=E7=A8=B3?= =?UTF-8?q?=E5=AE=9A=20#936?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/META-INF/assembly/bin/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh b/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh index 595b7695d44..ec5b1d44aec 100755 --- a/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh +++ b/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh @@ -90,7 +90,7 @@ while [ $COUNT -lt 1 ]; do sleep 1 if [ -n "$SERVER_PORT" ]; then if [ "$SERVER_PROTOCOL" == "dubbo" ]; then - COUNT=`echo status | nc -i 1 $SERVER_HOST $SERVER_PORT | grep -c OK` + COUNT=`(sleep 1; echo "^M"; sleep 1; echo status; sleep 1)| telnet $SERVER_HOST $SERVER_PORT | grep -c OK` else COUNT=`netstat -an | grep $SERVER_PORT | wc -l` fi From dbc4a6faba034f8f0a9c238b463114e09b737fff Mon Sep 17 00:00:00 2001 From: crazyhzm Date: Thu, 31 Jan 2019 12:21:48 +0800 Subject: [PATCH 2/2] modify --- .../src/main/resources/META-INF/assembly/bin/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh b/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh index ec5b1d44aec..56e39143f0c 100755 --- a/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh +++ b/dubbo-container/dubbo-container-api/src/main/resources/META-INF/assembly/bin/start.sh @@ -90,7 +90,7 @@ while [ $COUNT -lt 1 ]; do sleep 1 if [ -n "$SERVER_PORT" ]; then if [ "$SERVER_PROTOCOL" == "dubbo" ]; then - COUNT=`(sleep 1; echo "^M"; sleep 1; echo status; sleep 1)| telnet $SERVER_HOST $SERVER_PORT | grep -c OK` + COUNT=`(sleep 1; echo -e '\n'; sleep 1; echo status; sleep 1)| telnet $SERVER_HOST $SERVER_PORT | grep -c OK` else COUNT=`netstat -an | grep $SERVER_PORT | wc -l` fi