Forum Discussion

TheodorosPortwo's avatar
TheodorosPortwo
Icon for Nimbostratus rankNimbostratus
Sep 30, 2020

MySQL Virtual Server Sends RST packets

Hello All,

I am experiencing the following issue. I have a MYSQL Virtual Server listening on 3306 default port and my nodes on the corresponding pool are listening on 6033. The thing is that from within the BIG-IP i can access the Virtual Server on the 3306 through mysql cli but from a host that resides on the same subnet as the Virtual Server i receive the following error:

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 104

 

6 Replies

  • Hi Theodoros,

     

    What is the gateway of your backend pool member ? If it's not your F5 BIG-IP you need to enable SNAT (automap) on your Virtual Server to avoid asymmetric routing issue.

     

    Regards

  • Hello Lidev,

     

    It resides on the F5 BIG-IP. There is a SELF-IP on the specific subnet that both the Gateway and Pool IP are assigned to. SNAT is enabled on the Virtual Server as well as the Port Translation and Address translation but nothing changed.Any other thought/suggestion?

     

    Regards,

    Theo

  • Hi,

    Do you set source adress filtering on your Virtual Server or enable packet filter ?

     

    Regards

  • it's weird, can you share you virtual server configuration ? Pool member monitoring is UP ?

  • Usually it indicates network connectivity trouble and you should check the condition of your network if this error occurs frequently. It might be because the MySQL server is bound to the loop-back IP (127.0.0.1 / localhost) which effectively cuts you off from connecting from "outside". If this is the case, you need to upload the script to the webserver (which is probably also running the MySQL server) and keep your server host as 'localhost' Another common cause of connect timeouts is the reverse-DNS lookup that is necessary when authenticating clients. It is recommended to run MySQL with the config variable in my.cnf:

    Open mysql configuration file named my.cnf and try to find "bind-address", here replace the setting (127.0.0.1 OR localhost) with your live server ip (the ip you are using in mysql_connect function).

    Restart service by command : service httpd restart

    GRANT ALL PRIVILEGES ON yourDB.* TO 'username'@'YOUR_APPLICATION_IP' IDENTIFIED BY 'YPUR_PASSWORD' WITH GRANT OPTION;