Bug #110821 | MySQL Operator: Expose Router Service as LoadBalancer doesnt work | ||
---|---|---|---|
Submitted: | 26 Apr 15:39 | Modified: | 18 Jun 1:32 |
Reporter: | Christopher Feldhues | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Operator | Severity: | S3 (Non-critical) |
Version: | 8.0.32 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 Apr 15:39]
Christopher Feldhues
[17 May 23:12]
MySQL Verification Team
Hi, Thank you for your interest in MySQL. I am not 100% sure this is a bug but I'm too having same issues so I'll see if we can either fix the problem or get the documentation to better explain how to solve this.
[17 May 23:41]
Johannes Schlüter
Posted by developer: The error indicates that something is connecting to the port, which doesn't use the MySQL protocol. In consequence MySQL blocks the connection. Could it be that your load balancer has some form of keep-alive check enabled? As reference: This works for me: apiVersion: v1 kind: Service metadata: name: mynodeport namespace: demo spec: ports: - name: mysql nodePort: 30134 port: 3306 protocol: TCP targetPort: 6446 - name: mysql-ro nodePort: 32493 port: 6447 protocol: TCP targetPort: 6447 selector: component: mysqlrouter mysql.oracle.com/cluster: mywithmetric tier: mysql type: LoadBalancer
[19 Jun 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[1 Jul 12:18]
Rui Mao
This seems like an old known issue Bug #90809, and I got it too. It seenms the solution was just documented and no codes changed. But I cannot agree with it. There are at least two situations could cause critical problems. 1. the application may not connect to LB for a long time, and the max error count reached, which will cause the application got into trouble. 2. Some types of LB has two private IPs as the source of connections, and both are actively checking healthy. In general one IP is primary and the other is backup, and all traffics are passed by primary IP. The backup IP will be never used if LB doesn't failover to it. So the backup IP will be eventually blocked by mysql router no matter what the max_connect_errors is. As you can imagine, if the LB got any problem and failover to backup IP, the application cannot reach database and a disaster happened. My suggestion would be a white list of LB IPs. The actions like healthy check from these IPs will be ignored and doesn't count into connection error.