Multiple requests from Haproxy

49 Views Asked by At

I'm running 3 node Galera cluster using mariadb-galera:10.9.3 and haproxy. The problem is that haproxy is spamming with requests, 192.168.1.4 is the address of the haproxy. How to remove root requests and what is it related to? If we turn off the option mysql-check user haproxy_test, the requests disappear The root user does not exist

Galera cluster log

    2023-11-20 12:43:43 3475 [Warning] Access denied for user 'root'@'192.168.1.4' (using password: YES)
    2023-11-20 12:43:45 3476 [Warning] Access denied for user 'root'@'127.0.0.1' (using password: YES)
    2023-11-20 12:43:45 3477 [Warning] Access denied for user 'root'@'127.0.0.1' (using password: YES)
    2023-11-20 12:43:48 3478 [Warning] Access denied for user 'root'@'192.168.1.4' (using password: YES)
    2023-11-20 12:43:52 3480 [Warning] Access denied for user 'root'@'192.168.1.4' (using password: YES)
    2023-11-20 12:43:53 3481 [Warning] Access denied for user 'root'@'192.168.1.4' (using password: YES)
    2023-11-20 12:43:57 3482 [Warning] Access denied for user 'root'@'192.168.1.4' (using password: YES)
    2023-11-20 12:44:00 3483 [Warning] Access denied for user 'root'@'192.168.1.4' (using password: YES)

config haproxy

listen maria-db-galera
    bind :3306
    mode tcp
    balance roundrobin
    fullconn    30000
    option tcplog
    option mysql-check user haproxy_test
    option clitcpka
    default-server inter 10s fall 3 rise 3
    server node1 192.168.1.5:3306 check
    server node2 192.168.1.6:3306 check
    server node3 192.168.1.7:3306 check

db-init.env

MARIADB_ROOT_USER=admin
MARIADB_ROOT_PASSWORD=password
MARIADB_USER=user
MARIADB_PASSWORD=qwerty
MARIADB_DATABASE=test
MARIADB_REPLICATION_USER=wsrep
MARIADB_REPLICATION_PASSWORD=test
ALLOW_EMPTY_PASSWORD=yes
MARIADB_GALERA_MARIABACKUP_USER=mariabackup
MARIADB_GALERA_MARIABACKUP_PASSWORD=
MARIADB_GALERA_CLUSTER_NAME=grafana
#MARIADB_GALERA_NODE_ADDRESS=
MARIADB_GALERA_CLUSTER_ADDRESS="gcomm://192.168.1.5,192.168.1.6,192.168.1.7"
MARIADB_GALERA_CLUSTER_BOOTSTRAP=yes
MARIADB_GALERA_FORCE_SAFETOBOOTSTRAP=yes

Changed users, granted rights Disabled mysql-check user option

0

There are 0 best solutions below