Кластер MariaDB на виртуальных машинах CentOS не работает

В прошлом я успешно настраивал кластеры MariaDB-Galera на своих виртуальных машинах CentOS 6.3. Внезапно все просто не работает. Похоже, что это проблема, которая началась с MariaDB-Galera-server.x86_64 версии 5.5.37-1.el6. В последний раз я помню эту работу была с версией 5.5.36. Что-то изменилось с настройкой?

Я пробовал это с CentOS 6.3 и 6.5 без успеха.

1 ответ

ХОРОШО. Я попробовал несколько разных вещей и, наконец, вернулся к использованию предыдущей версии. Что-то изменилось с 5.5.36 и 5.5.37, что приводит к сбою передачи файлов данных на новый узел.

Я использую SST метод rsync.

Моя тестовая среда состоит из трех виртуальных машин CentOS 6.5 на моем Macbook. Я использую yum для установки MariaDB и Galera. Разница лишь в файле MariaDB.repo. Работающая установка использует: baseurl = http://yum.mariadb.org/5.5.36/centos6-amd64

Установка, которая не работает, использует: baseurl = http://yum.mariadb.org/5.5/centos6-amd64

Все остальное идентично.

Файл журнала на первичном узле содержит следующее при запуске второго узла:

140515 10:30:44 [Note] WSREP: declaring e18ac23e-dc45-11e3-a9cf-226f3dddee1e stable
140515 10:30:44 [Note] WSREP: Node d08d572e-dc45-11e3-927e-ffff30b2f80d state prim
140515 10:30:44 [Note] WSREP: view(view_id(PRIM,d08d572e-dc45-11e3-927e-ffff30b2f80d,2) memb {
    d08d572e-dc45-11e3-927e-ffff30b2f80d,0
    e18ac23e-dc45-11e3-a9cf-226f3dddee1e,0
} joined {
} left {
} partitioned {
})
140515 10:30:44 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 2
140515 10:30:44 [Note] WSREP: STATE_EXCHANGE: sent state UUID: e1b4f3cf-dc45-11e3-826a-7ffb98deb745
140515 10:30:44 [Note] WSREP: STATE EXCHANGE: sent state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745
140515 10:30:44 [Note] WSREP: STATE EXCHANGE: got state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745 from 0 (box1)
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: got state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745 from 1 (box2)
140515 10:30:45 [Note] WSREP: Quorum results:
    version    = 3,
    component  = PRIMARY,
    conf_id    = 1,
    members    = 1/2 (joined/total),
    act_id     = 0,
    last_appl. = 0,
    protocols  = 0/5/2 (gcs/repl/appl),
    group UUID = 672cb2c5-dc41-11e3-827f-e25ede7fb9ba
140515 10:30:45 [Note] WSREP: Flow-control interval: [23, 23]
140515 10:30:45 [Note] WSREP: New cluster view: global state: 672cb2c5-dc41-11e3-827f-e25ede7fb9ba:0, view# 2: Primary, number of nodes: 2, my index: 0, protocol version 2
140515 10:30:45 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
140515 10:30:45 [Note] WSREP: REPL Protocols: 5 (3, 1)
140515 10:30:45 [Note] WSREP: Assign initial position for certification: 0, protocol version: 3
140515 10:30:45 [Note] WSREP: Service thread queue flushed.

Файл журнала на втором узле содержит следующее:

