Browse Source

fixed issue #1087, support kafka docker check

agapple 6 years ago
parent
commit
f9778a0aff
1 changed files with 4 additions and 4 deletions
  1. 4 4
      docker/image/admin/app.sh

+ 4 - 4
docker/image/admin/app.sh

@@ -76,9 +76,9 @@ function checkStart() {
 
 function start_canal() {
     echo "start canal ..."
-    serverPort=`perl -le 'print $ENV{"canal.port"}'`
-    if [ -z "$serverPort" ] ; then
-        serverPort=11111
+    metricsPort=`perl -le 'print $ENV{"canal.metrics.pull.port"}'`
+    if [ -z "$metricsPort" ] ; then
+        metricsPort=11112
     fi
 
     destination=`perl -le 'print $ENV{"canal.destinations"}'`
@@ -95,7 +95,7 @@ function start_canal() {
     su admin -c 'cd /home/admin/canal-server/bin/ && sh restart.sh 1>>/tmp/start.log 2>&1'
     sleep 5
     #check start
-    checkStart "canal" "nc 127.0.0.1 $serverPort -w 1 -z | wc -l" 30
+    checkStart "canal" "nc 127.0.0.1 $metricsPort -w 1 -z | wc -l" 30
 }
 
 function stop_canal() {