Skip to content

Magento 2.4.6 Cannot connect to InnoDB Cluster on Port 6446

We have setup and deployed and InnoDB Cluster Magento

When connecting to the new Database by editing env.php we get a 499 error from the Nginx access log.

Is there something else we should be looking at? Let me know if more info is needed

nginx version: nginx/1.24.0

Below is the error:

123.231.321.132 - - [29/Feb/2024:14:48:39 -0600] "GET /FrontName123/ HTTP/2.0" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" "-" 32.346 0.000 - 32.345 "-"

That is all we get, no logs generate anywhere else all logging levels have been set to Debug

We installed the MySQL router on the APP servers where we are connecting from, hopefully I explained that correctly.

Below is output of the Cluster Status

MySQL  localhost:3302 ssl  JS > cluster.status()
{
    "clusterName": "testCluster_CLName",
    "defaultReplicaSet": {
        "name": "default",
        "primary": "DBServ2:3302",
        "ssl": "REQUIRED",
        "status": "OK",
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
        "topology": {
            "DBServ1:3301": {
                "address": "DBServ1:3301",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.34"
            },
            "DBServ2:3302": {
                "address": "DBServ2:3302",
                "memberRole": "PRIMARY",
                "mode": "R/W",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.34"
            },
            "DBServ3:3303": {
                "address": "DBServ3:3303",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.34"
            }
        },
        "topologyMode": "Single-Primary"
    },
    "groupInformationSourceMember": "DBServ2:3302"
}

The env.php file is below:

[root@server ~]# cat ../app/etc/env.php | head -40
<?php
return [
    'backend' => [
        'frontName' => 'FrontName123'
    ],
    'db' => [
        'connection' => [
            'indexer' => [
                'host' => 'HostName123',
                'dbname' => 'DBNAME123',
                'username' => 'USERNAME123',
                'password' => 'PASWORD!@#',
                'model' => 'mysql4',
                'engine' => 'innodb',
                'initStatements' => 'SET NAMES utf8; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;',
                'active' => '1',
                'persistent' => null
            ],
            'default' => [
                'host' => 'HostName123',
                'dbname' => 'DBNAME123',
                'username' => 'USERNAME123',
                'password' => 'PASWORD!@#',
                'model' => 'mysql4',
                'engine' => 'innodb',
                'initStatements' => 'SET NAMES utf8;',
                'active' => '1',
                'driver_options' => [
                    1014 => false
                ]
            ]
        ],
        'table_prefix' => ''
    ],

We attempted to update the line:

'host' => 'HostName123',

to

'host' => 'TestAPP01:6446',

We are able to connect to MySQL from the Commandline without Issue, can see the database, and run select queries without issue.

[root@server ~]# mysql -hTestAPP01 -uUSERNAME123 -P6446 -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1239181
Server version: 8.0.34-commercial MySQL Enterprise Server - Commercial

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql>