Ask Your Question
0

MariaDB Galera issue: (OperationalError) (1047, 'WSREP has not yet prepared node for application use')

asked 2016-01-17 10:44:10 -0600

Satyanarayana Patibandla gravatar image

updated 2017-08-20 02:00:23 -0600

sxc731 gravatar image

We are trying to set up high availability with two controller nodes. For this a MariaDB Galera cluster is created with two controller nodes and status of cluster is Primary. All the openstack commands are working fine. But sometimes we can see the following error in log files. Error: (OperationalError) (1047, 'WSREP has not yet prepared node for application use') due to this some times heat stack creation is failing.

We are not able to debug the issue as it is not happening always. Could you please let us know if you have come across this kind of error.

The main wsrep parameter values on both the controller nodes are given below. The values are same on both the nodes,

MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep_cluster_state_uuid';
+--------------------------+--------------------------------------+
| Variable_name            | Value                                |
+--------------------------+--------------------------------------+
| wsrep_cluster_state_uuid | 6ded79f5-9e42-11e5-9c69-03398fb5134f |
+--------------------------+--------------------------------------+
1 row in set (0.01 sec)

MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep_cluster_conf_id';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| wsrep_cluster_conf_id | 89    |
+-----------------------+-------+
1 row in set (0.00 sec)

MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 2     |
+--------------------+-------+
1 row in set (0.00 sec)

MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep_cluster_status';
+----------------------+---------+
| Variable_name        | Value   |
+----------------------+---------+
| wsrep_cluster_status | Primary |
+----------------------+---------+
1 row in set (0.00 sec)

MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep_ready';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wsrep_ready   | ON    |
+---------------+-------+
1 row in set (0.00 sec)

MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep_connected';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| wsrep_connected | ON    |
+-----------------+-------+
1 row in set (0.00 sec)

MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
+---------------------------+--------+
| Variable_name             | Value  |
+---------------------------+--------+
| wsrep_local_state_comment | Synced |
+---------------------------+--------+

Thanks, Satya.P

edit retag flag offensive close merge delete

Comments

It seems you have connection problem between two Controller nodes. You can use this guide for your environment:

  • http://galeracluster.com/documentation-webpages/twonode.html
scarface gravatar imagescarface ( 2017-06-21 01:00:20 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2016-05-10 07:46:23 -0600

r00t gravatar image

updated 2017-08-20 01:59:26 -0600

sxc731 gravatar image

A command may fail with ER_UNKNOWN_COM_ERROR producing 'WSREP has not yet prepared node for application use' (or 'Unknown command' in older versions) error message. It happens when a cluster is suspected to be split and the node is in a smaller part — for example, during a network glitch, when nodes temporarily lose each other. It can also occur during state transfer. The node takes this measure to prevent data inconsistency. Its usually a temporary state which can be detected by checking wsrep_ready value. The node, however, allows SHOW and SET command during this period.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-01-17 10:44:10 -0600

Seen: 9,127 times

Last updated: Aug 20 '17