Skip to content

Commit

Permalink
Merge pull request #150 from AKamyshnikova/bootstrap
Browse files Browse the repository at this point in the history
Update bootstrap.sh
  • Loading branch information
AKamyshnikova authored Jun 5, 2024
2 parents a629b7f + dea5423 commit edcceb3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docker/bootstrap/files/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ if [ -n "$CASSANDRA_SEEDS" ]; then
for cassandra in ${array[@]}
do
echo "Try to connect to $cassandra"
if nc -z -w5 $cassandra 8778
if nc -z -w5 $cassandra 8778 2>/tmp/result.txt
then
echo "Connected!"
firstNode=false
break
echo "Connected!"
firstNode=false
break
fi
if cat /tmp/result.txt | grep -E 'Temporary failure in name resolution'
then
echo "DNS is not available! Exiting"
exit 1
fi
done

Expand Down

0 comments on commit edcceb3

Please sign in to comment.