Bug #94115 mysql 8.0.14 dba.createCluster fail
Submitted: 29 Jan 14:18 Modified: 5 Feb 2:03
Reporter: Bin Hong (OCA) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.14 OS:Linux
Assigned to: Bogdan Kecman CPU Architecture:Any

[29 Jan 14:18] Bin Hong
Description:
Use mysql shell to create innodb cluster using mysql 8.0.14 docker image 
dba.createCluster() fail

2019-01-29 12:55:46: Info: Validating account root@%...
2019-01-29 12:55:46: Info: This instance reports its own address as mysql1-dc1
2019-01-29 12:55:46: Info: Validating InnoDB page size of instance 'mysql1-dc1:3306'.
2019-01-29 12:55:46: Info: Checking if performance_schema is enabled on instance 'mysql1-dc1:3306'.
2019-01-29 12:55:46: Info: Validating configuration of mysql1-dc1:3306 (mycnf = )
2019-01-29 12:55:47: Warning: SSL mode used to configure the cluster: 'REQUIRED'
2019-01-29 12:55:47: Info: Joining 'mysql1-dc1:3306' to group with user root
2019-01-29 12:55:47: Info: Using Group Replication exit state action: READ_ONLY
2019-01-29 12:55:47: Info: DBA: mysqlprovision: Executing '[{"exit_state_action":"READ_ONLY","rep_user_passwd":"****","replication_user":"mysql_innodb_cluster_r4296679564","ssl_mode":"REQUIRED","verbose":0},{"host":"mysql1-dc1","passwd":"****","password":"****","port":3306,"scheme":"mysql","user":"root"}]\n.\n' | /usr/bin/mysqlsh --log-level=5 --py -f /usr/share/mysqlsh/mysqlprovision.zip start-replicaset
2019-01-29 12:55:47: Error: Failed to initialize the default helper "login-path": Credential helper named "login-path" could not be found or is invalid. See logs for more information.
2019-01-29 12:55:47: Info: Credential store mechanism is going to be disabled.
2019-01-29 12:55:47: Info: mysqlprovision: 
2019-01-29 12:55:47: Info: mysqlprovision: Running start command on 'mysql1-dc1:3306'.
2019-01-29 12:55:47: Info: mysqlprovision: Checking Group Replication prerequisites.
2019-01-29 12:55:47: Info: mysqlprovision: * Comparing options compatibility with Group Replication... PASS
2019-01-29 12:55:47: Info: mysqlprovision: Server configuration is compliant with the requirements.
2019-01-29 12:55:47: Info: mysqlprovision: * Checking server version... PASS
2019-01-29 12:55:47: Info: mysqlprovision: Server is 8.0.14
2019-01-29 12:55:47: Info: mysqlprovision: 
2019-01-29 12:55:47: Info: mysqlprovision: * Checking that server_id is unique... PASS
2019-01-29 12:55:47: Info: mysqlprovision: The server_id is valid.
2019-01-29 12:55:47: Info: mysqlprovision: 
2019-01-29 12:55:47: Info: mysqlprovision: * Checking compatibility of Multi-Threaded Slave settings... PASS
2019-01-29 12:55:47: Info: mysqlprovision: Multi-Threaded Slave settings are compatible with Group Replication.
2019-01-29 12:55:47: Info: mysqlprovision: 
2019-01-29 12:55:47: Info: mysqlprovision: * Verifying Group Replication plugin for server 'mysql1-dc1:3306' ...
2019-01-29 12:55:47: Info: mysqlprovision: Initializing group_replication plugin on 'mysql1-dc1:3306'
2019-01-29 12:55:47: Info: mysqlprovision: Group Replication group name: 3291f547-23c5-11e9-ad6e-0242ac170004
2019-01-29 12:55:47: Info: mysqlprovision: * Running change master command
2019-01-29 12:55:47: Info: mysqlprovision: Attempting to start the Group Replication group...
2019-01-29 12:56:48: Error: The server is not configured properly to be an active member of the group. Please see more details on error log.
2019-01-29 12:56:48: Error: mysqlprovision: Error starting cluster: 'mysql1-dc1:3306' - Query failed. MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log.. Query: START group_replication: MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log.
2019-01-29 12:56:48: Error: DBA: mysqlprovision exited with error code (1) : {'msg': '', 'type': 'INFO'}{'msg': "Running start command on 'mysql1-dc1:3306'.", 'type': 'STEP'}{'msg': 'Checking Group Replication prerequisites.', 'type': 'STEP'}{'msg': '* Comparing options compatibility with Group Replication... PASS', 'type': 'INFO'}{'msg': 'Server configuration is compliant with the requirements.', 'type': 'INFO'}{'msg': '* Checking server version... PASS', 'type': 'INFO'}{'msg': 'Server is 8.0.14', 'type': 'INFO'}{'msg': '', 'type': 'INFO'}{'msg': '* Checking that server_id is unique... PASS', 'type': 'INFO'}{'msg': 'The server_id is valid.', 'type': 'INFO'}{'msg': '', 'type': 'INFO'}{'msg': '* Checking compatibility of Multi-Threaded Slave settings... PASS', 'type': 'INFO'}{'msg': 'Multi-Threaded Slave settings are compatible with Group Replication.', 'type': 'INFO'}{'msg': '', 'type': 'INFO'}{'msg': "* Verifying Group Replication plugin for server 'mysql1-dc1:3306' ...", 'type': 'INFO'}{'msg': "Initializing group_replication plugin on 'mysql1-dc1:3306'", 'type': 'INFO'}{'msg': 'Group Replication group name: 3291f547-23c5-11e9-ad6e-0242ac170004', 'type': 'STEP'}{'msg': '* Running change master command', 'type': 'INFO'}{'msg': 'Attempting to start the Group Replication group...', 'type': 'STEP'}{'msg': "Error starting cluster: 'mysql1-dc1:3306' - Query failed. MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log.. Query: START group_replication: MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log.", 'type': 'ERROR'} 
2019-01-29 12:56:48: Error: ERROR: Error starting cluster: 'mysql1-dc1:3306' - Query failed. MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log.. Query: START group_replication: MySQL Error (3092): ClassicSession.query: The server is not configured properly to be an active member of the group. Please see more details on error log.

