Deploy ProxySQL with Import Fails
I have successfully deployed a MariaDB Galera cluster with 3 nodes. I am now having trouble deploying my load balancers. The first ProxySQL balancer deploys perfectly. I then add the second balancer using the Import Configuration option.
The install progresses well, then just stops @ starting sudo command: sleep 3; cat /var/lib/proxysql/proxysql_galera_checker.sh | socat - TCP4:AUMEL-CC01.ausip.local:9999
I've left it overnight and it just stays at this stage. I reboot the ClusterControl to cancel the job & ProxySQL is installed and operational. I try and re-sync the config and this hangs also.
Below is the full installation script for the second ProxySQL node.
[18:48:04]:<em style='color: #2ecc71;'>10.200.210.141</em>: starting sudo command: sleep 3; cat /var/lib/proxysql/proxysql_galera_checker.sh | socat - TCP4:AUMEL-CC01.ausip.local:9999
[18:48:04]:<em style='color: #f3990b;'>AUMEL-CC01.ausip.local</em>: starting sudo command: nc -dl 9999 > /home/ausip/backups/BACKUP-1/var/lib/proxysql/proxysql_galera_checker.sh
[18:48:04]:Copying file '10.200.210.141:/var/lib/proxysql/proxysql_galera_checker.sh' to 'AUMEL-CC01.ausip.local:/home/ausip/backups/BACKUP-1/var/lib/proxysql/proxysql_galera_checker.sh' by using netcat.
[18:48:03]:Start collecting scheduled scripts
[18:47:50]:<em style='color: #f3990b;'>AUMEL-CC01.ausip.local</em>: Selecting working netcat command for this host
[18:47:37]:<em style='color: #2ecc71;'>10.200.210.141</em>: Selecting working netcat command for this host
[18:47:37]:Done dumping scheduler
[18:47:37]:scheduler backup (1/1) = 100% done.
[18:47:36]:Start dumping scheduler
[18:47:36]:Done dumping mysql users
[18:47:36]:mysql user privileges backup (2/2) = 100% done.
[18:47:35]:Backing up proxysql registered mysql users with their privileges.
[18:47:34]:Backing up proxysql monitor user first.
[18:47:34]:Open backup file for mysql users and privileges.
[18:47:34]:Done backing up proxysql configuration file 10.200.210.141:6032:<em style='color: #007e18;'>/home/ausip/backups/BACKUP-1/proxysql-admin.cnf</em>.
[18:47:34]:Backing up config file '<em style='color: #2ecc71;'>10.200.210.141</em>:6032:/etc/proxysql-admin.cnf'
[18:47:34]:Done backing up proxysql configuration file 10.200.210.141:6032:<em style='color: #007e18;'>/home/ausip/backups/BACKUP-1/proxysql.cnf</em>.
[18:47:34]:Backing up config file '<em style='color: #2ecc71;'>10.200.210.141</em>:6032:/etc/proxysql.cnf'
[18:47:34]:Done dumping mysql_users
[18:47:34]:mysql_users backup (2/2) = 100% done.
[18:47:33]:Start dumping mysql_users
[18:47:32]:Done dumping mysql_servers
[18:47:32]:mysql_servers backup (6/6) = 100% done.
[18:47:32]:Start dumping mysql_servers
[18:47:31]:Done dumping mysql_query_rules
[18:47:31]:mysql_query_rules backup (3/3) = 100% done.
[18:47:30]:Start dumping mysql_query_rules
[18:47:30]:Done dumping mysql_replication_hostgroups
[18:47:29]:Start dumping mysql_replication_hostgroups
[18:47:29]:Done dumping global_variables
[18:47:29]:global_variables backup (124/124) = 100% done.
[18:47:28]:global_variables backup (100/124) = 80% done.
[18:47:27]:global_variables backup (50/124) = 40% done.
[18:47:26]:Start dumping global_variables
[18:47:26]:<em style='color: #f3990b;'>AUMEL-CC01.ausip.local</em>: Detected OS: debian
[18:47:26]:<em style='color: #f3990b;'>AUMEL-CC01.ausip.local</em>: Detecting the OS.
[18:47:26]:<em style='color: #f3990b;'>AUMEL-CC01.ausip.local</em>: checking this backup destination node.
[18:47:26]:<em style='color: #2ecc71;'>10.200.210.141</em>: Detected OS: debian
[18:47:26]:<em style='color: #2ecc71;'>10.200.210.141</em>: Detecting the OS.
[18:47:26]:<em style='color: #2ecc71;'>10.200.210.141</em>: checking this backup data source node.
[18:47:26]:Starting backup procedure of proxysql.
[18:47:26]:<em style='color: #f3990b;'>AUMEL-CC01.ausip.local</em>: Creating backup dir '<em style='color: #0b33b5;'>/home/ausip/backups/BACKUP-1</em>'.
[18:47:26]:Created backup record, id is 1.
[18:47:26]:Using default backup root dir: /home/ausip/backups
[18:47:26]:Backup will be saved on host AUMEL-CC01.ausip.local.
[18:47:26]:Starting backup of the source proxysql node.
[18:47:26]:Synchronization of proxysql nodes by doing a backup of '10.200.210.141' to 'AUMEL-CC01.ausip.local' and a restore from 'AUMEL-CC01.ausip.local' to '10.200.210.142'.
[18:47:26]:Synchronizing 10.200.210.141 to the new proxysql node just installed (10.200.210.142).
[18:47:24]:Cluster type is Galera.
[18:47:23]:<em style='color: #75599b;'>10.200.210.41</em>: Creating 'proxydemo'@'10.200.210.142'.
[18:47:23]:<em style='color: #75599b;'>10.200.210.41</em>: Creating 'proxydemo'@'127.0.0.1'.
[18:47:23]:<em style='color: #75599b;'>10.200.210.41</em>: Creating 'proxydemo'@'localhost'.
[18:47:23]:<em style='color: #1abc9c;'>10.200.210.142</em>:6032: Creating 'demo' user on Cluster Nodes to allow ProxySql to connect.
[18:47:23]:<em style='color: #1abc9c;'>10.200.210.142</em>: Setting up basic query rules.
[18:47:11]:<em style='color: #75599b;'>10.200.210.41</em>: Creating user 'proxysql-monitor'@'10.200.210.142'.
[18:47:11]:<em style='color: #1abc9c;'>10.200.210.142</em>: Succesfully set monitor user and password.
[18:47:11]:<em style='color: #1abc9c;'>10.200.210.142</em>:6032: Creating a monitor user on data nodes.
[18:47:11]:<em style='color: #1abc9c;'>10.200.210.142</em>:6032: Creating monitor user.
[18:47:10]:<em style='color: #1abc9c;'>10.200.210.142</em>:6032: Waiting for ProxySql to initialize.
[18:47:07]:<em style='color: #1abc9c;'>10.200.210.142</em>: proxysql service status: * proxysql.service
Loaded: loaded (/lib/systemd/system/proxysql.service; enabled; vendor preset: enabled)
Active: active (exited) since Mon 2018-02-19 18:47:04 AEDT; 3s ago
Feb 19 18:47:04 AVMEL-DBLB02 systemd[1]: Starting proxysql.service...
Feb 19 18:47:04 AVMEL-DBLB02 su[30125]: Successful su for proxysql by root
Feb 19 18:47:04 AVMEL-DBLB02 su[30125]: + ??? root:proxysql
Feb 19 18:47:04 AVMEL-DBLB02 su[30125]: pam_unix(su:session): session opened for user proxysql by (uid=0)
Feb 19 18:47:04 AVMEL-DBLB02 proxysql[30122]: Starting ProxySQL: DONE!
Feb 19 18:47:04 AVMEL-DBLB02 systemd[1]: Started proxysql.service.
[18:47:04]:<em style='color: #1abc9c;'>10.200.210.142</em>: Trying to start using OS service.
[18:47:03]:<em style='color: #1abc9c;'>10.200.210.142</em>: Starting 'proxysql' service.
[18:47:03]:<em style='color: #1abc9c;'>10.200.210.142</em>: Created configuration: <em style='color: #007e18;'>/etc/proxysql.cnf</em>
[18:47:02]:<em style='color: #1abc9c;'>10.200.210.142</em>: Detected CPU cores: 2
[18:47:02]:<em style='color: #1abc9c;'>10.200.210.142</em>: Detecting number of CPU cores/threads.
[18:46:51]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installed proxysql software (version: '1.4.5').
[18:46:35]:<em style='color: #1abc9c;'>10.200.210.142</em>: No mysql client found. Installing.
[18:46:35]:<em style='color: #1abc9c;'>10.200.210.142</em>: Checking if 'mysql' is installed.
[18:45:25]:<em style='color: #1abc9c;'>10.200.210.142</em>: Finished with helper packages.
[18:45:08]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>augeas-tools</strong>.
[18:45:07]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>openssl</strong>.
[18:45:01]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>libatomic1</strong>.
[18:45:00]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>tar</strong>.
[18:45:00]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>iproute2</strong>.
[18:44:59]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>bzip2</strong>.
[18:44:51]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>libmecab2</strong>.
[18:44:50]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>libnuma1</strong>.
[18:44:43]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>pigz</strong>.
[18:44:43]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>curl</strong>.
[18:44:42]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>wget</strong>.
[18:44:21]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>libdbd-mysql-perl</strong>.
[18:44:20]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>libssl1.0.0</strong>.
[18:44:20]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>lsb-release</strong>.
[18:44:07]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>socat</strong>.
[18:44:06]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>netcat-openbsd</strong>.
[18:43:58]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>netcat</strong>.
[18:43:53]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>libaio1</strong>.
[18:43:52]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>rsync</strong>.
[18:43:52]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing <strong style='color: #110679;'>psmisc</strong>.
[18:43:43]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing helper packages.
[18:43:24]:<em style='color: #1abc9c;'>10.200.210.142</em>:6032: Setting up repositories.
[18:43:07]:<em style='color: #1abc9c;'>10.200.210.142</em>: Detected Vendor: <strong style='color: #59a449;'>ubuntu</strong>, Release: <strong style='color: #59a449;'>xenial</strong>, Release Name: <strong style='color: #59a449;'>xenial</strong>
[18:43:06]:<em style='color: #1abc9c;'>10.200.210.142</em>: Installing ProxySql.
[18:43:04]:<em style='color: #1abc9c;'>10.200.210.142</em>: Including <em style='color: #af7ac4;'>10.200.210.43</em>:6603 for loadbalancing.
[18:43:04]:<em style='color: #1abc9c;'>10.200.210.142</em>: Including <em style='color: #34495e;'>10.200.210.42</em>:6603 for loadbalancing.
[18:43:04]:<em style='color: #1abc9c;'>10.200.210.142</em>: Including <em style='color: #75599b;'>10.200.210.41</em>:6603 for loadbalancing.
[18:43:04]:Checking job parameters.
[18:43:04]:Started proxysql.setupproxysql
-
Official comment
Hi,
At that stage ClusterControl streams configuration and some other files from the existing ProxySQL to the newly installed one. Apparently, in your case, this did not work. Can you please verify there's a connectivity between those nodes on port 9999? Can you reproduce this when you run the commands manually?
Thanks,
KrzysztofComment actions -
I found the problem. ClusterControl talks to the ProxySQL nodes using the IP address, but the script uses the hostname for the ProxySQL nodes to talk back to the ClusterController. I edited the hosts file on each of the nodes and made entries for each node. I also added an exception in the firewall for port 9999
Now it works.
Please sign in to leave a comment.
Comments
2 comments