Forum Discussion

TheodorosPortwo's avatar
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.



  • 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?




  • Hi,

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



  • 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 ( / 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 ( OR localhost) with your live server ip (the ip you are using in mysql_connect function).

    Restart service by command : service httpd restart