[MDEV-27193] Galera Cluster fails to start in FreeBSD Created: 2021-12-07  Updated: 2021-12-07

Status: Open
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.5.13
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Albert Valbuena Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

FreeBSD 13.0-RELEASE-p4 + MariaDB 10.5.13 + Galera 26-26.4.9


Attachments: Text File galera_cluster_full_log.txt    

 Description   

Unable to create a cluster of three nodes on FreeBSD 13.0-RELEASE-p4 + MariaDB 10.5.13 + Galera 26-26.4.9.

It fails at startup creating 4 processes at boot time (only 2 when using the service commad). Althought the processes exist the 'service mysql-server status' command states the mysql daemon isn't running.

Current configuration in /etc/rc.conf

mysql_enable="YES"
mysql_args="--wsrep-new-cluster"
mysql_optfile="/usr/local/etc/mysql/my.cnf"

Current configuration in /usr/local/etc/mysql/my.cnf

[albert@Cluster1 ~]$ cat /usr/local/etc/mysql/my.cnf
#

  1. This group is read both by the client and the server
  2. use it for options that affect everything, see
  3. https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#option-groups
    #
    [client-server]
    port = 3306
    socket = /var/run/mysql/mysql.sock

#

  1. include *.cnf from the config directory
    #
    !includedir /usr/local/etc/mysql/conf.d/
    [albert@Cluster1 ~]$

Current configuration of the /usr/local/etc/mysql/conf.d/wsrep.cnf file

[albert@Cluster1 /usr/local/etc/mysql/conf.d]$ cat wsrep.cnf

  1. This file contains wsrep-related mysqld options. It should be included
  2. in the main MySQL configuration file.
    #
  3. Options that need to be customized:
  4. - wsrep_provider
  5. - wsrep_cluster_address
  6. - wsrep_sst_auth
  7. The rest of defaults should work out of the box.

##

    1. mysqld options MANDATORY for correct opration of the cluster
      ##
      [mysqld]
  1. (This must be substituted by wsrep_format)
    binlog_format=ROW
  1. Currently only InnoDB storage engine is supported
    default-storage-engine=innodb
  1. to avoid issues with 'bulk mode inserts' using autoinc
    innodb_autoinc_lock_mode=2
  1. Override bind-address
  2. In some systems bind-address defaults to 127.0.0.1, and with mysqldump SST
  3. it will have (most likely) disastrous consequences on donor node
    bind-address=0.0.0.0

##

    1. WSREP options
      ##
  1. Enable wsrep
    wsrep_on=1
  1. Full path to wsrep provider library or 'none'
    wsrep_provider=/usr/local/lib/libgalera_smm.so
  1. Provider specific configuration options
    #wsrep_provider_options=
  1. Logical cluster name. Should be the same for all nodes.
    wsrep_cluster_name="test_cluster"
  1. Group communication system handle
    wsrep_cluster_address="gcomm://192.168.1.73,192.168.1.79,192.168.1.80"
  1. Human-readable node name (non-unique). Hostname by default.
    wsrep_node_name=Cluster1
  1. Base replication <address|hostname>[:port] of the node.
  2. The values supplied will be used as defaults for state transfer receiving,
  3. listening ports and so on. Default: address of the first network interface.
    wsrep_node_address=192.168.1.73
  1. Address for incoming client connections. Autodetect by default.
    #wsrep_node_incoming_address=
  1. How many threads will process writesets from other nodes
    wsrep_slave_threads=1
  1. DBUG options for wsrep provider
    #wsrep_dbug_option
  1. Generate fake primary keys for non-PK tables (required for multi-master
  2. and parallel applying operation)
    wsrep_certify_nonPK=1
  1. Maximum number of rows in write set
    wsrep_max_ws_rows=0
  1. Maximum size of write set
    wsrep_max_ws_size=2147483647
  1. to enable debug level logging, set this to 1
    wsrep_debug=0
  1. convert locking sessions into transactions
    wsrep_convert_LOCK_to_trx=0
  1. how many times to retry deadlocked autocommits
    wsrep_retry_autocommit=1
  1. change auto_increment_increment and auto_increment_offset automatically
    wsrep_auto_increment_control=1
  1. retry autoinc insert, which failed for duplicate key error
    wsrep_drupal_282555_workaround=0
  1. enable "strictly synchronous" semantics for read operations
    wsrep_causal_reads=0
  1. Command to call when node status or cluster membership changes.
  2. Will be passed all or some of the following options:
  3. --status - new status of this node
  4. --uuid - UUID of the cluster
  5. --primary - whether the component is primary or not ("yes"/"no")
  6. --members - comma-separated list of members
  7. --index - index of this node in the list
    wsrep_notify_cmd=

##

    1. WSREP State Transfer options
      ##
  1. State Snapshot Transfer method
    wsrep_sst_method=rsync
  1. Address which donor should send State Snapshot to.
  2. Should be the address of THIS node. DON'T SET IT TO DONOR ADDRESS!!!
  3. (SST method dependent. Defaults to the first IP of the first interface)
    #wsrep_sst_receive_address=
  1. SST authentication string. This will be used to send SST to joining nodes.
  2. Depends on SST method. For mysqldump method it is root:<root password>
    wsrep_sst_auth=root:
  1. Desired SST donor name.
    #wsrep_sst_donor=
  1. Reject client queries when donating SST (false)
    #wsrep_sst_donor_rejects_queries=0
  1. Protocol version to use
  2. wsrep_protocol_version=
    [albert@Cluster1 /usr/local/etc/mysql/conf.d]$

Error clues in log messages (full log attached)

2021-12-07 0:15:57 0 [ERROR] WSREP: exception from gcomm, backend must be restarted: failed to set FD_CLOEXEC: 9 (Bad file descriptor)
at /wrkdirs/usr/ports/databases/galera26/work/galera-release_26.4.9/galerautils/src/gu_asio_socket_util.hpp:set_fd_options():41
2021-12-07 0:15:57 0 [Note] WSREP: gcomm: terminating thread
2021-12-07 0:15:57 0 [Note] WSREP: gcomm: joining thread
2021-12-07 0:15:57 0 [Note] WSREP: gcomm: closing backend
2021-12-07 0:15:57 0 [Note] WSREP: Forced PC close
2021-12-07 0:15:57 0 [Note] WSREP: gcomm: closed
2021-12-07 0:15:57 0 [ERROR] WSREP: Failed to connect to cluster: GCommConn::get_mtu(): backend connection not open (FATAL)
at /wrkdirs/usr/ports/databases/galera26/work/galera-release_26.4.9/gcs/src/gcs_gcomm.cpp:get_mtu():221
2021-12-07 0:15:57 0 [ERROR] WSREP: wsrep::connect(gcomm://192.168.1.73,192.168.1.79,192.168.1.80) failed: 7
2021-12-07 0:15:57 0 [ERROR] Aborting

This is just a user speaking without debugging abilities. If guidance is available hands can be offered.

A bug in FreeBSD's bug tracker already opened BUT there's no maintainer for the specific port.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259795


Generated at Thu Feb 08 09:51:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.