From f9d8571f383c820accbca662cc4f850f5d29c98c Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Fri, 15 May 2020 18:35:19 +0200 Subject: MDEV-22554: galera_sst_mariabackup fails with "Failed to start mysqld.2" The problem is caused by the operation of netcat streamer and does not appear on systems where socat is installed. We need to add the "-N" option for netcat to call shutdown() on the socket when receiving EOF from STDIN. --- scripts/wsrep_sst_mariabackup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 4eb9917d341..1d6aedfb8eb 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -202,7 +202,11 @@ get_transfer() tcmd="nc ${REMOTEIP} ${TSST_PORT}" elif nc -h 2>&1 | grep -q -- '-d\>';then # Debian netcat - tcmd="nc ${REMOTEIP} ${TSST_PORT}" + if nc -h 2>&1 | grep -q -- '-N\>';then + tcmd="nc -N ${REMOTEIP} ${TSST_PORT}" + else + tcmd="nc ${REMOTEIP} ${TSST_PORT}" + fi else # traditional netcat tcmd="nc -q0 ${REMOTEIP} ${TSST_PORT}" -- cgit v1.2.1