Skip to content

Instantly share code, notes, and snippets.

@mengu
Created September 22, 2020 18:57
Show Gist options
  • Save mengu/43b18550289df61cac44e93b78c500e1 to your computer and use it in GitHub Desktop.
Save mengu/43b18550289df61cac44e93b78c500e1 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "describe cluster;" > /tmp/dc
for i in 1 2 3 4 5; do
echo Attempt $i
if nodetool status | grep "^UN"; then
exit 0
else
sleep 10
fi
done
echo ""
echo "Cassandra failed to start!!"
echo ""
echo "------ Cassandra info -------"
bash -x -c "ps ax | grep -i cassandra"
bash -x -c "sudo lsof -i4TCP:9042"
echo ""
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment