Bug #87768 Access denied error on createCluster autofix configuration
Submitted: 15 Sep 2017 7:50 Modified: 28 Oct 2017 4:48
Reporter: Luca Ricci Email Updates:
Status: No Feedback Impact on me:
None 
Category:Shell AdminAPI InnoDB Cluster / ReplicaSet Severity:S3 (Non-critical)
Version:Ver 1.0.10 for Linux on x86_64 OS:Ubuntu (Ubuntu 16.04.3 LTS)
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: auth error, configuration

[15 Sep 2017 7:50] Luca Ricci
Description:
The dba.createCluster function offers to fix mysql server (5.7.19) configuration, but it always fire an Access denied error.
The problem show up with accounts with and without password.

How to repeat:
mysql-js> dba.checkInstanceConfiguration('root@node1:3306')
Please provide the password for 'root@node1:3306': 
Validating instance...

The instance 'node1:3306' is not valid for Cluster usage.

The following issues were encountered:

 - Some configuration options need to be fixed.

+----------------------------------+---------------+----------------+--------------------------------------------------+
| Variable                         | Current Value | Required Value | Note                                             |
+----------------------------------+---------------+----------------+--------------------------------------------------+
| binlog_checksum                  | CRC32         | NONE           | Update the server variable or restart the server |
| enforce_gtid_consistency         | OFF           | ON             | Restart the server                               |
| gtid_mode                        | OFF           | ON             | Restart the server                               |
| log_bin                          | 0             | 1              | Restart the server                               |
| log_slave_updates                | 0             | ON             | Restart the server                               |
| master_info_repository           | FILE          | TABLE          | Restart the server                               |
| relay_log_info_repository        | FILE          | TABLE          | Restart the server                               |
| transaction_write_set_extraction | OFF           | XXHASH64       | Restart the server                               |
+----------------------------------+---------------+----------------+--------------------------------------------------+

Please fix these issues, restart the server and try again.

{
    "config_errors": [
        {
            "action": "server_update", 
            "current": "CRC32", 
            "option": "binlog_checksum", 
            "required": "NONE"
        },
        {
            "action": "restart", 
            "current": "OFF", 
            "option": "enforce_gtid_consistency", 
            "required": "ON"
        },
        {
            "action": "restart", 
            "current": "OFF", 
            "option": "gtid_mode", 
            "required": "ON"
        },
        {
            "action": "restart", 
            "current": "0", 
            "option": "log_bin", 
            "required": "1"
        },
        {
            "action": "restart", 
            "current": "0", 
            "option": "log_slave_updates", 
            "required": "ON"
        },
        {
            "action": "restart", 
            "current": "FILE", 
            "option": "master_info_repository", 
            "required": "TABLE"
        },
        {
            "action": "restart", 
            "current": "FILE", 
            "option": "relay_log_info_repository", 
            "required": "TABLE"
        },
        {
            "action": "restart", 
            "current": "OFF", 
            "option": "transaction_write_set_extraction", 
            "required": "XXHASH64"
        }
    ], 
    "errors": [], 
    "restart_required": true, 
    "status": "error"
}
mysql-js> shell.connect('root@node1:3306')
Please provide the password for 'root@node1:3306': 
Creating a Session to 'root@node1:3306'
Your MySQL connection id is 1940
No default schema selected; type \use <schema> to set one.
mysql-js> \sql
Switching to SQL mode... Commands end with ;
mysql-sql> SELECT @@VERSION;
+-----------+
| @@VERSION |
+-----------+
| 5.7.19    |
+-----------+
1 row in set (0.04 sec)
mysql-sql> \js
Switching to JavaScript mode...
mysql-js> var cluster = dba.createCluster('testCluster')
A new InnoDB cluster will be created on instance 'root@node1:3306'.

Warning: The instance configuration needs to be changed in order to
create an InnoDB cluster. To see which changes will be made, please
use the dba.checkInstanceConfiguration() function before confirming
to change the configuration.

Should the configuration be changed accordingly? [y|N]: y

Creating InnoDB cluster 'testCluster' on 'root@node1:3306'...
Dba.createCluster: Access denied for user 'root'@'X.X.X.X' (using password: NO) (MySQL Error 1045)
[21 Sep 2017 0:02] MySQL Verification Team
Hi,

Was this setup on 5.7.19 or was earlier version and then upgraded?

thanks
Bogdan
[21 Sep 2017 8:13] Luca Ricci
Hi, it was installed as 5.7.19, I'm not 100% sure though.
Once I fixed manually the MySQL conf I had some problem creating the cluster because `node1` wasn't in the default whitelist ips, does this may be causing this problem too?
[28 Sep 2017 4:48] MySQL Verification Team
Hi,

Yes, this does not look like a bug but just miss configuration. The error text is not perfect but gives a clue what could be wrong.

After you added the IP everything worked ok right?

all best
Bogdan
[29 Oct 2017 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".