posted by 떠돌이늑대 2020. 6. 8. 11:20

https://mariadb.com/kb/en/galera-cluster-status-variables

 

Galera Cluster Status Variables

Galera Cluster Status Variables

mariadb.com

wsrep_applier_thread_count
설명 :이 유형의 슬레이브 스레드 수를 명확하게하기 위해 현재의 적용자 스레드 수를 저장합니다.

 

wsrep_apply_oooe
설명 : 병렬화 효율성의 지표 인 쓰기 세트가 순서대로 적용되지 않은 빈도입니다.

 

wsrep_apply_oool
설명 : 시퀀스 번호가 낮은 쓰기 세트를 시퀀스 번호가 낮은 쓰기 세트보다 먼저 적용하여 쓰기 세트가 느리다는 것을 나타냅니다.

 

wsrep_apply_window
설명 : 가장 높고 가장 낮은 동시 적용 seqno 사이의 평균 거리.

 

wsrep_cert_deps_distance
설명 : 병렬로 적용 할 수있는 가장 높은 시퀀스 번호와 가장 낮은 시퀀스 번호 사이의 평균 거리 또는 가능한 병렬화 수준.

 

....

'컴이야기 > MariaDB' 카테고리의 다른 글

CRUD  (0) 2020.06.12
Using Galera Replication to Create Geo-distributed Clusters  (0) 2020.06.12
sysbench Test  (0) 2020.06.02
Maxscale Fail-Over, Switch-Over, Re-Join  (0) 2020.05.26
Maxscale serversize ,weightby  (0) 2020.05.22
posted by 떠돌이늑대 2020. 6. 2. 15:03

CPU 코어 1개

[root@localhost ~]# sysbench --mysql-db=cfpc --mysql-host=192.168.1.18 --mysql-port=4006 --mysql-user=maxscale --mysql-password=maxscale123 --max-time=600 --threads=40 /usr/share/sysbench/oltp_insert.lua run
WARNING: --max-time is deprecated, use --time instead
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 40
Initializing random number generator from current time


Initializing worker threads...

Threads started!

SQL statistics:
queries performed:
read: 0
write: 6085278
other: 0
total: 6085278
transactions: 6085278 (10141.57 per sec.)
queries: 6085278 (10141.57 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)

General statistics:
total time: 600.0326s
total number of events: 6085278

Latency (ms):
min: 0.17
avg: 3.94
max: 662.70
95th percentile: 8.58
sum: 23990186.08

Threads fairness:
events (avg/stddev): 152131.9500/533.58
execution time (avg/stddev): 599.7547/0.01


CPU 코어 4개

[root@localhost ~]# sysbench --mysql-db=cfpc --mysql-host=192.168.1.18 --mysql-port=4006 --mysql-user=maxscale --mysql-password=maxscale123 --max-time=600 --threads=40 /usr/share/sysbench/oltp_insert.lua run
WARNING: --max-time is deprecated, use --time instead
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 40
Initializing random number generator from current time


Initializing worker threads...

Threads started!

SQL statistics:
queries performed:
read: 0
write: 18718049
other: 0
total: 18718049
transactions: 18718049 (31195.96 per sec.)
queries: 18718049 (31195.96 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)

General statistics:
total time: 600.0144s
total number of events: 18718049

Latency (ms):
min: 0.15
avg: 1.28
max: 426.97
95th percentile: 3.02
sum: 23967305.01

Threads fairness:
events (avg/stddev): 467951.2250/18031.93
execution time (avg/stddev): 599.1826/0.03

posted by 떠돌이늑대 2020. 5. 26. 16:39

GTID  Replication 사용 필수 

 

switch-over

switch-over

 

fail-over

fail-over

re-join

re-join

 

maxscale.cnf

maxscale.cnf

'컴이야기 > MariaDB' 카테고리의 다른 글

List of Galera Cluster Status variables  (0) 2020.06.08
sysbench Test  (0) 2020.06.02
Maxscale serversize ,weightby  (0) 2020.05.22
wsrep_sst_method with IPv6  (0) 2019.10.21
Maxscale 2.3.6  (1) 2019.07.12
posted by 떠돌이늑대 2020. 5. 22. 14:11

'컴이야기 > MariaDB' 카테고리의 다른 글

sysbench Test  (0) 2020.06.02
Maxscale Fail-Over, Switch-Over, Re-Join  (0) 2020.05.26
wsrep_sst_method with IPv6  (0) 2019.10.21
Maxscale 2.3.6  (1) 2019.07.12
Galera Cluster error  (0) 2019.06.14
posted by 떠돌이늑대 2019. 10. 21. 14:42

Performing SSTs with IPv6 Addresses

If you are performing Mariabackup SSTs with IPv6 addresses, then the socat utility needs to be passed the pf=ip6 option. This can be done by setting the sockopt option in the [sst] option group in an option file. For example:

 

[sst]

sockopt=",pf=ip6"

 

 

See MDEV-18797 for more information.

 

https://mariadb.com/kb/en/library/mariabackup-sst-method/

 

mariabackup SST Method

The mariabackup SST method uses the Mariabackup utility for performing SSTs.

mariadb.com

https://mariadb.com/kb/en/library/xtrabackup-v2-sst-method/

 

xtrabackup-v2 SST Method

The xtrabackup-v2 SST method uses the Percona XtraBackup utility for performing SSTs.

mariadb.com

 

 

 

1st solution - (not good, need edit the script):
edit /usr/bin/wsrep_sst_xtrabackup-v2(or wsrep_sst_mariabackup), line 532:
replace
tcmd="socat -u TCP-LISTEN:${TSST_PORT},reuseaddr${sockopt} stdio"
to
tcmd="socat -u TCP6-LISTEN:${TSST_PORT},reuseaddr${sockopt} stdio"

restart mysql and sst will work using xtrabackup-v2.(or mariabackup)

 

 

'컴이야기 > MariaDB' 카테고리의 다른 글

Maxscale Fail-Over, Switch-Over, Re-Join  (0) 2020.05.26
Maxscale serversize ,weightby  (0) 2020.05.22
Maxscale 2.3.6  (1) 2019.07.12
Galera Cluster error  (0) 2019.06.14
Galera Cluster Replication.  (0) 2019.03.18
posted by 떠돌이늑대 2019. 7. 12. 10:31

Available commands:
add:
    add user - Add an administrative account for using maxadmin over the network
    add readonly-user - Add a read-only account for using maxadmin over the network
    add server - Add a new server to a service

remove:
    remove user - Remove account for using maxadmin over the network
    remove server - Remove a server from a service or a monitor

create:
    create server - Create a new server
    create listener - Create a new listener for a service
    create monitor - Create a new monitor

destroy:
    destroy server - Destroy a server
    destroy listener - Destroy a listener
    destroy monitor - Destroy a monitor

alter:
    alter server - Alter server parameters
    alter monitor - Alter monitor parameters
    alter service - Alter service parameters
    alter maxscale - Alter maxscale parameters

set:
    set server - Set the status of a server
    set pollsleep - Set poll sleep period
    set nbpolls - Set non-blocking polls
    set log_throttling - Set the log throttling configuration

clear:
    clear server - Clear server status

disable:
    disable log-priority - Disable a logging priority
    disable sessionlog-priority - [Deprecated] Disable a logging priority for a particular session
    disable root - Disable root access
    disable syslog - Disable syslog logging
    disable maxlog - Disable MaxScale logging
    disable account - Disable Linux user

