proxysql_galera_checker arguments are incorrect.

Hello. I just installed PXC, according to your documentation. It seems that the documention is out of date, in regards to the correct arguments for proxysql_galera_checker.sh, as the arguments changed between version 1.2.1 and 1.2.2 of the script (see: https://github.com/sysown/proxysql/issues/695).

My PXC is a 3-node cluster, where all 3 nodes can read & write. It has a single hostgroup, with an id of zero.

Would you please tell me what arguments I should be passing to the script, for my cluster? Thanks!

I dove into the script and figure out what it needed.

The latest documentation I can find (Percona-XtraDB-Cluster-5.7.18-29.20.pdf), in 29.3.4 of “Manual Configuration” of ProxySQL, says to add this entry to the scheduler:

INSERT INTO scheduler(id,interval_ms,filename,arg1,arg2,arg3,arg4) VALUES(1,‘10000’,’/usr/bin/proxysql_galera_checker’,‘127.0.0.1’,‘6032’,‘0’,’/var/lib/proxysql/proxysql_galera_checker.log’);

That used to be correct, but the script has left the documentation behind, and now requires different arguments, specifically:

Usage: $0 <hostgroup_id write> [hostgroup_id read] [number writers] [writers are readers 0|1] [log_file]

  • HOSTGROUP WRITERS (required) (0…) The hostgroup_id that contains nodes that will server ‘writes’
  • HOSTGROUP READERS (optional) (0…) The hostgroup_id that contains nodes that will server ‘reads’
  • NUMBER WRITERS (optional) (0…) Maximum number of write hostgroup_id node that can be marked ONLINE
    When 0 (default), all nodes can be marked ONLINE
  • WRITERS ARE READERS (optional) (0|1) When 1 (default), ONLINE nodes in write hostgroup_id will prefer not
    to be ONLINE in read hostgroup_id
  • LOG_FILE (optional) file logfile where node state checks & changes are written to (verbose)

So, the documentation should now say to add this entry to the scheduler, for the example setup they walk through in “Manual Configuration”:

INSERT INTO scheduler(id,active,interval_ms,filename,arg1,arg2,arg3,arg4,arg5) VALUES(1,‘1’,‘10000’,’/usr/bin/proxysql_galera_checker’,‘0’,’-1’,‘0’,‘1’,’/var/lib/proxysql/proxysql_galera_checker.log’);

The only other thing I had to do was update /etc/proxysql-admin.cnf with the password for ‘admin’, that I’d set in ProxySQL.

It’s working like a charm now. SOLVED. :slight_smile:

Hi,

I configured the scheduler, but it “hangs” somehow when I add the arguments…

root 20063 1.7 0.0 19300 4168 ? S 06:43 0:00 /bin/bash /usr/bin/proxysql_galera_checker 10 20 1 1 /var/lib/proxysql/proxysql_galera_check.log
root 22752 2.2 0.0 19300 4120 ? S 06:43 0:00 /bin/bash /usr/bin/proxysql_galera_checker 10 20 1 1 /var/lib/proxysql/proxysql_galera_check.log
root 24252 3.0 0.0 19300 4136 ? S 06:42 0:00 /bin/bash /usr/bin/proxysql_galera_checker 10 20 1 1 /var/lib/proxysql/proxysql_galera_check.log
root 27956 1.8 0.0 19300 4256 ? S 06:43 0:00 /bin/bash /usr/bin/proxysql_galera_checker 10 20 1 1 /var/lib/proxysql/proxysql_galera_check.log
root 30364 2.7 0.0 19300 4220 ? S 06:43 0:00 /bin/bash /usr/bin/proxysql_galera_checker 10 20 1 1 /var/lib/proxysql/proxysql_galera_check.log
root 30414 2.2 0.0 19300 4180 ? S 06:43 0:00 /bin/bash /usr/bin/proxysql_galera_checker 10 20 1 1 /var/lib/proxysql/proxysql_galera_check.log

when I manually run it, its working… whats wrong?

ProxySQLAdmin> select * from scheduler;
±—±-------±------------±---------------------------------±-----±-----±-----±-----±--------------------------------------------±--------+
| id | active | interval_ms | filename | arg1 | arg2 | arg3 | arg4 | arg5 | comment |
±—±-------±------------±---------------------------------±-----±-----±-----±-----±--------------------------------------------±--------+
| 1 | 1 | 2000 | /usr/bin/proxysql_galera_checker | 10 | 20 | 1 | 1 | /var/lib/proxysql/proxysql_galera_check.log | |
±—±-------±------------±---------------------------------±-----±-----±-----±-----±--------------------------------------------±--------+

I can’t figure out whats wrong… most current proxysql_galera_checker from github.

thanks!

Nicolas