Cluster start on RHEL 7

58 views
Skip to first unread message

MrSyrael

unread,
Apr 19, 2017, 10:13:39 AM4/19/17
to codership
I am currently trying to start a mariadb-galera-cluster on a RHEL7. I only tested it before on an ubuntu 16.04 and managed to get it to work there.
On the final system with rhel 7 I fail to start the cluster now.
I added a galera.cnf under /etc/my.cnf.d/ on each node.
But whenever I try to start the cluster with the galera_new_cluster (or the --wsrep-new-clutser) it fails.
systemctl status mysql says: "WSREP: failed to recover position: "".
A grastate.dat doesnt exist under /var/lib/mysql so I am currently a bid in the open of locating the issue.

Anyone had a similiar issue before or understands more from that error.

MrSyrael

unread,
Apr 20, 2017, 3:04:09 AM4/20/17
to codership
Just as an update. I managed to locate the problem now. SELinux was in enforcing mode. After setting it to permissive (not a clean solution I know) I could start the first node with the galera_new_cluster command.
Now I just need to figure out why I get a connection time out when joining the second node to the cluster.

Jonathan Gazeley

unread,
Apr 20, 2017, 4:43:30 AM4/20/17
to codersh...@googlegroups.com
On 20/04/17 08:04, MrSyrael wrote:
> Just as an update. I managed to locate the problem now. SELinux was in
> enforcing mode. After setting it to permissive (not a clean solution I
> know) I could start the first node with the galera_new_cluster command.

You can easily generate an SELinux policy by doing a command like this[1]:

sudo cat /var/log/audit/audit.log | egrep -i 'mariadb|mysql' |
audit2allow -m site-mariadb > site-mariadb.te

And once you've generated your .te file, you can load it like this[2]:

checkmodule -M -m -o site-mariadb.mod site-mariadb.te
semodule_package -o site-mariadb.pp -m site-mariadb.mod
semodule -i site-mariadb.pp

[1] http://unix.bris.ac.uk/2013/08/22/how-to-use-selinux/

[2]
https://wiki.centos.org/HowTos/SELinux#head-faa96b3fdd922004cdb988c1989e56191c257c01

Cheers,
Jonathan

--
Jonathan Gazeley
Senior Systems Administrator
IT Services
University of Bristol
Reply all
Reply to author
Forward
0 new messages