enable:
    enable log-priority - Enable a logging priority
    enable sessionlog-priority - [Deprecated] Enable a logging priority for a session
    enable root - Enable root user access to a service
    enable syslog - Enable syslog logging
    enable maxlog - Enable MaxScale logging
    enable account - Activate a Linux user account for administrative MaxAdmin use
    enable readonly-account - Activate a Linux user account for read-only MaxAdmin use

flush:
    flush log - Flush the content of a log file and reopen it
    flush logs - Flush the content of a log file and reopen it

list:
    list clients - List all the client connections to MaxScale
    list dcbs - List all active connections within MaxScale
    list filters - List all filters
    list listeners - List all listeners
    list modules - List all currently loaded modules
    list monitors - List all monitors
    list services - List all services
    list servers - List all servers
    list sessions - List all the active sessions within MaxScale
    list threads - List the status of the polling threads in MaxScale
    list commands - List registered commands

reload:
    reload dbusers - Reload the database users for a service

restart:
    restart monitor - Restart a monitor
    restart service - Restart a service
    restart listener - Restart a listener

shutdown:
    shutdown maxscale - Initiate a controlled shutdown of MaxScale
    shutdown monitor - Stop a monitor
    shutdown service - Stop a service
    shutdown listener - Stop a listener

show:
    show dcbs - Show all DCBs
    show dbusers - [deprecated] Show user statistics
    show authenticators - Show authenticator diagnostics for a service
    show epoll - Show the polling system statistics
    show eventstats - Show event queue statistics
    show filter - Show filter details
    show filters - Show all filters
    show log_throttling - Show the current log throttling setting (count, window (ms), suppression (ms))
    show modules - Show all currently loaded modules
    show monitor - Show monitor details
    show monitors - Show all monitors
    show persistent - Show the persistent connection pool of a server
    show qcs - Show query classifier statistics
    show server - Show server details
    show servers - Show all servers
    show serversjson - Show all servers in JSON
    show services - Show all configured services in MaxScale
    show service - Show a single service in MaxScale
    show session - Show session details
    show sessions - Show all active sessions in MaxScale
    show tasks - Show all active housekeeper tasks in MaxScale
    show threads - Show the status of the worker threads in MaxScale
    show users - Show enabled Linux accounts
    show version - Show the MaxScale version number

sync:
    sync logs - Flush log files to disk

call:
    call command - Call module command

ping:
    ping workers - Ping Workers


Type `help COMMAND` to see details of each command.
Where commands require names as arguments and these names contain
whitespace either the \ character may be used to escape the whitespace
or the name may be enclosed in double quotes ".

 

 

 

 

MaxScale> help add
Available options to the `add` command:

add user - Add an administrative account for using maxadmin over the network

Usage: add user USER PASSWORD

Parameters:
USER     User to add
PASSWORD Password for the user

Example: add user bob somepass

----------------------------------------------------------------------------

add readonly-user - Add a read-only account for using maxadmin over the network

Usage: add user USER PASSWORD

Parameters:
USER     User to add
PASSWORD Password for the user

Example: add user bob somepass

----------------------------------------------------------------------------

add server - Add a new server to a service

Usage: add server SERVER TARGET...

Parameters:
SERVER  The server that is added to TARGET
TARGET  List of service and/or monitor names separated by spaces

A server can be assigned to a maximum of 11 objects in one command

Example: add server my-db my-service "Cluster Monitor"

 

 

 

MaxScale> help remove
Available options to the `remove` command:

remove user - Remove account for using maxadmin over the network

Usage: remove user USER

Parameters:
USER     User to remove

Example: remove user bob

----------------------------------------------------------------------------

remove server - Remove a server from a service or a monitor

Usage: remove server SERVER TARGET...

Parameters:
SERVER  The server that is removed from TARGET
TARGET  List of service and/or monitor names separated by spaces

A server can be removed from a maximum of 11 objects in one command

Example: remove server my-db my-service "Cluster Monitor"

 

 

MaxScale> help create
Available options to the `create` command:

create server - Create a new server

Usage: create server NAME HOST [PORT] [PROTOCOL] [AUTHENTICATOR]

Parameters:
NAME          Server name
HOST          Server host address
PORT          Server port (default 3306)
PROTOCOL      Server protocol (default MySQLBackend)
AUTHENTICATOR Authenticator module name (default MySQLAuth)

The first two parameters are required, the others are optional.

Example: create server my-db-1 192.168.0.102 3306

----------------------------------------------------------------------------

create listener - Create a new listener for a service

Usage: create listener SERVICE NAME [HOST] [PORT] [PROTOCOL] [AUTHENTICATOR] [OPTIONS]
                       [SSL_KEY] [SSL_CERT] [SSL_CA] [SSL_VERSION] [SSL_VERIFY_DEPTH]
                       [SSL_VERIFY_PEER_CERTIFICATE]

Parameters
SERVICE       Service where this listener is added
NAME          Listener name
HOST          Listener host address (default [::])
PORT          Listener port (default 3306)
PROTOCOL      Listener protocol (default MySQLClient)
AUTHENTICATOR Authenticator module name (default MySQLAuth)
OPTIONS       Options for the authenticator module
SSL_KEY       Path to SSL private key
SSL_CERT      Path to SSL certificate
SSL_CA        Path to CA certificate
SSL_VERSION   SSL version (default MAX)
SSL_VERIFY_DEPTH Certificate verification depth
SSL_VERIFY_PEER_CERTIFICATE Verify peer certificate

The first two parameters are required, the others are optional.
Any of the optional parameters can also have the value 'default'
which will be replaced with the default value.

Example: create listener my-service my-new-listener 192.168.0.101 4006

----------------------------------------------------------------------------

create monitor - Create a new monitor

Usage: create monitor NAME MODULE

Parameters:
NAME    Monitor name
MODULE  Monitor module

Example: create monitor my-monitor mysqlmon

 

 

MaxScale> help destory
No command destory to offer help with
MaxScale> help destroy
Available options to the `destroy` command:

destroy server - Destroy a server

Usage: destroy server NAME

Parameters:
NAME Server to destroy

Example: destroy server my-db-1

----------------------------------------------------------------------------

destroy listener - Destroy a listener

Usage: destroy listener SERVICE NAME

Parameters:
NAME Listener to destroy

The listener is stopped and it will be removed on the next restart of MaxScale

Example: destroy listener my-listener

----------------------------------------------------------------------------

destroy monitor - Destroy a monitor

Usage: destroy monitor NAME

Parameters:
NAME Monitor to destroy

The monitor is stopped and it will be removed on the next restart of MaxScale

Example: destroy monitor my-monitor

 

 

 

MaxScale> help alter
Available options to the `alter` command:

alter server - Alter server parameters

Usage: alter server NAME KEY=VALUE ...

Parameters:
NAME      Server name
KEY=VALUE List of `key=value` pairs separated by spaces

This will alter an existing parameter of a server. The accepted values for KEY are:

address                     Server address
port                        Server port
monitoruser                 Monitor user for this server
monitorpw                   Monitor password for this server
ssl                         Enable SSL, value must be 'required'
ssl_key                     Path to SSL private key
ssl_cert                    Path to SSL certificate
ssl_ca_cert                 Path to SSL CA certificate
ssl_version                 SSL version
ssl_cert_verify_depth       Certificate verification depth
ssl_verify_peer_certificate Peer certificate verification
persistpoolmax              Persisted connection pool size
persistmaxtime              Persisted connection maximum idle time

