MySQL Forums
Forum List  »  InnoDB clusters

Re: Cannot remove 'MISSING' instances by rescan()
Posted by: Yoshiaki Tomita
Date: January 08, 2020 11:14PM

Thank you for your reply.
Current cluster's status is shown URL/link below.

https://forums.mysql.com/read.php?177,683491,683491#msg-683491

At Node '172.18.0.31', mysql-server is removed.
So we'd like to remove the instance '172.18.0.31:3306'.
We started the shell with the following options:

> $ ./bin/mysqlsh --dba-log-sql=2 --verbose=2

Then, we tried to remove the instance as below.
Some output messages are left out.

-----------------------------------------------------------------
MySQL 172.18.0.32:33060+ ssl JS > var cluster = dba.getCluster()
MySQL 172.18.0.32:33060+ ssl JS > cluster.removeInstance('172.18.0.31:3306',{force:true})





verbose: 2020-01-09T11:55:41Z: warning: The instance '172.18.0.31:3306' is '(MISSING)'
NOTE: The instance '172.18.0.31:3306' is not reachable and it will only be removed from the metadata. Please take any necessary actions to make sure that the instance will not rejoin the cluster if brought back online.





verbose: 2020-01-09T11:55:41Z: Removing instance from metadata
verbose: 2020-01-09T11:55:41Z: 172.18.0.32:3306: DELETE FROM mysql_innodb_cluster_metadata.instances WHERE addresses->'$.mysqlClassic' = '172.18.0.31:3306'
verbose: 2020-01-09T11:55:41Z: warning: While querying metadata: MySQL Error 3098 (HY000): The table does not comply with the requirements by an external plugin.
Cluster.removeInstance: The table does not comply with the requirements by an external plugin. (MySQL Error 3098)
-----------------------------------------------------------------

Plugin 'group_replication' is active.
But warning,'The table does not comply with the requirements by an external plugin.' was shown.


In sql mode, we failed to delete instance '172.18.0.31:3306' as below.

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

MySQL 172.18.0.32:33060+ ssl mysql_innodb_cluster_metadata SQL > select instance_id,instance_name from instances;
+-------------+------------------+
| instance_id | instance_name |
+-------------+------------------+
| 42 | 172.18.0.31:3306 |
| 41 | 172.18.0.32:3306 |
| 43 | 172.18.0.33:3306 |
+-------------+------------------+
3 rows in set (0.0007 sec)

MySQL 172.18.0.32:33060+ ssl mysql_innodb_cluster_metadata SQL > delete from instances where instance_id = 42;
ERROR: 3098: The table does not comply with the requirements by an external plugin.
-------------------------------------------------------------


Also, we tried to switch to Single-Primary Mode,and remove instances. 
But the switch failed. All instance members must be online.

----------------------------------------------------------
MySQL 172.18.0.32:33060+ ssl JS > cluster.switchToSinglePrimaryMode()





verbose: 2020-01-09T15:53:43Z: Checking if all members of the Replicaset are ONLINE.
verbose: 2020-01-09T15:53:43Z: 172.18.0.33:3306: SELECT m.member_id, m.member_state, m.member_host, m.member_port, m.member_role, m.member_version, s.view_id FROM performance_schema.replication_group_members m LEFT JOIN performance_schema.replication_group_member_stats s ON m.member_id = s.member_id AND s.channel_name = 'group_replication_applier' ORDER BY m.member_id
verbose: 2020-01-09T15:53:43Z: 172.18.0.33:3306: SELECT i.instance_id, r.cluster_id, i.role, r.attributes->>'$.group_replication_group_name' group_name, i.instance_name label, i.mysql_server_uuid, i.addresses->>'$.mysqlClassic' endpoint, i.addresses->>'$.mysqlX' xendpoint, i.addresses->>'$.grEndpoint' grendpoint FROM mysql_innodb_cluster_metadata.instances i LEFT JOIN mysql_innodb_cluster_metadata.replicasets r ON r.replicaset_id = i.replicaset_id WHERE r.cluster_id = 3
verbose: 2020-01-09T15:53:43Z: Connecting to instance '172.18.0.32:3306'.
ERROR: The instance '172.18.0.31:3306' has the status: '(MISSING)'. All members must be ONLINE.
Cluster.switchToSinglePrimaryMode: One or more instances of the cluster are not ONLINE. (RuntimeError)
----------------------------------------------------------


What should we do to remove the instance ?



Edited 2 time(s). Last edit at 01/09/2020 12:58AM by Yoshiaki Tomita.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Cannot remove 'MISSING' instances by rescan()
360
January 08, 2020 11:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.