Ask Your Question
0

HA :Not able to connect with VirtualIP

asked 2014-03-26 03:51:10 -0500

admin gravatar image

HA setup with mysql and galera

LB1: 192.168.2.139

Controller1: 192.168.2.151

Controller2: 192.168.2.152

Controller3: 192.168.2.153

VirtualIP: 192.168.2.221

On Controller1 or on Controller2 , when i am starting neutron-server it is stopping automatically. At the end, i am getting error:

TRACE neutron OperationalError: (OperationalError) (2013, "Lost connection to MySQL server at 'reading initial communication packet', system error: 0") None None

On LB, when i am executing, mysql -u root -ppassword -h 192.168.2.151 it is working fine but when i am connecting with virtual Ip i.e.mysql -u root -ppassword -h 192.168.2.221

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

and output of telnet 192.168.2.221 3306 is

Trying 192.168.2.221...
Connected to 192.168.2.221.
Escape character is '^]'.
Connection closed by foreign host.
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-03-26 08:47:15 -0500

SamYaple gravatar image

updated 2014-03-26 08:50:51 -0500

I have seen two causes for this error in your setup.

  1. Please comment out the "bind-address" statment in your my.cnf configs for your mariadb servers and restart them (one at a time, wait for them to rejoin the cluster)

  2. In HAproxy, you need to use a special options to allow haproxy to mark the server as up. A standard tcpchk will not work for an extended period of time for a number of reasons.

    a. Create an "haproxy" user in your database, no password. You can lock down its permissions later.

    b. Add "option mysql-check user haproxy" to your haproxy.cfg under your Maria/Galera section

    c. Restart Haproxy

That should solve your issue. A quick telnet to your virtual ip address should show you that it is working.

edit flag offensive delete link more

Comments

@SamYaple I am still not able to do telnet

i.e. telnet 192.168.2.221 3306
Trying 192.168.2.221...
Connected to 192.168.2.221.
Escape character is '^]'.
Connection closed by foreign host.
admin gravatar imageadmin ( 2014-04-07 00:55:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2014-03-26 03:51:10 -0500

Seen: 945 times

Last updated: Mar 26 '14