- Hi I am trying to create a wordpress application using docker compose and I use the Galera MariaDB catalog entry from the rancher.
I can get all the set up working fine. I use external links and connect to the load balancer with some environment variable like this:
external_links:
- r-galera_galera-lb_1:mysql
I can see the tables being replicated in the cluster, however if I reboot the machine, even after the stack becomes active again, I fail to launch the application.
I get the error like this:
> wordpress-docker-php-fpm | MySQL "CREATE DATABASE" Error: WSREP has not yet prepared node for application use > wordpress-docker-php-fpm exited with code 1
When I remove the whole Galera Stack and make a new one I get my wordpress setup working again.
I had to come to this forum for this issue since I couldn't contact any maintainer of the catalog (there isn't any contact info). Can someone help in this regard ?
问问题
577 次
1 回答
2
Hello Syed Alam Abbas,
the issue with your approach is = the cluster is not properly shut down and started. If you reboot your machine, the clusters nodes will go out of sync and store the latest state they are in. If you restart the machine and everything is back online - you have an unsynced cluster. You can follow this guide to recover your cluster.
The guide is pretty straight forward:
- check the latest state of all your nodes "wsrep_last_committed" with
SHOW STATUS LIKE 'wsrep_%';
- Promote the node which has the most-up-to-date data to be the primary.
于 2016-12-31T12:01:31.900 回答