To configure SSL for a newly created server, the 'ssl', 'ssl_cert',
'ssl_key' and 'ssl_ca_cert' parameters must be given at the same time.

Example: alter server my-db-1 address=192.168.0.202 port=3307

----------------------------------------------------------------------------

alter monitor - Alter monitor parameters

Usage: alter monitor NAME KEY=VALUE ...

Parameters:
NAME      Monitor name
KEY=VALUE List of `key=value` pairs separated by spaces

All monitors support the following values for KEY:
user                     Username used when connecting to servers
password                 Password used when connecting to servers
monitor_interval         Monitoring interval in milliseconds
backend_connect_timeout  Server connection timeout in seconds
backend_write_timeout    Server write timeout in seconds
backend_read_timeout     Server read timeout in seconds
backend_connect_attempts Number of re-connection attempts
journal_max_age          Maximum age of server state journal
script_timeout           Timeout in seconds for monitor scripts

This will alter an existing parameter of a monitor. To remove parameters,
pass an empty value for a key e.g. 'maxadmin alter monitor my-monitor my-key='

Example: alter monitor my-monitor user=maxuser password=maxpwd

----------------------------------------------------------------------------

alter service - Alter service parameters

Usage: alter service NAME KEY=VALUE ...

Parameters:
NAME      Service name
KEY=VALUE List of `key=value` pairs separated by spaces

All services support the following values for KEY:
user                          Username used when connecting to servers
password                      Password used when connecting to servers
enable_root_user              Allow root user access through this service
max_retry_interval            Maximum restart retry interval
max_connections               Maximum connection limit
connection_timeout            Client idle timeout in seconds
auth_all_servers              Retrieve authentication data from all servers
strip_db_esc                  Strip escape characters from database names
localhost_match_wildcard_host Match wildcard host to 'localhost' address
version_string                The version string given to client connections
weightby                      Weighting parameter name
log_auth_warnings             Log authentication warnings
retry_on_failure              Retry service start on failure

Example: alter service my-service user=maxuser password=maxpwd

----------------------------------------------------------------------------

alter maxscale - Alter maxscale parameters

Usage: alter maxscale KEY=VALUE ...

Parameters:
KEY=VALUE List of `key=value` pairs separated by spaces

The following configuration values can be altered:
auth_connect_timeout         Connection timeout for permission checks
auth_read_timeout            Read timeout for permission checks
auth_write_timeout           Write timeout for permission checks
admin_auth                   Enable admin interface authentication
admin_log_auth_failures      Log admin interface authentication failures

Example: alter maxscale auth_connect_timeout=10

 

 

 

 

 

 

 

MaxScale> help set
Available options to the `set` command:

set server - Set the status of a server

Usage: set server NAME STATUS

Parameters:
NAME   Server name
STATUS The status to set

Example: set server dbnode4 master

----------------------------------------------------------------------------

set pollsleep - Set poll sleep period

Deprecated in 2.3

----------------------------------------------------------------------------

set nbpolls - Set non-blocking polls

Deprecated in 2.3

----------------------------------------------------------------------------

set log_throttling - Set the log throttling configuration

Usage: set log_throttling COUNT WINDOW SUPPRESS

Parameters:
COUNT    Number of messages to log before throttling
WINDOW   The time window in milliseconds where COUNT messages can be logged
SUPPRESS The log suppression in milliseconds once COUNT messages have been logged

Example: set log_throttling 5 1000 25000

 

 

 

MaxScale> help clear
Available options to the `clear` command:

clear server - Clear server status

Usage: clear server NAME STATUS

Parameters:
NAME   Server name
STATUS The status to clear

Example: clear server dbnode2 master

 

 

 

MaxScale> help disable
Available options to the `disable` command:

disable log-priority - Disable a logging priority

Usage: disable log-priority PRIORITY

Parameters:PRIORITY One of 'err', 'warning', 'notice','info' or 'debug'

Example: disable log-priority info

----------------------------------------------------------------------------

disable sessionlog-priority - [Deprecated] Disable a logging priority for a particular session

This command is deprecated

----------------------------------------------------------------------------

disable root - Disable root access

Usage: disable root SERVICE

Parameters:
SERVICE Service where root user is disabled

Example: disable root my-service

----------------------------------------------------------------------------

disable syslog - Disable syslog logging

Usage: disable syslog

----------------------------------------------------------------------------

disable maxlog - Disable MaxScale logging

Usage: disable maxlog

----------------------------------------------------------------------------

disable account - Disable Linux user

Usage: disable account USER

Parameters:
USER The user account to disable

Example: disable account alice

 

 

 

MaxScale> help enable
Available options to the `enable` command:

enable log-priority - Enable a logging priority

Usage: enable log-priority PRIORITY

Parameters:PRIORITY One of 'err', 'warning', 'notice','info' or 'debug'

Example: enable log-priority info

----------------------------------------------------------------------------

enable sessionlog-priority - [Deprecated] Enable a logging priority for a session

This command is deprecated

----------------------------------------------------------------------------

enable root - Enable root user access to a service

Usage: enable root SERVICE

Parameters:
SERVICE Service where root user is enabled

Example: enable root my-service

----------------------------------------------------------------------------

enable syslog - Enable syslog logging

Usage: enable syslog

----------------------------------------------------------------------------

enable maxlog - Enable MaxScale logging

Usage: enable maxlog

----------------------------------------------------------------------------

enable account - Activate a Linux user account for administrative MaxAdmin use

Usage: enable account USER

Parameters:
USER The user account to enable

Example: enable account alice

----------------------------------------------------------------------------

enable readonly-account - Activate a Linux user account for read-only MaxAdmin use

Usage: enable account USER

Parameters:
USER The user account to enable

Example: enable account alice

 

 

 

 

MaxScale> help flush
Available options to the `flush` command:

flush log - Flush the content of a log file and reopen it

Usage: flush log

----------------------------------------------------------------------------

flush logs - Flush the content of a log file and reopen it

Usage: flush logs

 

 

 

 

MaxScale> help list
Available options to the `list` command:

list clients - List all the client connections to MaxScale

Usage: list clients

----------------------------------------------------------------------------

list dcbs - List all active connections within MaxScale

Usage: list dcbs

----------------------------------------------------------------------------

list filters - List all filters

Usage: list filters

----------------------------------------------------------------------------

list listeners - List all listeners

Usage: list listeners

----------------------------------------------------------------------------

list modules - List all currently loaded modules

Usage: list modules

----------------------------------------------------------------------------

list monitors - List all monitors

Usage: list monitors

----------------------------------------------------------------------------

list services - List all services

Usage: list services

----------------------------------------------------------------------------

list servers - List all servers

Usage: list servers

----------------------------------------------------------------------------

list sessions - List all the active sessions within MaxScale

Usage: list sessions

----------------------------------------------------------------------------

list threads - List the status of the polling threads in MaxScale

Usage: list threads

----------------------------------------------------------------------------

list commands - List registered commands

Usage: list commands [MODULE] [COMMAND]

Parameters:
MODULE  Regular expressions for filtering module names
COMMAND Regular expressions for filtering module command names

Example: list commands my-module my-command

 

 

 

MaxScale> help reload
Available options to the `reload` command:

reload dbusers - Reload the database users for a service

Usage: reload dbusers SERVICE

Parameters:
SERVICE Reload database users for this service

Example: reload dbusers "splitter service"

 

 

MaxScale> help restart
Available options to the `restart` command:

restart monitor - Restart a monitor

Usage: restart monitor NAME

Parameters:
NAME Monitor to restart

Example: restart monitor db-cluster-monitor

----------------------------------------------------------------------------

restart service - Restart a service

Usage: restart service NAME

Parameters:
NAME Service to restart

Example: restart service "Sales Database"

----------------------------------------------------------------------------

restart listener - Restart a listener

Usage: restart listener NAME

Parameters:
NAME Listener to restart

Example: restart listener "RW Service" "RW Listener"

 

 

 

MaxScale> help shutdown
Available options to the `shutdown` command:

shutdown maxscale - Initiate a controlled shutdown of MaxScale

Usage: shutdown maxscale

----------------------------------------------------------------------------

shutdown monitor - Stop a monitor

Usage: shutdown monitor MONITOR

Parameters:
MONITOR Monitor to stop

Example: shutdown monitor db-cluster-monitor

----------------------------------------------------------------------------

shutdown service - Stop a service

Usage: shutdown service SERVICE

Parameters:
SERVICE Service to stop

Example: shutdown service "Sales Database"

----------------------------------------------------------------------------

shutdown listener - Stop a listener

Usage: shutdown listener SERVICE LISTENER

Parameters:
SERVICE  Service where LISTENER points to
LISTENER The listener to stop

Example: shutdown listener "RW Service" "RW Listener"

 

 

 

MaxScale> help show
Available options to the `show` command:

show dcbs - Show all DCBs

Usage: show dcbs

----------------------------------------------------------------------------

show dbusers - [deprecated] Show user statistics

See `show authenticators`

----------------------------------------------------------------------------

show authenticators - Show authenticator diagnostics for a service

Usage: show authenticators SERVICE

Parameters:
SERVICE Service to inspect

Example : show authenticators my-service

----------------------------------------------------------------------------

show epoll - Show the polling system statistics

Usage: show epoll

----------------------------------------------------------------------------

show eventstats - Show event queue statistics

Usage: show eventstats

----------------------------------------------------------------------------

show filter - Show filter details

Usage: show filter FILTER

Parameters:
FILTER Filter to show

Example: show filter my-filter

----------------------------------------------------------------------------

show filters - Show all filters

Usage: show filters

----------------------------------------------------------------------------

show log_throttling - Show the current log throttling setting (count, window (ms), suppression (ms))

Usage: show log_throttling

----------------------------------------------------------------------------

show modules - Show all currently loaded modules

Usage: show modules

----------------------------------------------------------------------------

show monitor - Show monitor details

Usage: show monitor MONITOR

Parameters:
MONITOR Monitor to show

Example: show monitor "Cluster Monitor"

----------------------------------------------------------------------------

show monitors - Show all monitors

Usage: show monitors

----------------------------------------------------------------------------

show persistent - Show the persistent connection pool of a server

Usage: show persistent SERVER

Parameters:
SERVER Server to show

Example: show persistent db-server-1

----------------------------------------------------------------------------

show qcs - Show query classifier statistics

Usage: show qcs

----------------------------------------------------------------------------

show server - Show server details

Usage: show server SERVER

Parameters:
SERVER Server to show

Example: show server db-server-1

----------------------------------------------------------------------------

show servers - Show all servers

Usage: show servers

----------------------------------------------------------------------------

show serversjson - Show all servers in JSON

Usage: show serversjson

----------------------------------------------------------------------------

show services - Show all configured services in MaxScale

Usage: show services

----------------------------------------------------------------------------

show service - Show a single service in MaxScale

Usage: show service SERVICE

Parameters:
SERVICE Service to show

Example: show service my-service

----------------------------------------------------------------------------

show session - Show session details

Usage: show session SESSION

Parameters:
SESSION Session ID of the session to show

Example: show session 5

----------------------------------------------------------------------------

show sessions - Show all active sessions in MaxScale

Usage: show sessions

----------------------------------------------------------------------------

show tasks - Show all active housekeeper tasks in MaxScale

Usage: show tasks

----------------------------------------------------------------------------

show threads - Show the status of the worker threads in MaxScale

Usage: show threads

----------------------------------------------------------------------------

show users - Show enabled Linux accounts

Usage: show users

----------------------------------------------------------------------------

show version - Show the MaxScale version number

Usage: show version

 

 

 

MaxScale> help sync
Available options to the `sync` command:

sync logs - Flush log files to disk

Usage: flush logs

 

 

 

MaxScale> help call
Available options to the `call` command:

call command - Call module command

Usage: call command MODULE COMMAND ARGS...

Parameters:
MODULE  The module name
COMMAND The command to call
ARGS... Arguments for the command

To list all registered commands, run 'list commands'.

Example: call command my-module my-command hello world!

 

 

 

MaxScale> help ping
Available options to the `ping` command:

ping workers - Ping Workers

Ping Workers

 

 

 

 

 

 

 

'컴이야기 > MariaDB' 카테고리의 다른 글

Maxscale serversize ,weightby  (0) 2020.05.22
wsrep_sst_method with IPv6  (0) 2019.10.21
Galera Cluster error  (0) 2019.06.14
Galera Cluster Replication.  (0) 2019.03.18
maxscale 을 사용해보자. [진행중]  (0) 2018.11.07
posted by 떠돌이늑대 2019. 6. 14. 13:03
WSREP_SST: [ERROR] xtrabackup_checkpoints missing, failed innobackupex/SST on donor (20190614 19:30:21.392)
WSREP_SST: [ERROR] Cleanup after exit with status:2 (20190614 19:30:21.394)

 

MariaDB 버전변경하면서 테스트를 하던 중 Galera Cluster를 새로 구성하면서, 다른 2 node 들이 위와 같은 에러가

발생하면서 DB 구동이 실패가 되었었다.

무슨 문제였는지  알수가 없었다.

wsrep_sst_method 옵션을 변경해도 error 가 발생되면서 DB 구동이 실패가 되었었다.

 

첫번째 노드의 data가 들어있는 디렉토리를 살펴보면,

 

innobackup.backup.log 라는 파일이 있다.

 

다른 노드에서 sst를 요청하면 과정과 결과가 기록이 된다.

 

2019-06-14 19:30:21 140471879198592 [ERROR] InnoDB: Tablespaces for test/t1 have been found in two places;
Location 1: SpaceID: 21550 File: ./test/t1.ibd
Location 2: SpaceID: 21550 File: /data/test/test/t1.ibd
You must delete one of them.
190614 19:30:21 [ERROR] mysqld got signal 6

 

이러한 기록들이 있었다.

 

저 테이블에 문제가 있었나보다.

 

실제로 첫번째 node 의 데이터를 mysqldump 로 백업하려했더니 저 테이블때문에 계속 실패했다. 다른 한 테이블도

그래서 제외시켜서 백업했더니 잘 되었었다.

 

mysqldump -uroot -predhat --databases test --ignore-table=test.t1 --ignore-table=test.t2 > /mysqldump/test.sql

결국 첫번째 노드에서 문제있었던 두 테이블을 삭제하니

 

Galera Cluster도 정상으로 되었다.

 

 

 

 

'컴이야기 > MariaDB' 카테고리의 다른 글

wsrep_sst_method with IPv6  (0) 2019.10.21
Maxscale 2.3.6  (1) 2019.07.12
Galera Cluster Replication.  (0) 2019.03.18
maxscale 을 사용해보자. [진행중]  (0) 2018.11.07
Galera cluster 설치 삽질과정 (완료)  (0) 2018.11.02
posted by 떠돌이늑대 2019. 3. 18. 15:01

