Skip to content

Commit 84a2293

Browse files
authored
Update startNodeManager.sh to use port test instead of grepping log message to determine if nodemanager is running (#3328)
* Use port test instead of grep log message to determine if nodemanager is running * suppress connect refused messages from listen port tests
1 parent 485ba86 commit 84a2293

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

operator/src/main/resources/scripts/startNodeManager.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,10 @@ start_secs=$SECONDS
333333
max_wait_secs=${NODE_MANAGER_MAX_WAIT:-60}
334334
while [ 1 -eq 1 ]; do
335335
sleep 1
336-
if [ -e ${nodemgr_log_file} ] && [ `grep -c "Plain socket listener started" ${nodemgr_log_file}` -gt 0 ]; then
336+
# Test if node manager listen port is reachable
337+
$(timeout 1 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/5556' > /dev/null 2>&1)
338+
res="$?"
339+
if [ $res -eq 0 ]; then
337340
break
338341
fi
339342
if [ $((SECONDS - $start_secs)) -ge $max_wait_secs ]; then

0 commit comments

Comments
 (0)