CentOS 7의 MariaDB Galera 클러스터에서 MySQL을 시작하는 중에 오류가 발생했습니다.

CentOS 7의 MariaDB Galera 클러스터에서 MySQL을 시작하는 중에 오류가 발생했습니다.

다음과 같이 MariaDB Galera 클러스터를 설정하려고 합니다.이것튜토리얼이 똑같아서 계속 멈췄어요7단계 – 첫 번째 클러스터 노드 초기화, 저는 이 일을 하고 sudo /etc/init.d/mysql start --wsrep-new-cluster있는데 얼마 후에는 다음 Starting MySQL.....과 같이 끝납니다.Starting MySQL..... ERROR!

무슨 일인지 말해 줄 사람 있나요? 이것은 내 MySQL 로그입니다.

150408 11:46:56 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150408 11:46:56 mysqld_safe WSREP: Running position recovery with --log_error='/var/lib/mysql/wsrep_recovery.X0vkQP' --pid-file='/var/lib/mysql/db1-recover.pid'
150408 11:46:58 mysqld_safe WSREP: Recovered position 00000000-0000-0000-0000-000000000000:-1
150408 11:46:58 [Note] WSREP: wsrep_start_position var submitted: '00000000-0000-0000-0000-000000000000:-1'
150408 11:46:58 [Note] WSREP: Read nil XID from storage engines, skipping position init
150408 11:46:58 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera/libgalera_smm.so'
150408 11:46:58 [Note] WSREP: wsrep_load(): Galera 25.3.9(r3385) by Codership Oy <[email protected]> loaded successfully.
150408 11:46:58 [Note] WSREP: CRC-32C: using "slicing-by-8" algorithm.
150408 11:46:58 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1
150408 11:46:58 [Note] WSREP: Passing config to GCS: base_host = 172.28.109.10; 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 = /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.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.recove
150408 11:46:58 [Note] WSREP: Service thread queue flushed.
150408 11:46:58 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1
150408 11:46:58 [Note] WSREP: wsrep_sst_grab()
150408 11:46:58 [Note] WSREP: Start replication
150408 11:46:58 [Note] WSREP: 'wsrep-new-cluster' option used, bootstrapping the cluster
150408 11:46:58 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1
150408 11:46:58 [Note] WSREP: protonet asio version 0
150408 11:46:58 [Note] WSREP: Using CRC-32C for message checksums.
150408 11:46:58 [Note] WSREP: backend: asio
150408 11:46:58 [Warning] WSREP: access file(gvwstate.dat) failed(No such file or directory)
150408 11:46:58 [Note] WSREP: restore pc from disk failed
150408 11:46:58 [Note] WSREP: GMCast version 0
150408 11:46:58 [Note] WSREP: (7dc963a0, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
150408 11:46:58 [Note] WSREP: (7dc963a0, 'tcp://0.0.0.0:4567') multicast: , ttl: 1
150408 11:46:58 [Note] WSREP: EVS version 0
150408 11:46:58 [Note] WSREP: gcomm: bootstrapping new group 'galera_cluster'
150408 11:46:58 [Note] WSREP: start_prim is enabled, turn off pc_recovery
150408 11:46:58 [ERROR] WSREP: Permission denied
150408 11:46:58 [ERROR] WSREP: failed to open gcomm backend connection: 13: error while trying to listen 'tcp://0.0.0.0:4567?socket.non_blocking=1', asio error 'Permission denied': 13 (Permission denied)
     at gcomm/src/asio_tcp.cpp:listen():777
150408 11:46:58 [ERROR] WSREP: gcs/src/gcs_core.cpp:long int gcs_core_open(gcs_core_t*, const char*, const char*, bool)():206: Failed to open backend connection: -13 (Permission denied)
150408 11:46:58 [ERROR] WSREP: gcs/src/gcs.cpp:long int gcs_open(gcs_conn_t*, const char*, const char*, bool)():1379: Failed to open channel 'galera_cluster' at 'gcomm://172.28.109.10,172.28.109.11,172.28.109.12': -13 (Permission denied)
150408 11:46:58 [ERROR] WSREP: gcs connect failed: Permission denied
150408 11:46:58 [ERROR] WSREP: wsrep::connect() failed: 7
150408 11:46:58 [ERROR] Aborting

150408 11:46:58 [Note] WSREP: Service disconnected.
150408 11:46:59 [Note] WSREP: Some threads may fail to exit.
150408 11:46:59 [Note] /usr/sbin/mysqld: Shutdown complete

150408 11:46:59 mysqld_safe mysqld from pid file /var/lib/mysql/db1.pid ended

답변1

해결되었습니다. 문제는 SELinux에 있었습니다. 명시적으로 허용 모드로 설정했지만 변경 사항을 올바르게 적용하기 위해 재부팅하지 않았습니다. 그래서 SELinux의 현재 상태를 확인해 sestatus보니 Permissive 모드로 구성되어 있지만 Enforcing 모드로 실행되고 있는 것으로 나타났습니다.

관련 정보