Bouncing Ip's

3 views
Skip to first unread message

John

unread,
Nov 18, 2009, 4:52:28 AM11/18/09
to MySQL Multi Master Manager Development
Hey guys

I have a weird bounding ip problem

its a new setup, and iam using mmm 1.2.6 configured with two master's
setup

# Mysql Reader role
role reader
mode exclusive
servers master1, master2
ip 10.0.20.10

# Mysql Writer role
role writer
mode balanced
servers master1, master2
ip 10.0.20.20, 10.0.20.21


a few seconds after I start the mmm_mon I cant ping the virtual ips

http://nopaste.info/cf1e54acc0.html

Can you please help me?

Thank you very much

Johnathan

Walter Heck

unread,
Nov 18, 2009, 9:13:50 AM11/18/09
to mmm-...@googlegroups.com
Can you paste full configs, an ifconfig and a log from MMM? That makes
it less guessing and more analysing :)

Walter
> --
>
> 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=.
>
>
>

Yonatan Estryk

unread,
Nov 18, 2009, 12:49:20 PM11/18/09
to mmm-...@googlegroups.com
Hi Walter,

Your right :)

Here's mmm-traps.log:

[2009-11-18 18:44:27]: 24162: Daemon: State change(master2): ONLINE -> HARD_OFFLINE
[2009-11-18 18:44:27]: 24162: Check: CHECK_OK('master2', 'mysql')
[2009-11-18 18:44:31]: 24162: Daemon: State change(master2): HARD_OFFLINE -> AWAITING_RECOVERY
[2009-11-18 18:54:23]: 24162: Check: CHECK_FAIL('master2', 'mysql')  Returned message: ERROR: Connect error (host = 192.168.1.2:3306, user = xxxxxxxx, pass = 'xxxxxx')! Can't connect to MySQL server on '192.168.1.2' (4)
[2009-11-18 18:54:27]: 24162: Daemon: State change(master2): AWAITING_RECOVERY -> HARD_OFFLINE
[2009-11-18 18:54:28]: 24162: Check: CHECK_OK('master2', 'mysql')
[2009-11-18 18:54:32]: 24162: Daemon: State change(master2): HARD_OFFLINE -> AWAITING_RECOVERY
[2009-11-18 19:05:36]: 24162: Check: CHECK_FAIL('master2', 'mysql')  Returned message: ERROR: Connect error (host = 192.168.1.2:3306, user = xxxxxx, pass = 'xxxxxx')! Can't connect to MySQL server on '192.168.1.2' (4)
[2009-11-18 19:05:39]: 24162: Daemon: State change(master2): AWAITING_RECOVERY -> HARD_OFFLINE
[2009-11-18 19:05:39]: 24162: Check: CHECK_OK('master2', 'mysql')
[2009-11-18 19:05:43]: 24162: Daemon: State change(master2): HARD_OFFLINE -> AWAITING_RECOVERY
[2009-11-18 19:11:55]: 24162: Check: CHECK_FAIL('master2', 'mysql')  Returned message: ERROR: Connect error (host = 192.168.1.2:3306, user = xxxxxxxx, pass = 'xxxxxx')! Can't connect to MySQL server on '192.168.1.2' (4)
[2009-11-18 19:11:58]: 24162: Daemon: State change(master2): AWAITING_RECOVERY -> HARD_OFFLINE
[2009-11-18 19:11:58]: 24162: Check: CHECK_OK('master2', 'mysql')
[2009-11-18 19:12:03]: 24162: Daemon: State change(master2): HARD_OFFLINE -> AWAITING_RECOVERY


heres mmm-debug.log

tail -n 35 mmm-debug.log  | grep -vi checker
[2009-11-18 19:42:59]: 24162: ProcessOrphanedRoles()
[2009-11-18 19:42:59]: 24162: ProcessOrphanedRoles(): 0
[2009-11-18 19:42:59]: 24162: BalanceRoles()
[2009-11-18 19:42:59]: 24162: BalanceRoles(): 0
[2009-11-18 19:42:59]: 24162: Sending status to 'master2'
[2009-11-18 19:42:59]: 24162: Sending command 'SET_STATUS(master2, 0, AWAITING_RECOVERY, , master1)' to 192.168.1.2:9989
[2009-11-18 19:42:59]: 24162: Daemon: Got uptime from master2: 2526046.73
[2009-11-18 19:42:59]: 24162: $VAR1 = {
          'version' => '0',
          'state_change' => '1258564323',
          'mode' => 'master',
          'uptime' => '2526046.73',
          'last_uptime' => '2522396.64',
          'state' => 'AWAITING_RECOVERY'
        };