2개의 Galera Cluster를 만들고, 각 클러스터의 한 노드끼리 서로간의 Replication 설정을 했다.

 

그러나 왠걸 Replication  설정을 한 노드들끼리의 복제는 되지만, 다른 노드에서 실행하면 클러스터 내부에서만 복제가 되고, 다른 클러스터로는 복제가 되질 않았다.

 

무엇일까... 찾아보게 되었고,

 

서로 Replication을 맺어준 노드에서 my.cnf 에

 

이 옵션값을 선언해 주어야지만 다른 노드에서의 명령도 전달복제가 되었다.

 

log_slave_updates 의 값을 선언을 해주어야 한다.

 

log_slave_updates

  • Description: If set to 0, the default, updates on a slave received from a master during replication are not logged in the slave's binary log. If set to 1, they are. The slave's binary log needs to be enabled for this to have an effect. Set to 1 if you want to daisy-chain the slaves.
  • Commandline: --log-slave-updates
  • Scope: Global
  • Dynamic: No
  • Data Type: boolean
  • Default Value: OFF

'컴이야기 > MariaDB' 카테고리의 다른 글

Maxscale 2.3.6  (1) 2019.07.12
Galera Cluster error  (0) 2019.06.14
maxscale 을 사용해보자. [진행중]  (0) 2018.11.07
Galera cluster 설치 삽질과정 (완료)  (0) 2018.11.02
xtrabackup 설치해보기 1 - 의존성 리스트  (0) 2018.10.25
posted by 떠돌이늑대 2018. 11. 7. 14:33

maxscale 이 뭘까?

 

수평 확장 배치에서 보안,확장성 및 고 가용성을 관리하는 차세대 데이터베이스 프록시

이러한 말들을 볼 수 있었다.

 

보안과 확장성, 고가용성..

 

프록시와 보안을 같이 묶어서 생각하면, 데이터베이스 앞단에 있다는 것이고,

 

보안이라 함은 데이터베이스에 직접 접근하는 것을 막아주는 역할 때문이 아닐까

 

생각이 드네.

 

프록시역할을 하니깐.. 보안이 딸려온다.. 그런 말 아닐까?

 

 

 

고가용성을 관리한다라 ... 그러면 maxscale이 무너지면?

 

 

그건 그렇고 설치해보자.

 

rpm으로 제공해주고 있고, 의존성이 걸려있는 rpm들이 있으니 yum을 통하든

 

알아서 하고,

 

설치하고 나면, /etc/maxscale.cnf 이 생성이 되어있고, 이 파일에서 설정이 가능하다.

 

내용들을 살펴보자.

 

 # MaxScale documentation:
# https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22/

# Global parameters
#
# Complete list of configuration options:
# https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-mariadb-maxscale-configuration-usage-scenarios/

 

안되는 영어 구글 번역기로 돌려보면 되고, 소개랑 구성하는 시나리오에 대한 관련 링크로구나.

 

 

[maxscale]
threads=auto 

 

 

이 매개 변수는 커널에서 오는 이벤트를 처리하는 작업자 스레드의 수를 제어합니다. 기본값은 1 스레드입니다. 더 많은 성능이 필요하면 하나의 스레드로 시작하고 숫자를 늘리는 것이 좋습니다. 작업자 스레드를 프로세서 코어 수 이상으로 늘리더라도 성능이 향상되지는 않으며 성능이 떨어지고 리소스가 불필요하게 소모 될 수 있습니다.

값을 auto로 설정하여이 값의 자동 구성을 사용 가능하게 할 수 있습니다. 이렇게하면 MaxScale은 사용 가능한 프로세서 수를 감지하고 스레드 수를 해당 수와 같게 설정합니다. 이 기능은 MaxScale 실행 전용 시스템에서만 사용해야합니다.

 

auto로 나둬도 상관없을 것 같다. 왜냐하면, maxscale을 쓴다는 것 자체가 데이터베이스

프록시로 사용하겠다는 것이고 다른 역할을 더 쓰지는 않을것 같다.

 

 # Server definitions
#
# Set the address of the server to the network
# address of a MariaDB server.
#

[server1]
type=server
address=127.0.0.1
port=3306
protocol=MariaDBBackend

 

서버 섹션은 서비스로 구성 될 수있는 백엔드 데이터베이스 서버를 정의하는 데 사용됩니다. 서버는 MaxScale 내의 하나 이상의 서비스에 속할 수 있습니다. 서버는 구성 파일의 섹션 이름 인 서버 이름으로 식별됩니다. 서버에는 유형 매개 변수 server와 주소 포트 및 프로토콜 매개 변수가 있습니다.

 

멤버 구성하는 설정인 것 같다.

 

앞서 구성했던 갈레라 클러스터 구성원들을 여기에 넣어봐야겠다.

 

 

 

 

 

 

 

 

 

'컴이야기 > MariaDB' 카테고리의 다른 글

Maxscale 2.3.6  (1) 2019.07.12
Galera Cluster error  (0) 2019.06.14
Galera Cluster Replication.  (0) 2019.03.18
Galera cluster 설치 삽질과정 (완료)  (0) 2018.11.02
xtrabackup 설치해보기 1 - 의존성 리스트  (0) 2018.10.25
posted by 떠돌이늑대 2018. 11. 2. 16:12

설치환경은 Centos 1804

 

설치 DB 는 mariadb 10.3.10 으로 진행했다.

 

총 3대의 가상머신에서 진행을 하는 중이다.

 

node 1, 2, 3 이고

 

IP는 192.168.1.140~142로 할당을 해주었고,

 

Galera cluster 가 사용하는 포트는 4444, 4567,4568 이기 때문에

 

OS 방화벽 허용리스트에 포함해주었다.

 

관련 문서링크

 

 http://galeracluster.com/documentation-webpages/firewallsettings.html

 

 

방화벽 포트 확인

 [root@galera2 ~]# firewall-cmd --list-ports
3306/tcp 4444/tcp 4567/tcp 4568/tcp

 

 

MariaDB 10.3.x 부터는 SST에서 xtrabackup-v2를 지원하지 않기 때문에

mariabackup을 사용하기로 정했다.

 

 

node 1의

my.cnf 에

 

아래와 같이 설정을 추가해주었다.