140515 10:30:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140515 10:30:42 mysqld_safe WSREP: Running position recovery with --log_error='/var/lib/mysql/wsrep_recovery.PFBl11' --pid-file='/var/lib/mysql/box2.vagrant-recover.pid'
140515 10:30:44 mysqld_safe WSREP: Recovered position 00000000-0000-0000-0000-000000000000:-1
140515 10:30:44 [Note] WSREP: wsrep_start_position var submitted: '00000000-0000-0000-0000-000000000000:-1'
140515 10:30:44 [Note] WSREP: Setting wsrep_ready to 0
140515 10:30:44 [Note] WSREP: Read nil XID from storage engines, skipping position init
140515 10:30:44 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera/libgalera_smm.so'
140515 10:30:44 [Note] WSREP: wsrep_load(): Galera 25.3.2(r170) by Codership Oy <info@codership.com> loaded successfully.
140515 10:30:44 [Note] WSREP: CRC-32C: using "slicing-by-8" algorithm.
140515 10:30:44 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1
140515 10:30:44 [Note] WSREP: Passing config to GCS: base_host = 192.168.33.32; base_port = 4567; cert.log_conflicts = no; gcache.dir = /var/lib/mysql/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /var/lib/mysql//galera.cache; gcache.page_size = 128M; gcache.size = 128M; gcs.fc_debug = 0; gcs.fc_factor = 1; 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; repl.causal_read_timeout = PT30S; repl.commit_order = 3; repl.key_format = FLAT8; repl.proto_max = 5
140515 10:30:44 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1
140515 10:30:44 [Note] WSREP: wsrep_sst_grab()
140515 10:30:44 [Note] WSREP: Start replication
140515 10:30:44 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1
140515 10:30:44 [Note] WSREP: protonet asio version 0
140515 10:30:44 [Note] WSREP: Using CRC-32C (optimized) for message checksums.
140515 10:30:44 [Note] WSREP: backend: asio
140515 10:30:44 [Note] WSREP: GMCast version 0
140515 10:30:44 [Note] WSREP: (e18ac23e-dc45-11e3-a9cf-226f3dddee1e, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
140515 10:30:44 [Note] WSREP: (e18ac23e-dc45-11e3-a9cf-226f3dddee1e, 'tcp://0.0.0.0:4567') multicast: , ttl: 1
140515 10:30:44 [Note] WSREP: EVS version 0
140515 10:30:44 [Note] WSREP: PC version 0
140515 10:30:44 [Note] WSREP: gcomm: connecting to group 'my_wsrep_cluster', peer '192.168.33.31:,192.168.33.32:,192.168.33.33:'
140515 10:30:44 [Warning] WSREP: (e18ac23e-dc45-11e3-a9cf-226f3dddee1e, 'tcp://0.0.0.0:4567') address 'tcp://192.168.33.32:4567' points to own listening address, blacklisting
140515 10:30:44 [Note] WSREP: (e18ac23e-dc45-11e3-a9cf-226f3dddee1e, 'tcp://0.0.0.0:4567') address 'tcp://192.168.33.32:4567' pointing to uuid e18ac23e-dc45-11e3-a9cf-226f3dddee1e is blacklisted, skipping
140515 10:30:45 [Note] WSREP: declaring d08d572e-dc45-11e3-927e-ffff30b2f80d stable
140515 10:30:45 [Note] WSREP: Node d08d572e-dc45-11e3-927e-ffff30b2f80d state prim
140515 10:30:45 [Note] WSREP: view(view_id(PRIM,d08d572e-dc45-11e3-927e-ffff30b2f80d,2) memb {
    d08d572e-dc45-11e3-927e-ffff30b2f80d,0
    e18ac23e-dc45-11e3-a9cf-226f3dddee1e,0
} joined {
} left {
} partitioned {
})
140515 10:30:45 [Note] WSREP: discarding pending addr without UUID: tcp://192.168.33.33:4567
140515 10:30:45 [Note] WSREP: discarding pending addr proto entry 0x7f48c30b2080
140515 10:30:45 [Note] WSREP: gcomm: connected
140515 10:30:45 [Note] WSREP: Changing maximum packet size to 64500, resulting msg size: 32636
140515 10:30:45 [Note] WSREP: Shifting CLOSED -> OPEN (TO: 0)
140515 10:30:45 [Note] WSREP: Opened channel 'my_wsrep_cluster'
140515 10:30:45 [Note] WSREP: Waiting for SST to complete.
140515 10:30:45 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 1, memb_num = 2
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: sent state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: got state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745 from 0 (box1)
140515 10:30:45 [Note] WSREP: STATE EXCHANGE: got state msg: e1b4f3cf-dc45-11e3-826a-7ffb98deb745 from 1 (box2)
140515 10:30:45 [Note] WSREP: Quorum results:
    version    = 3,
    component  = PRIMARY,
    conf_id    = 1,
    members    = 1/2 (joined/total),
    act_id     = 0,
    last_appl. = -1,
    protocols  = 0/5/2 (gcs/repl/appl),
    group UUID = 672cb2c5-dc41-11e3-827f-e25ede7fb9ba
140515 10:30:45 [Note] WSREP: Flow-control interval: [23, 23]
140515 10:30:45 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 0)
140515 10:30:45 [Note] WSREP: State transfer required: 
    Group state: 672cb2c5-dc41-11e3-827f-e25ede7fb9ba:0
    Local state: 00000000-0000-0000-0000-000000000000:-1
140515 10:30:45 [Note] WSREP: New cluster view: global state: 672cb2c5-dc41-11e3-827f-e25ede7fb9ba:0, view# 2: Primary, number of nodes: 2, my index: 1, protocol version 2
140515 10:30:45 [Warning] WSREP: Gap in state sequence. Need state transfer.
140515 10:30:45 [Note] WSREP: Setting wsrep_ready to 0
140515 10:30:45 [Note] WSREP: [debug]: closing client connections for PRIM
140515 10:30:47 [Note] WSREP: waiting for client connections to close: 2
140515 10:30:47 [Note] WSREP: Running: 'wsrep_sst_rsync --role 'joiner' --address '192.168.33.32' --auth 'root:o4guk8x' --datadir '/var/lib/mysql/' --defaults-file '/etc/my.cnf' --parent '19293''

Я не уверен, насколько это все подходит.

Другие вопросы по тегам