[2009-11-18 19:42:59]: 24162: Sending status to 'master1'
[2009-11-18 19:42:59]: 24162: Sending command 'SET_STATUS(master1, 0, ONLINE, reader(10.0.20.10;),writer(10.0.20.21;),writer(10.0.20.20;), master1)' to 192.168.1.1:9989





mmm_mon.conf :

#
# Master-Master Manager config (monitor)
#

# Debug mode
debug no

# Paths
pid_path /usr/local/mmm/var/mmmd.pid
status_path /usr/local/mmm/var/mmmd.status
bin_path /usr/local/mmm/bin

# Logging setup
log mydebug
    file /usr/local/mmm/var/mmm-debug.log
    level debug

log mytraps
    file /usr/local/mmm/var/mmm-traps.log
    level trap


# MMMD command socket tcp-port
bind_port 9988
agent_port 9989
monitor_ip 127.0.0.1

# Cluster interface
cluster_interface eth1

# Cluster hosts addresses and access params
host master1
    ip 192.168.1.1
    port 3306
    user  xxxxxxxxxxxx
    password xxxxxxxxx
    mode master
    peer master1

host master2
    ip 192.168.1.2
    port 3306
    user xxxxxxxxxx
    password xxxxxxxxx
    mode master
    peer master2

#
# Define roles
#

active_master_role writer


# Mysql Reader role
role reader
    mode exclusive
    servers master1, master2
    ip 10.0.20.10

# Mysql Writer role
role writer
    mode balanced
    servers master1, master2
    ip 10.0.20.20, 10.0.20.21

#
# Checks parameters
#

# Ping checker
check ping
    check_period 1
    trap_period 5
    timeout 2

# Mysql checker
check mysql
    check_period 1
    trap_period  2
    timeout 2
    restart_after 1000


# Mysql replication backlog checker
check rep_backlog
    check_period 5
    trap_period 10
    max_backlog 60
    timeout 2
    restart_after 1000


# Mysql replication threads checker
check rep_threads
    check_period 1
    trap_period 5
    timeout 2
    restart_after 1000




mmm_agent.conf :



#
# Master-Master Manager config (agent)
#

# Debug mode
debug no

# Paths
pid_path /usr/local/mmm/var/mmmd_agent.pid
bin_path /usr/local/mmm/bin

# Logging setup
log mydebug
    file /usr/local/mmm/var/mmm-debug.log
    level trap

log mytraps
    file /usr/local/mmm/var/mmm-traps.log
    level trap

# MMMD command socket tcp-port and ip
bind_port 9989

# Cluster interface
cluster_interface eth1

# Define current server id
this master2
mode master

# For masters
peer master2

# Cluster hosts addresses and access params
host master1
    ip 192.168.1.1
    port 3306
    user xxxxxx
    password xxxxx

host master2
    ip 192.168.1.2
    port 3306
    user xxxxxx
    password xxxxxxxx
--
echo "cc6db61 90c6441 8ba0a10 546d981 acad100 546d981 8ba0a10 445210 633d5f1 a6cc591 acad100 a112610 cc6db61 7d01db1 1000000 6b563e1 869e711 546d981 73eb721 81bf100 445210 5b9c0d1 90c6441 869e711" \
| perl -e '$argv=<>;@temp=split/ /,$argv;sub d{$lvl=shift;$sq=shift;$lvl--;if($lvl==0){return $sq;}else{&d($lvl--,sqrt($sq));}}sub char{$num=hex($_);$num=&d(3,$num);$char=chr($num);print"$char";sleep 1;}sub wait_for_a_kid{$pid=wait;return 0 if $pid<0;$host=delete $pid_to_host{$pid};1;}for(@temp){wait_for_a_kid()if keys %pid_to_host>3;if($pid=fork){$pid_to_host{$pid}=$_;}else{exit !char($_);}}1 while wait_for_a_kid();print"\n";'

Walter Heck

unread,
Nov 18, 2009, 9:11:52 PM11/18/09
to mmm-...@googlegroups.com
Ah, there's an error in your mmm_mon.conf:

host master1
peer master1

host master2
peer master2

Each host has the other host as it's peer, not itself. so host master1
should have peer master2. Not sure if that is the problem though.

cheers,

Walter

Piotr Biel

unread,
Nov 19, 2009, 7:41:09 PM11/19/09
to mmm-...@googlegroups.com
On 2009-11-18 10:52, John wrote:

Hello,

> # Mysql Writer role
> role writer
> mode balanced
> servers master1, master2
> ip 10.0.20.20, 10.0.20.21

2 IPs for writer role?;)

Best,

--

Piotr Biel

Walter Heck

unread,
Nov 20, 2009, 12:02:35 AM11/20/09
to mmm-...@googlegroups.com
Ah yes, he has the reader and the writer role mixed up. the
active_master_role should be the exclusive role, not the balanced one.

Walter
Reply all
Reply to author
Forward
0 new messages