[Maria-discuss] Galera Cluster on FreeBSD
Hello, I'm trying to setup a galera cluster on FreeBSD. I followed the instructions on [1] but every time I issue SHOW STATUS LIKE 'wsrep_cluster_size'; I get +--------------------+-------+ | Variable_name | Value | +--------------------+-------+ | wsrep_cluster_size | 0 | +--------------------+-------+ 1 row in set (0.00 sec) So, the cluster is not working. This is the configuration of the node that I want to set as primary: -----------------------------------8<----------------------------------- [mysqld] datadir=/var/db/mysql socket=/tmp/mysql.sock user=mysql binlog_format=ROW bind-address=0.0.0.0 default_storage_engine=innodb innodb_autoinc_lock_mode=2 innodb_flush_log_at_trx_commit=0 innodb_buffer_pool_size=122M wsrep_provider=/usr/local/lib/libgalera_smm.so wsrep_provider_options="gcache.size=300M; gcache.page_size=300M" wsrep_cluster_name="klaas_cluster" wsrep_cluster_address="gcomm://" #wsrep_cluster_address="gcomm://10.1.7.1,10.1.7.2,10.3.7.1" wsrep_sst_method=rsync [mysql] wsrep_cluster_name=klaas_cluster wsrep_cluster_address="gcomm://10.1.7.1,10.1.7.2,10.3.7.1" wsrep_node_name=box-hlm-01 wsrep_node_address="10.1.7.1" [mysql_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid ----------------------------------->8----------------------------------- On the other two nodes the configuration is the same, except (1) only the second `wsrep_cluster_address` exists; (2) `wsrep_node_address` differs, obviously. Instead of using an "empty" `wsrep_cluster_address` I also tried setting mysql_args="--wsrep-new-cluster" in /etc/rc.conf without getting the desired result. The logs lack any relevant warnings or errors: -----------------------------------8<----------------------------------- 160602 07:59:44 mysqld_safe mysqld from pid file /var/db/mysql/mariadb1.box-hlm-01.klaas.pid ended 160602 08:00:34 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql 2016-06-02 8:00:34 34426872832 [Note] /usr/local/libexec/mysqld (mysqld 10.1.13-MariaDB) starting as process 22580 ... 2016-06-02 8:00:34 34426872832 [Warning] You need to use --log-bin to make --binlog-format work. 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-06-02 8:00:34 34426872832 [Note] InnoDB: The InnoDB memory heap is disabled 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Memory barrier is not used 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Compressed tables use zlib 1.2.8 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Using SSE crc32 instructions 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Initializing buffer pool, size = 122.0M 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Completed initialization of buffer pool 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Highest supported file format is Barracuda. 2016-06-02 8:00:34 34426872832 [Note] InnoDB: 128 rollback segment(s) are active. 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Waiting for purge to start 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 1616955 2016-06-02 8:00:34 34426872832 [Note] Plugin 'FEEDBACK' is disabled. 2016-06-02 8:00:34 34426899456 [Note] InnoDB: Dumping buffer pool(s) not yet started 2016-06-02 8:00:34 34426872832 [Note] Server socket created on IP: '0.0.0.0'. 2016-06-02 8:00:34 34426872832 [Note] /usr/local/libexec/mysqld: ready for connections. Version: '10.1.13-MariaDB' socket: '/tmp/mysql.sock' port: 3306 FreeBSD Ports ----------------------------------->8----------------------------------- Any help is very much appreciated. Niklaas 1: http://galeracluster.com/documentation-webpages/index.html
Hi Niklaas, in MariaDB 10.1, Galera replicator needs to be explicitely enabled. Try adding this to your configuration file: wsrep_on=ON Kind regards GL Le jeu. 2 juin 2016 à 08:56, Niklaas Baudet von Gersdorff <stdin@niklaas.eu> a écrit :
Hello,
I'm trying to setup a galera cluster on FreeBSD. I followed the instructions on [1] but every time I issue
SHOW STATUS LIKE 'wsrep_cluster_size';
I get
+--------------------+-------+ | Variable_name | Value | +--------------------+-------+ | wsrep_cluster_size | 0 | +--------------------+-------+ 1 row in set (0.00 sec)
So, the cluster is not working. This is the configuration of the node that I want to set as primary:
-----------------------------------8<-----------------------------------
[mysqld] datadir=/var/db/mysql socket=/tmp/mysql.sock user=mysql binlog_format=ROW bind-address=0.0.0.0 default_storage_engine=innodb innodb_autoinc_lock_mode=2 innodb_flush_log_at_trx_commit=0 innodb_buffer_pool_size=122M wsrep_provider=/usr/local/lib/libgalera_smm.so wsrep_provider_options="gcache.size=300M; gcache.page_size=300M" wsrep_cluster_name="klaas_cluster" wsrep_cluster_address="gcomm://" #wsrep_cluster_address="gcomm://10.1.7.1,10.1.7.2,10.3.7.1" wsrep_sst_method=rsync
[mysql] wsrep_cluster_name=klaas_cluster wsrep_cluster_address="gcomm://10.1.7.1,10.1.7.2,10.3.7.1" wsrep_node_name=box-hlm-01 wsrep_node_address="10.1.7.1"
[mysql_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
----------------------------------->8-----------------------------------
On the other two nodes the configuration is the same, except (1) only the second `wsrep_cluster_address` exists; (2) `wsrep_node_address` differs, obviously.
Instead of using an "empty" `wsrep_cluster_address` I also tried setting
mysql_args="--wsrep-new-cluster"
in /etc/rc.conf without getting the desired result. The logs lack any relevant warnings or errors:
-----------------------------------8<-----------------------------------
160602 07:59:44 mysqld_safe mysqld from pid file /var/db/mysql/mariadb1.box-hlm-01.klaas.pid ended 160602 08:00:34 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql 2016-06-02 8:00:34 34426872832 [Note] /usr/local/libexec/mysqld (mysqld 10.1.13-MariaDB) starting as process 22580 ... 2016-06-02 8:00:34 34426872832 [Warning] You need to use --log-bin to make --binlog-format work. 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-06-02 8:00:34 34426872832 [Note] InnoDB: The InnoDB memory heap is disabled 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Memory barrier is not used 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Compressed tables use zlib 1.2.8 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Using SSE crc32 instructions 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Initializing buffer pool, size = 122.0M 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Completed initialization of buffer pool 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Highest supported file format is Barracuda. 2016-06-02 8:00:34 34426872832 [Note] InnoDB: 128 rollback segment(s) are active. 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Waiting for purge to start 2016-06-02 8:00:34 34426872832 [Note] InnoDB: Percona XtraDB ( http://www.percona.com) 5.6.28-76.1 started; log sequence number 1616955 2016-06-02 8:00:34 34426872832 [Note] Plugin 'FEEDBACK' is disabled. 2016-06-02 8:00:34 34426899456 [Note] InnoDB: Dumping buffer pool(s) not yet started 2016-06-02 8:00:34 34426872832 [Note] Server socket created on IP: '0.0.0.0'. 2016-06-02 8:00:34 34426872832 [Note] /usr/local/libexec/mysqld: ready for connections. Version: '10.1.13-MariaDB' socket: '/tmp/mysql.sock' port: 3306 FreeBSD Ports
----------------------------------->8-----------------------------------
Any help is very much appreciated.
Niklaas
1: http://galeracluster.com/documentation-webpages/index.html
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Guillaume Lefranc [2016-06-02 08:05 +0000] :
in MariaDB 10.1, Galera replicator needs to be explicitely enabled. Try adding this to your configuration file:
wsrep_on=ON
Great, thanks for mentioning that! Unfortunately though, I end up with an error and MariaDB fails to start. I have the following configuration: --------------------8<-------------------- [mysqld] datadir=/var/db/mysql socket=/tmp/mysql.sock user=mysql binlog_format=ROW bind-address=0.0.0.0 default_storage_engine=innodb innodb_autoinc_lock_mode=2 innodb_flush_log_at_trx_commit=0 innodb_buffer_pool_size=122M wsrep_on=ON wsrep_provider=/usr/local/lib/libgalera_smm.so wsrep_provider_options="gcache.size=300M; gcache.page_size=300M" wsrep_cluster_name="klaas_cluster" wsrep_cluster_address="gcomm://" #wsrep_cluster_address="gcomm://10.1.7.1,10.2.7.1,10.3.7.1" wsrep_sst_method=rsync wsrep_node_name=box-hlm-01 wsrep_node_address="10.1.7.1" [mysql_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid -------------------->8-------------------- As you can see, I moved the last wsrep_* options from [mysql] to [mysqld]. The documentation first mentions to put them under [mysqld] and then under [mysql] in the subsequent question. Anyway, after I added wsrep_on=ON I got an error messages stating that the node address could not be determined. So I thought that wsrep_node_address (and the other options) actually belong to [mysqld] (and not [mysql]). Nonetheless, I get the following error: --------------------8<-------------------- 160602 14:32:19 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql 160602 14:32:19 mysqld_safe WSREP: Running position recovery with --log_error='/var/db/mysql/wsrep_recovery.KnBaDz' --pid-file='/var/db/mysql/mariadb1.box-hlm-01.klaas-recover.pid' 2016-06-02 14:32:19 34426872832 [Note] /usr/local/libexec/mysqld (mysqld 10.1.13-MariaDB) starting as process 27488 ... 160602 14:32:21 mysqld_safe WSREP: Recovered position 00000000-0000-0000-0000-000000000000:-1 2016-06-02 14:32:22 34426872832 [Note] /usr/local/libexec/mysqld (mysqld 10.1.13-MariaDB) starting as process 27501 ... 2016-06-02 14:32:22 34426872832 [Note] WSREP: Read nil XID from storage engines, skipping position init 2016-06-02 14:32:22 34426872832 [Note] WSREP: wsrep_load(): loading provider library '/usr/local/lib/libgalera_smm.so' 2016-06-02 14:32:22 34426872832 [Note] WSREP: wsrep_load(): Galera 3.5(rXXXX) by Codership Oy <info@codership.com> loaded successfully. 2016-06-02 14:32:22 34426872832 [Note] WSREP: CRC-32C: using hardware acceleration. 2016-06-02 14:32:22 34426872832 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1 2016-06-02 14:32:22 34426872832 [Note] WSREP: Passing config to GCS: base_host = 10.1.7.1; base_port = 4567; cert.log_conflicts = no; debug = no; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 1; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 2; evs.view_forget_timeout = PT24H; gcache.dir = /var/db/mysql/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /var/db/mysql//galera.cache; gcache.page_size = 300M; gcache.size = 300M; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.segment = 0; gmcast.version = 0; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.npvo = false; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = P30S; pc.weight = 1; protonet.back 2016-06-02 14:32:22 34426877952 [Note] WSREP: Service thread queue flushed. 2016-06-02 14:32:22 34426872832 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1 2016-06-02 14:32:22 34426872832 [Note] WSREP: wsrep_sst_grab() 2016-06-02 14:32:22 34426872832 [Note] WSREP: Start replication 2016-06-02 14:32:22 34426872832 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1 2016-06-02 14:32:22 34426872832 [Note] WSREP: protonet asio version 0 2016-06-02 14:32:22 34426872832 [Note] WSREP: Using CRC-32C (optimized) for message checksums. 2016-06-02 14:32:22 34426872832 [Note] WSREP: backend: asio 160602 14:32:22 [ERROR] mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see https://mariadb.com/kb/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 10.1.13-MariaDB key_buffer_size=0 read_buffer_size=131072 max_used_connections=0 max_threads=153 thread_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 335983 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x0 thread_stack 0x48400 0xafa3de <my_print_stacktrace+0x2e> at /usr/local/libexec/mysqld 0x72004e <handle_fatal_signal+0x22e> at /usr/local/libexec/mysqld 0x8031e9b4a <pthread_sigmask+0x51a> at /lib/libthr.so.3 0x8031e922c <pthread_getspecific+0xe1c> at /lib/libthr.so.3 The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 160602 14:32:22 mysqld_safe mysqld from pid file /var/db/mysql/mariadb1.box-hlm-01.klaas.pid ended -------------------->8-------------------- Is there an error in the configuration? Any help is very much appreciated. Niklaas
On 6/2/2016 8:50 AM, Niklaas Baudet von Gersdorff wrote:
160602 14:32:22 [ERROR] mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail.
Server version: 10.1.13-MariaDB key_buffer_size=0 read_buffer_size=131072 max_used_connections=0 max_threads=153 thread_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 335983 K bytes of memory Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x0 thread_stack 0x48400 0xafa3de <my_print_stacktrace+0x2e> at /usr/local/libexec/mysqld 0x72004e <handle_fatal_signal+0x22e> at /usr/local/libexec/mysqld 0x8031e9b4a <pthread_sigmask+0x51a> at /lib/libthr.so.3 0x8031e922c <pthread_getspecific+0xe1c> at /lib/libthr.so.3 The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 160602 14:32:22 mysqld_safe mysqld from pid file /var/db/mysql/mariadb1.box-hlm-01.klaas.pid ended
-------------------->8--------------------
Is there an error in the configuration?
Any help is very much appreciated.
This is https://jira.mariadb.org/browse/MDEV-9757 Brian
Brian Evans [2016-06-02 09:04 -0400] :
Oh, no. That's a pity. I eventually wanted to switch from MySQL. I'll subscribe to the bug report. Thanks for linking to it! Niklaas
On 6/2/2016 2:48 PM, Niklaas Baudet von Gersdorff wrote:
Brian Evans [2016-06-02 09:04 -0400] :
This is https://jira.mariadb.org/browse/MDEV-9757 Oh, no. That's a pity. I eventually wanted to switch from MySQL. I'll subscribe to the bug report. Thanks for linking to it!
Niklaas
FWIW galera-25.3.5 is a very old version (over 2 years now).. the latest is 25.3.16. You may want to update the library first and see if there are improvements and report that to the bug. Brian
Brian Evans [2016-06-02 16:03 -0400] :
FWIW galera-25.3.5 is a very old version (over 2 years now).. the latest is 25.3.16. You may want to update the library first and see if there are improvements and report that to the bug.
I followed up on this. There exists a bug report concerning the port in FreeBSD's infrastructure too: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208109#c10 And as it looks like, there remain errors with 25.3.15 as well. I don't know about *.16 though. I'll wait for the port to be updated. Anyway, thanks for your help! Niklaas
participants (3)
-
Brian Evans
-
Guillaume Lefranc
-
Niklaas Baudet von Gersdorff