ProxySQL_Cluster_Monitor

399 views
Skip to first unread message

Erik Mathis

unread,
Sep 12, 2017, 3:18:35 PM9/12/17
to proxysql
I'm setting up admin-cluster following https://github.com/sysown/proxysql/wiki/ProxySQL-Cluster and I'm stuck on getting monitoring working
I'm seeing this error in the logs.

ProxySQL_Cluster.cpp:172:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql-2.internal:6032 . Error: ProxySQL Error: Access denied for user 'cluster_monitor'@'' (using password: YES)
ProxySQL_Cluster.cpp:172:ProxySQL_Cluster_Monitor_thread(): [WARNING] Cluster: unable to connect to peer proxysql-3.internal:6032 . Error: ProxySQL Error: Access denied for user 'cluster_monitor'@'' (using password: YES)

I added the user the sqlite DB on each host using...
#Set cluster monitor user/pass
UPDATE global_variables SET variable_value='cluster_monitor' WHERE variable_name='admin-cluster_username';
UPDATE global_variables SET variable_value='...password...' WHERE variable_name='admin-cluster_password';
LOAD ADMIN VARIABLES TO RUNTIME;
SAVE ADMIN VARIABLES TO DISK;

Is the user/pass expected to be a mysql user/pass?

-Erik-

René Cannaò

unread,
Sep 12, 2017, 3:22:58 PM9/12/17
to Erik Mathis, proxysql
Erik,

from https://github.com/sysown/proxysql/wiki/ProxySQL-Cluster:
admin-cluster_username and admin-cluster_password: to monitor other proxysql instances this credential is used. Note that the pair username/password should also be present in admin-admin_credentials, or connection will fail.

Also refer to https://github.com/sysown/proxysql/wiki/Global-variables#admin-admin_credentials

--
You received this message because you are subscribed to the Google Groups "proxysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Erik Mathis

unread,
Sep 12, 2017, 3:37:31 PM9/12/17
to proxysql
Thanks René!

I dont know how I forgot to do that, but its working now.

I hope thats one of the things that changes with clustering, it just feels weird that I cant have separate users.

Thanks again!

-Erik-
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+u...@googlegroups.com.

René Cannaò

unread,
Sep 12, 2017, 3:39:29 PM9/12/17
to Erik Mathis, proxysql
Hi Eirk,

I am not sure I follow your last comment.
You can have a multitude of users for Admin.

To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.

Erik Mathis

unread,
Sep 12, 2017, 3:53:58 PM9/12/17
to proxysql
How you have more then one proxysql admin?

admin-admin_credentials "This is a colon separated user:password pair,.."


Even still it seem weird that you have to account for the same user/pass twice in separate vars.

-Erik-

René Cannaò

unread,
Sep 12, 2017, 4:04:41 PM9/12/17
to Erik Mathis, proxysql
No, it is not weird :)

In admin-admin_credentials you define the users that can connect to the local Admin.
In admin-cluster_username/password you defines that credential to connect to a remote Admin.

For example, you can have a core node accepting connections from "cluster_monitor", but a satellite node not allowing any connection.
For reference on core/satellite node, refer to http://www.proxysql.com/blog/proxysql-cluster-part2

To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.

Hornet

unread,
Sep 12, 2017, 4:08:58 PM9/12/17
to René Cannaò, proxysql
In admin-admin_credentials you define the users that can connect to the local Admin.
How would you add more then one admin tho? The directions say just a user:pass pair. maybe user1:pass1,user2:pass2... ?

-Erik-

René Cannaò

unread,
Sep 12, 2017, 4:25:06 PM9/12/17
to Hornet, proxysql
Semicolons, not commas:

user1:pass1;user2:pass2;user3:pass3



--
Sent from my mobile device.
Email: rene....@gmail.com
Time zone: GMT+2

Erik Mathis

unread,
Sep 13, 2017, 11:05:39 AM9/13/17
to proxysql
Thanks so much for that hint. I created PR with updated documentation.

-Erik-

René Cannaò

unread,
Sep 13, 2017, 11:10:06 AM9/13/17
to Erik Mathis, proxysql
Thank you!

To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages