port 3306 not available on virtual ip address

252 views
Skip to first unread message

D C

unread,
Mar 25, 2011, 12:43:12 PM3/25/11
to MySQL Multi Master Manager Development
I have a working Active/Passive Master-Master MySQL 5.1.56 setup
running. I am using mysql-mmm 2.2.1 from the EPEL repository on a
CentOS 5.5 machine. The monitoring node is a third machine that is not
the same as either db server.

mmm_control_show from the monitor node displays:
# mmm_control show
db01(192.168.168.11) master/ONLINE. Roles: reader(192.168.168.202),
writer(192.168.168.200)
db02(192.168.168.12) master/ONLINE. Roles: reader(192.168.168.201)

When we try to make a mysql connection to the writer role ip address,
it says
ERROR 2003 (HY000): Can't connect to MySQL server

but when we try the same connection string to the actual ip address of
that server, it works, and we can connect.

When I do an nmap scan on the original ip address, I see the mysql
port is opened:
# nmap -sT 192.168.168.11
Interesting ports on db01 (192.168.168.11):
PORT STATE SERVICE
111/tcp open rpcbind
941/tcp open unknown
3306/tcp open mysql
MAC Address: 00:50:56:BA:00:1A (VMWare)

But when I do the same scan against the virtual ip address, the mysql
port is not opened:
# nmap -sT 192.168.168.200
Interesting ports on dbwriter_clstr01_01 (192.168.168.200):
Not shown: 1678 closed ports
PORT STATE SERVICE
111/tcp open rpcbind
941/tcp open unknown
MAC Address: 00:50:56:BA:00:1A (VMWare)

The MAC addresses are the same, so it is hitting the correct system
(scanning the second reader virtual ip does show a different MAC
address). I get the same output (no mysql port) when I try to scan
either of the reader nodes as well.

Am I missing something in my config for either the montor or the
agents?

Doug

petya

unread,
Mar 25, 2011, 1:24:29 PM3/25/11
to mmm-...@googlegroups.com
Hi,

Check bind address in my.cnf or verify it with netstat -teapn | grep mysql.

Peter Boros

martín arrieta

unread,
Mar 25, 2011, 1:08:13 PM3/25/11
to mmm-...@googlegroups.com
Did you bind the mysql server to your private ip or to 0.0.0.0?

I just report this error in the installation guide.


Do not bind of any specific IP, use 0.0.0.0 instead:

bind-address = 0.0.0.0


Martin.

> --
> You received this message because you are subscribed to the Google Groups "MySQL Multi Master Manager Development" group.
> To post to this group, send email to mmm-...@googlegroups.com.
> To unsubscribe from this group, send email to mmm-devel+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mmm-devel?hl=en.
>
>

D C

unread,
Mar 25, 2011, 4:59:23 PM3/25/11
to MySQL Multi Master Manager Development
Martin and Peter,

Thank you very much for that information. I changed the bind_address
in the my.cnf file to 0.0.0.0 as Martin said, and restarted all the
services (mysqld, mysql-mmm-agent, mysql-mmm-monitor) on the necessary
systems, and I am now able to connect to mysql using the virtual ip
addresses.

Thanks again.
Doug


On Mar 25, 11:08 am, martín arrieta <necr...@gmail.com> wrote:
> Did you bind the mysql server to your private ip or to 0.0.0.0?
>
> I just report this error in the installation guide.
>
> Do not bind of any specific IP, use 0.0.0.0 instead:
>
> bind-address = 0.0.0.0
>
> Martin.
>
Reply all
Reply to author
Forward
0 new messages