1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

add check for 3306 port inuse

This commit is contained in:
david hill
2017-07-04 03:51:27 -05:00
parent 9df0eb6c64
commit 3601c344ba

View File

@ -62,9 +62,10 @@ helpPrint () {
echo " OS version" echo " OS version"
echo " Locale settings" echo " Locale settings"
echo " Firewall settings" echo " Firewall settings"
echo " Date/time settings" echo " Date/time settings"
echo " MariaDB port 3306 availability"
echo " Dependent packages installed" echo " Dependent packages installed"
echo " For non-root user install - test permissions on /tmp and /dev/shm" echo " For non-root user install - test permissions on /tmp and /dev/shm"
echo "" echo ""
echo "Usage: $0 [options]" echo "Usage: $0 [options]"
echo "OPTIONS:" echo "OPTIONS:"
@ -1018,6 +1019,40 @@ checkPackages()
fi fi
} }
checkMySQLPort()
{
# MySQL Port Usage check
#
echo ""
echo "** Run MariaDB Port Usage check - port 3306 shouldn't be in-use"
echo ""
pass=true
`netstat -na | grep -e ":3306 " | grep LISTEN > /dev/null 2>&1`
if [ "$?" -eq 0 ]; then
echo "${bold}Failed${normal}, Local Node - MariaDB port 3306 is being used. Recommend stopping the process that is using that port"
pass=false
else
echo "Local Node - MariaDB port 3306 is not in-use"
fi
if [ "$IPADDRESSES" != "" ]; then
for ipadd in "${NODE_IPADDRESS[@]}"; do
`./remote_command.sh $ipadd $PASSWORD "netstat -na | grep -e ":3306 " | grep LISTEN > /dev/null 2>&1" 1 > /tmp/remote_command_check 2>&1`
if [ "$?" -eq 0 ]; then
echo "${bold}Failed${normal}, $ipadd MariaDB port 3306 is being used. Recommend stopping the process that is using that port"
pass=false
else
echo "$ipadd MariaDB port 3306 is not in-use"
fi
done
fi
if ! $pass; then
checkContinue
fi
}
echo "" echo ""
echo "*** This is the MariaDB Columnstore Cluster System test tool ***" echo "*** This is the MariaDB Columnstore Cluster System test tool ***"
echo "" echo ""
@ -1035,6 +1070,7 @@ if [ "$IPADDRESSES" != "" ]; then
checkPorts checkPorts
checkTime checkTime
fi fi
checkMySQLPort
checkPackages checkPackages
if [ $REPORTPASS == true ] ; then if [ $REPORTPASS == true ] ; then