Skip to content

Update startNodeManager.sh to use port test instead of grepping log message to determine if nodemanager is running #3328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion operator/src/main/resources/scripts/startNodeManager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,10 @@ start_secs=$SECONDS
max_wait_secs=${NODE_MANAGER_MAX_WAIT:-60}
while [ 1 -eq 1 ]; do
sleep 1
if [ -e ${nodemgr_log_file} ] && [ `grep -c "Plain socket listener started" ${nodemgr_log_file}` -gt 0 ]; then
# Test if node manager listen port is reachable
$(timeout 1 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/5556' > /dev/null 2>&1)
res="$?"
if [ $res -eq 0 ]; then
break
fi
if [ $((SECONDS - $start_secs)) -ge $max_wait_secs ]; then
Expand Down