File tree 5 files changed +5
-5
lines changed
5 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ RUN chmod +x /usr/local/bin/*
21
21
COPY --from=0 /zu/build/libs/zu.jar /opt/libs/
22
22
23
23
RUN apt-get -q update && \
24
- apt-get install -y dnsutils curl procps
24
+ apt-get install -y dnsutils curl procps socat
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ set -ex
13
13
14
14
source /conf/env.sh
15
15
16
- OK=$( echo ruok | nc 127.0.0.1 $CLIENT_PORT )
16
+ OK=$( echo ruok | socat stdio tcp:localhost: $CLIENT_PORT )
17
17
18
18
# Check to see if zookeeper service answers
19
19
if [[ " $OK " == " imok" ]]; then
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ set -ex
13
13
14
14
source /conf/env.sh
15
15
16
- echo mntr | nc localhost $CLIENT_PORT >& 1
16
+ echo mntr | socat stdio tcp:localhost: $CLIENT_PORT >& 1
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ MYID_FILE=$DATA_DIR/myid
20
20
LOG4J_CONF=/conf/log4j-quiet.properties
21
21
STATIC_CONFIG=/data/conf/zoo.cfg
22
22
23
- OK=$( echo ruok | nc 127.0.0.1 $CLIENT_PORT )
23
+ OK=$( echo ruok | socat stdio tcp:localhost: $CLIENT_PORT )
24
24
25
25
# Check to see if zookeeper service answers
26
26
if [[ " $OK " == " imok" ]]; then
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ LOG4J_CONF=/conf/log4j-quiet.properties
21
21
# Wait for client connections to drain. Kubernetes will wait until the confiugred
22
22
# "terminationGracePeriodSeconds" before focibly killing the container
23
23
for (( i = 0 ; i < 6 ; i++ )) ; do
24
- CONN_COUNT=` echo cons | nc localhost 2181 | grep -v " ^$" | grep -v " /127.0.0.1:" | wc -l`
24
+ CONN_COUNT=` echo cons | socat stdio tcp:localhost: $CLIENT_PORT | grep -v " ^$" | grep -v " /127.0.0.1:" | wc -l`
25
25
if [[ " $CONN_COUNT " -gt 0 ]]; then
26
26
echo " $CONN_COUNT non-local connections still connected."
27
27
sleep 5
You can’t perform that action at this time.
0 commit comments