MySQL InnoDB Cluster node Addition Issue: - Cluster.addInstance: : MySQL server has gone away (RuntimeError)

MySQL InnoDB Cluster node Addition Issue: - Cluster.addInstance: : MySQL server has gone away (RuntimeError)

Recently , We have been adding node to MySQL InnoDB Cluster and faced error"Cluster.addInstance: n4ldbdev5101:3306: MySQL server has gone away (RuntimeError)"

Below is complete message of the node addition command along with error:



If we notice highlighted message in above screenshot , Clone of the node completed successfully but node addition somehow failed during the updating the MySQL InnoDB Cluster information in metadata tables.

In order to make sure if the cluster node is added completely and successfully , We need to verify information from MySQL Metadata tables. 

To confirm check database created on the target server and run below queries:
select * from mysql_innodb_cluster_metadata.clusters;
select * from mysql_innodb_cluster_metadata.instances;
select * from mysql_innodb_cluster_metadata.replicasets;
select * from mysql_innodb_cluster_metadata.hosts;
select * from mysql_innodb_cluster_metadata.routers;
SELECT * from  performance_schema.replication_group_members;

If above queries output does not show newly added server in innodb metadata database but newly added server is there in performance_schema which means that innodb metadata did not get update.

To resolve the issue , We need to update the innodb metadata tables. In order to  update metadata ,Please execute rescan() cluster.


Verify the metadata information by running below commands:
select * from mysql_innodb_cluster_metadata.clusters;
select * from mysql_innodb_cluster_metadata.instances;
select * from mysql_innodb_cluster_metadata.replicasets;
select * from mysql_innodb_cluster_metadata.hosts;
select * from mysql_innodb_cluster_metadata.routers;
SELECT * from  performance_schema.replication_group_members;

In addition to running above command , We should also check cluster status .


NOTE: In above status command ,There is only two node visible as we have only added one cluster node and yet to add third node to MySQL InnoDB Cluster. We should have minimum three node in MySQL Innodb Cluster. 

====================================================================

You can also , Visit our Blogs for related topic on MySQL InnoDB Cluster:





Comments

Popular posts from this blog

Restore MySQL Database from mysqlbackup

Oracle Database 19C Installation on Windows Server 2016

MySQL InnoDB Cluster Restore/Create Issue : - Dba.createCluster: Group Replication failed to start: MySQL Error 3094 (HY000)