[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/maria/app/lib/galera/libgalera_smm.so
wsrep_provider_options=gcache.size=128M
wsrep_cluster_address="gcomm://"
wsrep_cluster_name=cfpc_galera
wsrep_node_address=192.168.1.140
wsrep_node_name=galera1
wsrep_sst_receive_address=192.168.1.140:4444
wsrep_sst_method=mariabackup
wsrep_sst_auth=galera:123qwe!@#QWE
binlog_format=ROW
innodb_autoinc_lock_mode=2
default_storage_engine=InnoDB

 

그리고 Mariadb 데몬을 실행시켜주었다.

 

/etc/init.d/maria start --wsrep-new-cluster

 

그리고 DB에 접속해서

상태를 보았다.

MariaDB [(none)]> show status like 'wsrep%';
+------------------------------+----------------------------------------+
| Variable_name                | Value                                  |
+------------------------------+----------------------------------------+
| wsrep_apply_oooe           | 0.000000                               |
| wsrep_apply_oool            | 0.000000                               |
| wsrep_apply_window        | 0.000000                               |
| wsrep_causal_reads          | 0                                         |
| wsrep_cert_deps_distance  | 0.000000                               |
| wsrep_cert_index_size       | 0                                         |
| wsrep_cert_interval          | 0.000000                               |
| wsrep_cluster_conf_id       | 1                                         |
| wsrep_cluster_size           | 1                                         |
| wsrep_cluster_state_uuid   | 07112bf5-dce0-11e8-bd0f-fe56e4bea91e   |
| wsrep_cluster_status        | Primary                                |
| wsrep_cluster_weight       | 1                                        |
| wsrep_commit_oooe        | 0.000000                              |
| wsrep_commit_oool         | 0.000000                              |
| wsrep_commit_window      | 0.000000                             |
| wsrep_connected             | ON                                     |
| wsrep_desync_count         | 0                                        |
| wsrep_evs_delayed           |                                          |
| wsrep_evs_evict_list          |                                        |
| wsrep_evs_repl_latency     | 2.6e-06/5.08e-06/8.2e-06/2.22207e-06/5 |
| wsrep_evs_state              | OPERATIONAL                            |
| wsrep_flow_control_paused    | 0.000000                               |
| wsrep_flow_control_paused_ns | 0                                      |
| wsrep_flow_control_recv      | 0                                      |
| wsrep_flow_control_sent      | 0                                      |
| wsrep_gcomm_uuid             | 9dcdbc95-de36-11e8-92d7-9a829c5cb06a   |
| wsrep_incoming_addresses     | 192.168.1.140:3306                     |
| wsrep_last_committed         | 4                                      |
| wsrep_local_bf_aborts         | 0                                      |
| wsrep_local_cached_downto    | 18446744073709551615                   |
| wsrep_local_cert_failures    | 0                                      |
| wsrep_local_commits          | 0                                      |
| wsrep_local_index            | 0                                      |
| wsrep_local_recv_queue       | 0                                      |
| wsrep_local_recv_queue_avg   | 0.500000                               |
| wsrep_local_recv_queue_max   | 2                                      |
| wsrep_local_recv_queue_min   | 0                                      |
| wsrep_local_replays          | 0                                      |
| wsrep_local_send_queue       | 0                                      |
| wsrep_local_send_queue_avg   | 0.000000                               |
| wsrep_local_send_queue_max   | 1                                      |
| wsrep_local_send_queue_min   | 0                                      |
| wsrep_local_state            | 4                                      |
| wsrep_local_state_comment    | Synced                                 |
| wsrep_local_state_uuid       | 07112bf5-dce0-11e8-bd0f-fe56e4bea91e   |
| wsrep_open_connections       | 0                                      |
| wsrep_open_transactions      | 0                                      |
| wsrep_protocol_version       | 9                                      |
| wsrep_provider_name          | Galera                                 |
| wsrep_provider_vendor        | Codership Oy <info@codership.com>      |
| wsrep_provider_version       | 25.3.24(r3825)                         |
| wsrep_ready                  | ON                                     |
| wsrep_received               | 2                                      |
| wsrep_received_bytes         | 144                                    |
| wsrep_repl_data_bytes        | 0                                      |
| wsrep_repl_keys              | 0                                      |
| wsrep_repl_keys_bytes        | 0                                      |
| wsrep_repl_other_bytes       | 0                                      |
| wsrep_replicated             | 0                                      |
| wsrep_replicated_bytes       | 0                                      |
| wsrep_thread_count           | 2                                      |
+------------------------------+----------------------------------------+
61 rows in set (0.003 sec)

 

node1 에서는 잘 실행되는 것 같다 .

 

node2에서

 

my.cnf에 아래와 같이 추가를 해주었다.

 

[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/maria/app/lib/galera/libgalera_smm.so
wsrep_provider_options=gcache.size=128M
wsrep_cluster_address="gcomm://192.168.1.140:4567"
wsrep_cluster_name=cfpc_galera
wsrep_sst_receive_address=192.168.1.141:4444
wsrep_node_address=192.168.1.141
wsrep_node_name=galera2
wsrep_sst_method=mariabackup
wsrep_sst_auth=galera:123qwe!@#QWE
binlog_format=ROW
innodb_autoinc_lock_mode=2
default_storage_engine=InnoDB

 

DB 구동이 실패했다.

 

 [root@galera2 ~]# systemctl start maria
Job for maria.service failed because the control process exited with error code. See "systemctl status maria.service" and "journalctl -xe" for details.

 

journalctl 을 이용해보았다.

 

-- Unit maria.service has begun starting up.
Nov 02 10:13:05 galera2 maria[2521]: Starting MariaDB.181102 10:13:05 mysqld_safe Logging to '/maria_log/error/maria.err'.
Nov 02 10:13:05 galera2 maria[2521]: 181102 10:13:05 mysqld_safe Starting mysqld daemon with databases from /dbdata
Nov 02 10:13:27 galera2 maria[2521]: .................... ERROR!
Nov 02 10:13:27 galera2 systemd[1]: maria.service: control process exited, code=exited status=1
Nov 02 10:13:27 galera2 systemd[1]: Failed to start LSB: start and stop MariaDB.
-- Subject: Unit maria.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit maria.service has failed.
--
-- The result is failed.

 

maria.err 에 기록이 되었단다. 열어보자.

 

2018-11-02 10:13:08 0 [Note] WSREP: Read nil XID from storage engines, skipping position init
2018-11-02 10:13:08 0 [Note] WSREP: wsrep_load(): loading provider library '/maria/app/lib/galera/libgalera_smm.so'
2018-11-02 10:13:08 0 [Note] WSREP: wsrep_load(): Galera 25.3.24(r3825) by Codership Oy <info@codership.com> loaded successfully.
2018-11-02 10:13:08 0 [Note] WSREP: CRC-32C: using hardware acceleration.
2018-11-02 10:13:08 0 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1, safe_to_bootstrap: 1
2018-11-02 10:13:08 0 [Note] WSREP: Passing config to GCS: base_dir = /dbdata/; base_host = 192.168.1.141; base_port = 4567; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3; 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 = /dbdata/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /dbdata//galera.cache; gcache.page_size = 128M; gcache.recover = no; gcache.size = 128M; gcomm.thread_prio = ; 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
2018-11-02 10:13:08 0 [Note] WSREP: GCache history reset: 07112bf5-dce0-11e8-bd0f-fe56e4bea91e:0 -> 00000000-0000-0000-0000-000000000000:-1
2018-11-02 10:13:08 0 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1
2018-11-02 10:13:08 0 [Note] WSREP: wsrep_sst_grab()
2018-11-02 10:13:08 0 [Note] WSREP: Start replication
2018-11-02 10:13:08 0 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1
2018-11-02 10:13:08 0 [Note] WSREP: protonet asio version 0
2018-11-02 10:13:08 0 [Note] WSREP: Using CRC-32C for message checksums.
2018-11-02 10:13:08 0 [Note] WSREP: backend: asio
2018-11-02 10:13:08 0 [Note] WSREP: gcomm thread scheduling priority set to other:0
2018-11-02 10:13:08 0 [Warning] WSREP: access file(/dbdata//gvwstate.dat) failed(No such file or directory)
2018-11-02 10:13:08 0 [Note] WSREP: restore pc from disk failed
2018-11-02 10:13:08 0 [Note] WSREP: GMCast version 0
2018-11-02 10:13:08 0 [Note] WSREP: (75a27987, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
2018-11-02 10:13:08 0 [Note] WSREP: (75a27987, 'tcp://0.0.0.0:4567') multicast: , ttl: 1
2018-11-02 10:13:08 0 [Note] WSREP: EVS version 0
2018-11-02 10:13:08 0 [Note] WSREP: gcomm: connecting to group 'cfpc_galera', peer '192.168.1.140:4567'
2018-11-02 10:13:08 0 [Note] WSREP: (75a27987, 'tcp://0.0.0.0:4567') connection established to 9dcdbc95 tcp://192.168.1.140:4567
2018-11-02 10:13:08 0 [Note] WSREP: (75a27987, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers:
2018-11-02 10:13:09 0 [Note] WSREP: declaring 9dcdbc95 at tcp://192.168.1.140:4567 stable
2018-11-02 10:13:09 0 [Note] WSREP: Node 9dcdbc95 state prim

2018-11-02 10:13:09 0 [Note] WSREP: view(view_id(PRIM,75a27987,4) memb {
        75a27987,0
        9dcdbc95,0
} joined {
} left {
} partitioned {
})
2018-11-02 10:13:09 0 [Note] WSREP: save pc into disk
2018-11-02 10:13:09 0 [Note] WSREP: gcomm: connected
2018-11-02 10:13:09 0 [Note] WSREP: Changing maximum packet size to 64500, resulting msg size: 32636
2018-11-02 10:13:09 0 [Note] WSREP: Shifting CLOSED -> OPEN (TO: 0)
2018-11-02 10:13:09 0 [Note] WSREP: Opened channel 'cfpc_galera'
2018-11-02 10:13:09 0 [Note] WSREP: Waiting for SST to complete.
2018-11-02 10:13:09 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 2
2018-11-02 10:13:09 0 [Note] WSREP: STATE_EXCHANGE: sent state UUID: 763ba9e2-de3c-11e8-9ed7-8a60fe20a71d
2018-11-02 10:13:09 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 763ba9e2-de3c-11e8-9ed7-8a60fe20a71d
2018-11-02 10:13:09 0 [Note] WSREP: STATE EXCHANGE: got state msg: 763ba9e2-de3c-11e8-9ed7-8a60fe20a71d from 0 (galera2)
2018-11-02 10:13:09 0 [Note] WSREP: STATE EXCHANGE: got state msg: 763ba9e2-de3c-11e8-9ed7-8a60fe20a71d from 1 (galera1)
2018-11-02 10:13:09 0 [Note] WSREP: Quorum results:
        version    = 4,
        component  = PRIMARY,
        conf_id    = 3,
        members    = 1/2 (joined/total),
        act_id     = 4,
        last_appl. = -1,
        protocols  = 0/9/3 (gcs/repl/appl),
        group UUID = 07112bf5-dce0-11e8-bd0f-fe56e4bea91e
2018-11-02 10:13:09 0 [Note] WSREP: Flow-control interval: [23, 23]
2018-11-02 10:13:09 0 [Note] WSREP: Trying to continue unpaused monitor
2018-11-02 10:13:09 0 [Note] WSREP: Shifting OPEN -> PRIMARY (TO: 4)
2018-11-02 10:13:09 2 [Note] WSREP: State transfer required:
        Group state: 07112bf5-dce0-11e8-bd0f-fe56e4bea91e:4
        Local state: 00000000-0000-0000-0000-000000000000:-1
2018-11-02 10:13:09 2 [Note] WSREP: New cluster view: global state: 07112bf5-dce0-11e8-bd0f-fe56e4bea91e:4, view# 4: Primary, number of nodes: 2, my index: 0, protocol version 3
2018-11-02 10:13:09 2 [Warning] WSREP: Gap in state sequence. Need state transfer.
2018-11-02 10:13:09 0 [Note] WSREP: Running: 'wsrep_sst_mariabackup --role 'joiner' --address '192.168.1.141:4444' --datadir '/dbdata/'   --parent '2998' --binlog '/maria_log/binary/maria-bin'  '''
WSREP_SST: [INFO] Streaming with xbstream (20181102 10:13:10.481)
WSREP_SST: [INFO] Using socat as streamer (20181102 10:13:10.486)
WSREP_SST: [INFO] Stale sst_in_progress file: /dbdata//sst_in_progress (20181102 10:13:10.494)
WSREP_SST: [INFO] Evaluating timeout -k 110 100 socat -u TCP-LISTEN:4444,reuseaddr stdio | mbstream -x; RC=( ${PIPESTATUS[@]} ) (20181102 10:13:10.564)
2018-11-02 10:13:10 2 [Note] WSREP: Prepared SST request: mariabackup|192.168.1.141:4444/xtrabackup_sst//1
2018-11-02 10:13:10 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2018-11-02 10:13:10 2 [Note] WSREP: REPL Protocols: 9 (4, 2)
2018-11-02 10:13:10 2 [Note] WSREP: Assign initial position for certification: 4, protocol version: 4
2018-11-02 10:13:10 0 [Note] WSREP: Service thread queue flushed.

2018-11-02 10:13:10 2 [Warning] WSREP: Failed to prepare for incremental state transfer: Local state UUID (00000000-0000-0000-0000-000000000000) does not match group state UUID (07112bf5-dce0-11e8-bd0f-fe56e4bea91e): 1 (Operation not permitted)
         at galera/src/replicator_str.cpp:prepare_for_IST():482. IST will be unavailable.
2018-11-02 10:13:10 0 [Note] WSREP: Member 0.0 (galera2) requested state transfer from '*any*'. Selected 1.0 (galera1)(SYNCED) as donor.
2018-11-02 10:13:10 0 [Note] WSREP: Shifting PRIMARY -> JOINER (TO: 4)
2018-11-02 10:13:10 2 [Note] WSREP: Requesting state transfer: success, donor: 1
2018-11-02 10:13:10 2 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000:0 -> 07112bf5-dce0-11e8-bd0f-fe56e4bea91e:4
WSREP_SST: [INFO] WARNING: Stale temporary SST directory: /dbdata//.sst from previous state transfer. Removing (20181102 10:13:11.434)
WSREP_SST: [INFO] Proceeding with SST (20181102 10:13:11.441)
WSREP_SST: [INFO] Evaluating socat -u TCP-LISTEN:4444,reuseaddr stdio | mbstream -x; RC=( ${PIPESTATUS[@]} ) (20181102 10:13:11.444)
WSREP_SST: [INFO] Cleaning the existing datadir and innodb-data/log directories (20181102 10:13:11.452)
removed ‘/dbdata/aria_log_control’
removed ‘/dbdata/aria_log.00000001’
removed ‘/dbdata/ibdata1’
removed ‘/dbdata/ibdata2’
removed ‘/dbdata/ibdata3’
removed ‘/dbdata/ibdata4’
removed ‘/dbdata/ibdata5’
removed ‘/dbdata/ib_logfile1’
removed ‘/dbdata/ib_logfile2’
removed ‘/dbdata/ib_logfile3’
removed ‘/dbdata/ib_logfile4’
WSREP_SST: [INFO] Cleaning the binlog directory /maria_log/binary as well (20181102 10:13:11.473)
removed ‘/maria_log/binary/maria-bin.000001’
WSREP_SST: [INFO] Waiting for SST streaming to complete! (20181102 10:13:11.480)
2018-11-02 10:13:11 0 [Note] WSREP: (75a27987, 'tcp://0.0.0.0:4567') turning message relay requesting off
2018-11-02 10:13:21 0 [Warning] WSREP: 1.0 (galera1): State transfer to 0.0 (galera2) failed: -22 (Invalid argument)
2018-11-02 10:13:21 0 [ERROR] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_join_msg():737: Will never receive state. Need to abort.
2018-11-02 10:13:21 0 [Note] WSREP: gcomm: terminating thread
2018-11-02 10:13:21 0 [Note] WSREP: gcomm: joining thread
2018-11-02 10:13:21 0 [Note] WSREP: gcomm: closing backend
WSREP_SST: [ERROR] xtrabackup_checkpoints missing, failed innobackupex/SST on donor (20181102 10:13:21.557)
WSREP_SST: [ERROR] Cleanup after exit with status:2 (20181102 10:13:21.609)
2018-11-02 10:13:21 0 [ERROR] WSREP: Process completed with error: wsrep_sst_mariabackup --role 'joiner' --address '192.168.1.141:4444' --datadir '/dbdata/'   --parent '2998' --binlog '/maria_log/binary/maria-bin'  '': 2 (No such file or directory)
2018-11-02 10:13:21 0 [ERROR] WSREP: Failed to read uuid:seqno and wsrep_gtid_domain_id from joiner script.
2018-11-02 10:13:21 0 [ERROR] WSREP: SST failed: 2 (No such file or directory)
2018-11-02 10:13:21 0 [ERROR] Aborting

 

이러한 것들이 기록이 되었다.

 

 

그리고 node1에서 이러한 기록이 보인다.

 

innobackup.backup.log 파일을 열어본다.

 

181102 14:51:08 Connecting to MySQL server host: localhost, user: galera, password: set, port: not set, socket: /tmp/maria.sock
Failed to connect to MySQL server: Access denied for user 'galera'@'localhost' (using password: YES).

 

계정 문제?

 

이미 계정을 생성해주었고, 모든권한을 주었는데... 엑세스 거부라니...뭘까...

 

node1에서

 

mysql 접속한 다음.

 

drop user galera@localhost;

drop user  galera@127.0.0.1;

drop user galera@'%';

 

를 한다음

 

다시 생성해보았다.

 

그리고 node2에서 

systemctl start maria

된다....

 

 

node3에서 같은 문제가 발생했지만,

 

node1을 systemctl stop maria를 하여

 

중지한 다음 my.cnf 에

wsrep_cluster_address="gcomm://" 에 모든 노드의 IP를 추가해준다음

 

node1에서

 

systemctl start maria

 

서비스가 시작되고 갈레라클러스터가 제대로 작동된것을 확인후

 

node2에서 서비스 중지 후 my.cnf의

wsrep_cluster_address="gcomm://" 부분을 node1과 node3으로 변경해서

 

서비스를 시작 정상 작동 후 갈레라클러스터도 확인 정상

 

node3을 시작했더니.... 되더라..

 

MariaDB [(none)]> show status like 'wsrep_%';
+------------------------------+----------------------------------------------------------+
| Variable_name                | Value                                                    |
+------------------------------+----------------------------------------------------------+
| wsrep_apply_oooe             | 0.000000                                                 |
| wsrep_apply_oool             | 0.000000                                                 |
| wsrep_apply_window           | 0.000000                                                 |
| wsrep_causal_reads           | 0                                                        |
| wsrep_cert_deps_distance     | 0.000000                                                 |
| wsrep_cert_index_size        | 0                                                        |
| wsrep_cert_interval          | 0.000000                                                 |
| wsrep_cluster_conf_id        | 27                                                       |
| wsrep_cluster_size           | 3                                                        |
| wsrep_cluster_state_uuid     | ed7ec725-de61-11e8-9a68-26599eda2ee7                     |
| wsrep_cluster_status         | Primary                                                  |
| wsrep_cluster_weight         | 3                                                        |
| wsrep_commit_oooe            | 0.000000                                                 |
| wsrep_commit_oool            | 0.000000                                                 |
| wsrep_commit_window          | 0.000000                                                 |
| wsrep_connected              | ON                                                       |
| wsrep_desync_count           | 0                                                        |
| wsrep_evs_delayed            |                                                          |
| wsrep_evs_evict_list         |                                                          |
| wsrep_evs_repl_latency       | 0/0/0/0/0                                                |
| wsrep_evs_state              | OPERATIONAL                                              |
| wsrep_flow_control_paused    | 0.000000                                                 |
| wsrep_flow_control_paused_ns | 0                                                        |
| wsrep_flow_control_recv      | 0                                                        |
| wsrep_flow_control_sent      | 0                                                        |
| wsrep_gcomm_uuid             | ae0b4de8-de7d-11e8-bb50-3773face4542                     |
| wsrep_incoming_addresses     | 192.168.1.140:3306,192.168.1.141:3306,192.168.1.142:3306 |
| wsrep_last_committed         | 29                                                       |
| wsrep_local_bf_aborts        | 0                                                        |
| wsrep_local_cached_downto    | 18446744073709551615                                     |
| wsrep_local_cert_failures    | 0                                                        |
| wsrep_local_commits          | 0                                                        |
| wsrep_local_index            | 2                                                        |
| wsrep_local_recv_queue       | 0                                                        |
| wsrep_local_recv_queue_avg   | 0.000000                                                 |
| wsrep_local_recv_queue_max   | 1                                                        |
| wsrep_local_recv_queue_min   | 0                                                        |
| wsrep_local_replays          | 0                                                        |
| wsrep_local_send_queue       | 0                                                        |
| wsrep_local_send_queue_avg   | 0.000000                                                 |
| wsrep_local_send_queue_max   | 1                                                        |
| wsrep_local_send_queue_min   | 0                                                        |
| wsrep_local_state            | 4                                                        |
| wsrep_local_state_comment    | Synced                                                   |
| wsrep_local_state_uuid       | ed7ec725-de61-11e8-9a68-26599eda2ee7                     |
| wsrep_open_connections       | 0                                                        |
| wsrep_open_transactions      | 0                                                        |
| wsrep_protocol_version       | 9                                                        |
| wsrep_provider_name          | Galera                                                   |
| wsrep_provider_vendor        | Codership Oy <info@codership.com>                        |
| wsrep_provider_version       | 25.3.24(r3825)                                           |
| wsrep_ready                  | ON                                                       |
| wsrep_received               | 3                                                        |
| wsrep_received_bytes         | 296                                                      |
| wsrep_repl_data_bytes        | 0                                                        |
| wsrep_repl_keys              | 0                                                        |
| wsrep_repl_keys_bytes        | 0                                                        |
| wsrep_repl_other_bytes       | 0                                                        |
| wsrep_replicated             | 0                                                        |
| wsrep_replicated_bytes       | 0                                                        |
| wsrep_thread_count           | 2                                                        |
+------------------------------+----------------------------------------------------------+
61 rows in set (0.003 sec) 

 

 

 

험난하다 험난해...

 

가상머신을 다시 만들어서 해봐야겠다.

 

 

된다!

 

'컴이야기 > MariaDB' 카테고리의 다른 글

Maxscale 2.3.6  (1) 2019.07.12
Galera Cluster error  (0) 2019.06.14
Galera Cluster Replication.  (0) 2019.03.18
maxscale 을 사용해보자. [진행중]  (0) 2018.11.07
xtrabackup 설치해보기 1 - 의존성 리스트  (0) 2018.10.25