Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1.28
-
None
Description
A Galera cluster uses encryption for SST with the following configuration:
[sst]
|
encrypt=3
|
tkey=/path/to/key.pem |
tcert=/path/to/cert.pem |
tca=/path/to/ca.pem |
Upgrading a node to 10.1.28 (in a Galera cluster of 10.1.23 nodes) fails with:
2017-11-04 18:23:17 140462627223296 [Note] WSREP: (3804918b, 'tcp://0.0.0.0:4567') turning message relay requesting off
|
xb_stream_read_chunk(): wrong chunk magic at offset 0x0.
|
WSREP_SST: [ERROR] Error while getting data from donor node: exit codes: 137 1 (20171104 18:24:55.419)
|
WSREP_SST: [ERROR] Cleanup after exit with status:32 (20171104 18:24:55.421)
|
One explication is that the joiner doesn't expect an encrypted stream, poining at a problem with the configuration under [sst] section.
After some investigation I restricted the problem to the wsrep_sst_xtrabackup-v2's function parse_cnf() which was moved to wsrep_sst_common.
In 10.1.23 parse_cnf() is in wsrep_sst_xtrabackup-v2 and it's:
parse_cnf()
|
{
|
local group=$1 |
local var=$2 |
# print the default settings for given group using my_print_default. |
# normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) |
# then grep for needed variable |
# finally get the variable value (if variables has been specified multiple time use the last value only) |
reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) |
if [[ -z $reval ]];then |
[[ -n $3 ]] && reval=$3 |
fi
|
echo $reval
|
}
|
In 10.1.28 it's moved to wsrep_sst_common and it's:
parse_cnf()
|
{
|
local group=$1 |
local var=$2 |
local reval="" |
|
# print the default settings for given group using my_print_default. |
# normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) |
# then grep for needed variable |
# finally get the variable value (if variables has been specified multiple time use the last value only) |
|
# look in group+suffix
|
if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then |
reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) |
fi
|
|
# look in group
|
if [[ -z $reval ]]; then |
reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) |
fi
|
|
# use default if we haven't found a value |
if [[ -z $reval ]]; then |
[[ -n $3 ]] && reval=$3 |
fi
|
echo $reval
|
}
|
|
Using wsrep_sst_common and wsrep_sst_xtrabackup-v2 from version 10.1.23 on 10.1.28 fixes the problem and the node succesfully joins.
Attachments
Issue Links
- relates to
-
MDEV-15254 10.1.31 does not join an existing cluster with SST xtrabackup-v2
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
A Galera cluster uses encryption for SST with the following configuration:
{{[sst] encrypt=3 tkey=/path/to/key.pem tcert=/path/to/cert.pem tca=/path/to/ca.pem}} Upgrading a node in a Galera cluster of 10.1.23 nodes fails with: 2017-11-04 18:23:17 140462627223296 [Note] WSREP: (3804918b, 'tcp://0.0.0.0:4567') turning message relay requesting off xb_stream_read_chunk(): wrong chunk magic at offset 0x0. WSREP_SST: [ERROR] Error while getting data from donor node: exit codes: 137 1 (20171104 18:24:55.419) WSREP_SST: [ERROR] Cleanup after exit with status:32 (20171104 18:24:55.421) One explication is that the joiner doesn't expect an encrypted stream, poining at a problem with the configuration under [sst] section. After some investigation I restricted the problem to the wsrep_sst_xtrabackup-v2's function parse_cnf() which was moved to wsrep_sst_common. In 10.1.23 parse_cnf() is in wsrep_sst_xtrabackup-v2 and it's: {code:java} parse_cnf() { local group=$1 local var=$2 # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) if [[ -z $reval ]];then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} In 10.1.28 it's moved to wsrep_sst_common and it's: {code:java} parse_cnf() { local group=$1 local var=$2 local reval="" # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) # look in group+suffix if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # look in group if [[ -z $reval ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # use default if we haven't found a value if [[ -z $reval ]]; then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} Using wsrep_sst_common and wsrep_sst_xtrabackup-v2 from version 10.1.23 on 10.1.28 fixes the problem and the node succesfully joins. |
A Galera cluster uses encryption for SST with the following configuration:
{code:bash} [sst] encrypt=3 tkey=/path/to/key.pem tcert=/path/to/cert.pem tca=/path/to/ca.pem {code} Upgrading a node in a Galera cluster of 10.1.23 nodes fails with: 2017-11-04 18:23:17 140462627223296 [Note] WSREP: (3804918b, 'tcp://0.0.0.0:4567') turning message relay requesting off xb_stream_read_chunk(): wrong chunk magic at offset 0x0. WSREP_SST: [ERROR] Error while getting data from donor node: exit codes: 137 1 (20171104 18:24:55.419) WSREP_SST: [ERROR] Cleanup after exit with status:32 (20171104 18:24:55.421) One explication is that the joiner doesn't expect an encrypted stream, poining at a problem with the configuration under [sst] section. After some investigation I restricted the problem to the wsrep_sst_xtrabackup-v2's function parse_cnf() which was moved to wsrep_sst_common. In 10.1.23 parse_cnf() is in wsrep_sst_xtrabackup-v2 and it's: {code:java} parse_cnf() { local group=$1 local var=$2 # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) if [[ -z $reval ]];then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} In 10.1.28 it's moved to wsrep_sst_common and it's: {code:java} parse_cnf() { local group=$1 local var=$2 local reval="" # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) # look in group+suffix if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # look in group if [[ -z $reval ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # use default if we haven't found a value if [[ -z $reval ]]; then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} Using wsrep_sst_common and wsrep_sst_xtrabackup-v2 from version 10.1.23 on 10.1.28 fixes the problem and the node succesfully joins. |
Description |
A Galera cluster uses encryption for SST with the following configuration:
{code:bash} [sst] encrypt=3 tkey=/path/to/key.pem tcert=/path/to/cert.pem tca=/path/to/ca.pem {code} Upgrading a node in a Galera cluster of 10.1.23 nodes fails with: 2017-11-04 18:23:17 140462627223296 [Note] WSREP: (3804918b, 'tcp://0.0.0.0:4567') turning message relay requesting off xb_stream_read_chunk(): wrong chunk magic at offset 0x0. WSREP_SST: [ERROR] Error while getting data from donor node: exit codes: 137 1 (20171104 18:24:55.419) WSREP_SST: [ERROR] Cleanup after exit with status:32 (20171104 18:24:55.421) One explication is that the joiner doesn't expect an encrypted stream, poining at a problem with the configuration under [sst] section. After some investigation I restricted the problem to the wsrep_sst_xtrabackup-v2's function parse_cnf() which was moved to wsrep_sst_common. In 10.1.23 parse_cnf() is in wsrep_sst_xtrabackup-v2 and it's: {code:java} parse_cnf() { local group=$1 local var=$2 # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) if [[ -z $reval ]];then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} In 10.1.28 it's moved to wsrep_sst_common and it's: {code:java} parse_cnf() { local group=$1 local var=$2 local reval="" # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) # look in group+suffix if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # look in group if [[ -z $reval ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # use default if we haven't found a value if [[ -z $reval ]]; then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} Using wsrep_sst_common and wsrep_sst_xtrabackup-v2 from version 10.1.23 on 10.1.28 fixes the problem and the node succesfully joins. |
A Galera cluster uses encryption for SST with the following configuration:
{code:bash} [sst] encrypt=3 tkey=/path/to/key.pem tcert=/path/to/cert.pem tca=/path/to/ca.pem {code} Upgrading a node to 10.1.28 (in a Galera cluster of 10.1.23 nodes) fails with: 2017-11-04 18:23:17 140462627223296 [Note] WSREP: (3804918b, 'tcp://0.0.0.0:4567') turning message relay requesting off xb_stream_read_chunk(): wrong chunk magic at offset 0x0. WSREP_SST: [ERROR] Error while getting data from donor node: exit codes: 137 1 (20171104 18:24:55.419) WSREP_SST: [ERROR] Cleanup after exit with status:32 (20171104 18:24:55.421) One explication is that the joiner doesn't expect an encrypted stream, poining at a problem with the configuration under [sst] section. After some investigation I restricted the problem to the wsrep_sst_xtrabackup-v2's function parse_cnf() which was moved to wsrep_sst_common. In 10.1.23 parse_cnf() is in wsrep_sst_xtrabackup-v2 and it's: {code:java} parse_cnf() { local group=$1 local var=$2 # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) if [[ -z $reval ]];then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} In 10.1.28 it's moved to wsrep_sst_common and it's: {code:java} parse_cnf() { local group=$1 local var=$2 local reval="" # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) # look in group+suffix if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # look in group if [[ -z $reval ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # use default if we haven't found a value if [[ -z $reval ]]; then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} Using wsrep_sst_common and wsrep_sst_xtrabackup-v2 from version 10.1.23 on 10.1.28 fixes the problem and the node succesfully joins. |
Description |
A Galera cluster uses encryption for SST with the following configuration:
{code:bash} [sst] encrypt=3 tkey=/path/to/key.pem tcert=/path/to/cert.pem tca=/path/to/ca.pem {code} Upgrading a node to 10.1.28 (in a Galera cluster of 10.1.23 nodes) fails with: 2017-11-04 18:23:17 140462627223296 [Note] WSREP: (3804918b, 'tcp://0.0.0.0:4567') turning message relay requesting off xb_stream_read_chunk(): wrong chunk magic at offset 0x0. WSREP_SST: [ERROR] Error while getting data from donor node: exit codes: 137 1 (20171104 18:24:55.419) WSREP_SST: [ERROR] Cleanup after exit with status:32 (20171104 18:24:55.421) One explication is that the joiner doesn't expect an encrypted stream, poining at a problem with the configuration under [sst] section. After some investigation I restricted the problem to the wsrep_sst_xtrabackup-v2's function parse_cnf() which was moved to wsrep_sst_common. In 10.1.23 parse_cnf() is in wsrep_sst_xtrabackup-v2 and it's: {code:java} parse_cnf() { local group=$1 local var=$2 # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) if [[ -z $reval ]];then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} In 10.1.28 it's moved to wsrep_sst_common and it's: {code:java} parse_cnf() { local group=$1 local var=$2 local reval="" # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) # look in group+suffix if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # look in group if [[ -z $reval ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # use default if we haven't found a value if [[ -z $reval ]]; then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} Using wsrep_sst_common and wsrep_sst_xtrabackup-v2 from version 10.1.23 on 10.1.28 fixes the problem and the node succesfully joins. |
A Galera cluster uses encryption for SST with the following configuration:
{code:bash} [sst] encrypt=3 tkey=/path/to/key.pem tcert=/path/to/cert.pem tca=/path/to/ca.pem {code} Upgrading a node to 10.1.28 (in a Galera cluster of 10.1.23 nodes) fails with: {noformat} 2017-11-04 18:23:17 140462627223296 [Note] WSREP: (3804918b, 'tcp://0.0.0.0:4567') turning message relay requesting off xb_stream_read_chunk(): wrong chunk magic at offset 0x0. WSREP_SST: [ERROR] Error while getting data from donor node: exit codes: 137 1 (20171104 18:24:55.419) WSREP_SST: [ERROR] Cleanup after exit with status:32 (20171104 18:24:55.421) {noformat} One explication is that the joiner doesn't expect an encrypted stream, poining at a problem with the configuration under [sst] section. After some investigation I restricted the problem to the wsrep_sst_xtrabackup-v2's function parse_cnf() which was moved to wsrep_sst_common. In 10.1.23 parse_cnf() is in wsrep_sst_xtrabackup-v2 and it's: {code:java} parse_cnf() { local group=$1 local var=$2 # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) if [[ -z $reval ]];then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} In 10.1.28 it's moved to wsrep_sst_common and it's: {code:java} parse_cnf() { local group=$1 local var=$2 local reval="" # print the default settings for given group using my_print_default. # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) # then grep for needed variable # finally get the variable value (if variables has been specified multiple time use the last value only) # look in group+suffix if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # look in group if [[ -z $reval ]]; then reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) fi # use default if we haven't found a value if [[ -z $reval ]]; then [[ -n $3 ]] && reval=$3 fi echo $reval } {code} Using wsrep_sst_common and wsrep_sst_xtrabackup-v2 from version 10.1.23 on 10.1.28 fixes the problem and the node succesfully joins. |
Fix Version/s | 10.1 [ 16100 ] | |
Assignee | Andrii Nikitin [ anikitin ] |
Comment |
[ Fixed in |
Assignee | Andrii Nikitin [ anikitin ] |
Fix Version/s | 10.1.29 [ 22636 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 83668 ] | MariaDB v4 [ 153135 ] |
We are experiencing a similar problem. We have compressor and decompressor configured under the [sst] section of my.cnf
The problem as we see it is that those settings are being ignored because the code that tries to execute is
because the $WSREP_SST_OPT_CONF variable is empty.
If we run the line as
basically just remove the "-c" as well as the reference to the variable the value is properly extracted.