From 345f8f06490ff4f1c097d053ced67772558ca366 Mon Sep 17 00:00:00 2001 From: liuliaozhong Date: Tue, 19 Sep 2023 11:32:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9B=AE=E6=A0=87=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=B8=8A=E7=94=A8Docker=E6=8B=89=E8=B5=B7MySQL=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E7=9B=91=E5=90=ACIPv4=E4=B8=8EIPv6=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E5=90=8ESQL=E8=84=9A=E6=9C=AC=E6=89=A7=E8=A1=8C=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=20#1992?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/sqltask/mysql_exec_template.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/job-execute/service-job-execute/src/main/resources/sqltask/mysql_exec_template.sh b/src/backend/job-execute/service-job-execute/src/main/resources/sqltask/mysql_exec_template.sh index 29b40e936e..9ee2e8251f 100644 --- a/src/backend/job-execute/service-job-execute/src/main/resources/sqltask/mysql_exec_template.sh +++ b/src/backend/job-execute/service-job-execute/src/main/resources/sqltask/mysql_exec_template.sh @@ -38,7 +38,7 @@ timeSec=`date +'%s'` LOG=/tmp/result_${SCRIPT_NAME}_${timeSec}.log if [ ${PORT} -gt 0 ]; then - HOST_AND_PORT=`netstat -ntl | grep ":${PORT} " | awk '{print $4}'` + HOST_AND_PORT=`netstat -ntl | grep ":${PORT} " | awk '{print $4}' | head -n 1` HOST=${HOST_AND_PORT%:${PORT}} if [ ${HOST} = '0.0.0.0' -o ${HOST} = '::' ];then HOST='127.0.0.1'