How to repeat:
docker-compose.yml

version: '3'
services:
  mysql1-dc1:
    env_file:
      - mysql-server.env
    image: mysql/mysql-server:8.0.13
    container_name: mysql1-dc1
    hostname: mysql1-dc1
    command: ["mysqld","--server_id=1","--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON"]

  mysql2-dc1:
    env_file:
      - mysql-server.env
    image: mysql/mysql-server:8.0.13
    container_name: mysql2-dc1
    hostname: mysql2-dc1
    command: ["mysqld","--server_id=2","--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON"] 

  mysql3-dc1:
    env_file:
      - mysql-server.env
    image: mysql/mysql-server:8.0.13
    container_name: mysql3-dc1
    hostname: mysql3-dc1
    command: ["mysqld","--server_id=3","--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON"]

  mysql-shell-dc1:
    image: mysql/mysql-server:8.0
    container_name: mysql-shell-dc1
    command: ["mysqlsh","-f","/root/setupCluster-dc1.js"] 
    volumes:
        - ./scripts/:/root
    depends_on:
      - mysql1-dc1
      - mysql2-dc1
      - mysql3-dc1
[29 Jan 14:19] Bin Hong
scripts/setupCluster-dc1.js

var dbPass = "root"
var clusterName = "group1"

try {
  shell.connect('root@mysql1-dc1:3306', dbPass)
  var cluster = dba.createCluster(clusterName);
  cluster.addInstance({user: "root", host: "mysql2-dc1", password: dbPass})
  cluster.addInstance({user: "root", host: "mysql3-dc1", password: dbPass})
  print('\nInnoDB cluster deployed successfully.\n');
} catch(e) {
  print('\nThe InnoDB cluster could not be created.\n\nError: ' + e.message + '\n');
}
[29 Jan 14:20] Bin Hong
mysql-server.env

MYSQL_ROOT_PASSWORD=root
MYSQL_ROOT_HOST=%
[29 Jan 14:22] Bin Hong
mysql 8.0.13 docker image is OK
[30 Jan 8:55] Bin Hong
May be the same problem  https://bugs.mysql.com/bug.php?id=94004
[5 Feb 2:03] Bogdan Kecman
Hi,
Yes this looks like duplicate of bug #94004

please try 8.0.15

kind regards
Bogdan