从MySQL InnoDB集群中删除节点时收到错误

时间:2019-01-23 19:03:00

标签: javascript mysql innodb mysql-cluster

我正在尝试从MySQL InnoDB群集(5.7.24)中删除一个节点(辅助节点),但会引发错误。我尝试从所有节点执行相同的操作,但是出现相同的错误。

有人可以检查以下详细信息并帮助解决此问题。

 MySQL  node01:3306 ssl  JS > var c = dba.getCluster()
 MySQL  node01:3306 ssl  JS > c.status()
{
    "clusterName": "dbacluster",
    "defaultReplicaSet": {
        "name": "default",
        "primary": "node01:3306",
        "ssl": "REQUIRED",
        "status": "OK",
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
        "topology": {
            "node01:3306": {
                "address": "node01:3306",
                "mode": "R/W",
                "readReplicas": {},
                "role": "HA",
                "status": "ONLINE"
            },
            "node02:3306": {
                "address": "node02:3306",
                "mode": "R/O",
                "readReplicas": {},
                "role": "HA",
                "status": "ONLINE"
            },
            "node03:3306": {
                "address": "node03:3306",
                "mode": "R/O",
                "readReplicas": {},
                "role": "HA",
                "status": "ONLINE"
            }
        }
    },
    "groupInformationSourceMember": "mysql://clusterAdministrator@node01:3306"
}

 MySQL  node01:3306 ssl  JS > c.removeInstance("clusterAdministrator@node03:3306")
The instance will be removed from the InnoDB cluster. Depending on the instance
being the Seed or not, the Metadata session might become invalid. If so, please
start a new session to the Metadata Storage R/W instance.
Cluster.removeInstance: get_string(7): field is NULL (LogicError)

 MySQL  node01:3306 ssl  JS >

在调试模式下执行相同的命令,

MySQL  localhost:3306 ssl  JS > c.removeInstance("clusterAdministrator@node03:3306")
2019-01-29 22:57:04: Debug: Instance type check: mysql://clusterAdministrator@node01:3306: GR is active
2019-01-29 22:57:04: Debug: Instance type check: mysql://clusterAdministrator@node01:3306: Metadata record found
2019-01-29 22:57:04: Debug: Verifying connection options
2019-01-29 22:57:04: Debug: Checking if the instance belongs to the replicaset
2019-01-29 22:57:04: Debug: DBA: execute_sql('SELECT COUNT(*) as count FROM mysql_innodb_cluster_metadata.instances WHERE replicaset_id = 1 AND addresses->'$.mysqlClassic' = 'node03:3306'')
2019-01-29 22:57:04: Debug: Checking if the instance is the last in the replicaset
2019-01-29 22:57:04: Debug: DBA: execute_sql('SELECT COUNT(*) as count FROM mysql_innodb_cluster_metadata.instances WHERE replicaset_id = 1')
2019-01-29 22:57:04: Debug: Connecting to instance 'node03:3306'
2019-01-29 22:57:04: Debug: Successfully connected to instance
2019-01-29 22:57:04: Debug: Checking user privileges
2019-01-29 22:57:04: Info: Validating account clusterAdministrator@%...
The instance will be removed from the InnoDB cluster. Depending on the instance
being the Seed or not, the Metadata session might become invalid. If so, please
start a new session to the Metadata Storage R/W instance.
2019-01-29 22:57:04: Info: The instance will be removed from the InnoDB cluster. Depending on the instance
being the Seed or not, the Metadata session might become invalid. If so, please
start a new session to the Metadata Storage R/W instance.

2019-01-29 22:57:04: Debug: Saving instance definition
2019-01-29 22:57:04: Debug: DBA: execute_sql('SELECT host_id, replicaset_id, mysql_server_uuid, instance_name, role, weight, JSON_UNQUOTE(JSON_EXTRACT(addresses, '$.mysqlClassic')) as endpoint, JSON_UNQUOTE(JSON_EXTRACT(addresses, '$.mysqlX')) as xendpoint, JSON_UNQUOTE(JSON_EXTRACT(addresses, '$.grLocal')) as grendpoint, addresses, attributes, version_token, description FROM mysql_innodb_cluster_metadata.instances WHERE addresses->'$.mysqlClassic' = 'node03:3306'')
2019-01-29 22:57:04: Error: Cluster.removeInstance: get_string(7): field is NULL
Cluster.removeInstance: get_string(7): field is NULL (LogicError)
2019-01-29 22:57:04: Debug: Cluster.removeInstance: get_string(7): field is NULL (LogicError)

2019-01-29 22:57:04: Debug: Match '*;localhost;*' vs ';;'
2019-01-29 22:57:04: Debug: Match '' vs ''

0 个答案:

没有答案