Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register


1
(click on this box to dismiss)

Strange behavior in HA mode

Hi!

I setup a ha cluster with master+slave following this tutorial: http://www.cubrid.org/manual/843/en/CUBRID%20HA.

I called my nodes : cubrid and cubrid2.

All nodes have this in cubrid.conf:

[@demodb]
ha_mode=on
force_remove_log_archives=no
log_max_archives=100

cubrid_ha.conf:

[common]
ha_copy_sync_mode=sync:sync
ha_port_id=59901
ha_node_list=demodb@cubrid:cubrid2
ha_db_list=demodb
ha_apply_max_mem_size=500


cubrid@cubrid:~$ cubrid heartbeat status
@ cubrid heartbeat list
 HA-Node Info (current cubrid, state master)
   Node cubrid2 (priority 2, state slave)
   Node cubrid (priority 1, state master)
 HA-Process Info (master 882, state master)
   Applylogdb demodb@localhost:/var/opt/cubrid/databases/demodb_cubrid2 (pid 3342, state registered)
   Copylogdb demodb@cubrid2:/var/opt/cubrid/databases/demodb_cubrid2 (pid 3340, state registered)
   Server demodb (pid 3123, state registered_and_active)


cubrid@cubrid2:~$ cubrid heartbeat status
@ cubrid heartbeat list

 HA-Node Info (current cubrid2, state slave)
   Node cubrid2 (priority 2, state slave)
   Node cubrid (priority 1, state master)
 HA-Process Info (master 2478, state slave)
   Applylogdb demodb@localhost:/var/opt/cubrid/databases/demodb_cubrid (pid 2704, state registered)
   Copylogdb demodb@cubrid:/var/opt/cubrid/databases/demodb_cubrid (pid 2702, state registered)
   Server demodb (pid 2485, state registered)

When I do some benchmark on the node "cubrid2", I can see node "cubrid" sending the data to cubrid2 then cubrid2 to my client. Using "top" command I can see node "cubrid" becomes busy with many INSERT, where as node "cubrid2" idle.

When I shutdown the node "cubrid", "cubrid2" becomes the new master but I can't send any query to cubrid2, it times out (trying to fetch data from node "cubrid"). When node "cubrid" is back, cubrid2 answer (I have to reload the heartbeat).

I'm using CUBRID version 8.4.3 from Ubuntu (12.04) repository

Thanks!

링크 댓글 쓰기 (1)
질문시간 작년
ghartz
6
I'm on it. I will reply you back soon. - [레벨:3]Esen Sagynov 작년
62 답변들
0

After you shutdown your "cubrid" node, run the following command on "cubrid2" and please add the output to your question above. Then in the comment of this answer, let me know that you've done.

cubrid changemode demodb@localhost

I assume that when you turn off "cubrid", "cubrid2" correctly becomes master but it enters "to-be-active" mode which is the mode right before "active" mode. In this "to-be-active" mode, the demodb database on that "cubrid2" node is not available yet.

So, let me know the output of the above command.

링크 댓글 쓰기 (0)
답변시간 작년
admin
86
0
When I shutdown cubrid's node, on "cubrid2" I did several "cubrid heartbeat status"

 HA-Node Info (current cubrid2, state slave)
   Node cubrid2 (priority 2, state slave)
   Node cubrid (priority 1, state unknown)

HA-Node Info (current cubrid2, state to-be-master)
   Node cubrid2 (priority 2, state slave)
   Node cubrid (priority 1, state unknown)

HA-Node Info (current cubrid2, state to-be-master)
   Node cubrid2 (priority 2, state slave)
   Node cubrid (priority 1, state unknown)

HA-Node Info (current cubrid2, state master)
   Node cubrid2 (priority 2, state master)
   Node cubrid (priority 1, state unknown)


Then I run the "changemode" :
shell: cubrid changemode demodb@localhost
The server `demodb@localhost''s current HA running mode is active.

cubrid heartbeat status
@ cubrid heartbeat list

 HA-Node Info (current cubrid2, state master)
   Node cubrid2 (priority 2, state master)
   Node cubrid (priority 1, state unknown)


When I try to do a "select" from demodb on "cubrid2", it times out.
링크 댓글 쓰기 (2)
답변시간 작년
ghartz
6
0

The cause of this issue is happened to be the hostname cubrid. Changing this hostname to some other identifier solves this issue.

We will investigate, though, the reason of this restriction.

For now, please use another hostname for your hosts.

링크 댓글 쓰기 (0)
답변시간 작년
admin
86
tagged




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: