-
1. Re: Backup won't be activated if master crashed rather than graceful shutdown
dengyong Oct 29, 2012 7:31 AM (in response to dengyong)I debug the codes in org.hornetq.core.server.impl.HornetQServerImpl.SharedNothingBackupActivation.EndpointConnector. The failure listener on RemotingConnection won't be invoked in case of socket broken. The failure listener on ClientSessionFactory can be invoked in case of socket broken after reconnect attempts.
//we should only try once, if its not there we should move on. liveServerSessionFactory.setReconnectAttempts(1); quorumManager.setSessionFactory(liveServerSessionFactory); //get the connection and request replication to live CoreRemotingConnection liveConnection = liveServerSessionFactory.getConnection(); quorumManager.addAsFailureListenerOf(liveConnection); -
2. Re: Backup won't be activated if master crashed rather than graceful shutdown
ataylor Oct 30, 2012 6:00 AM (in response to dengyong)why do you think it won't be invoked after the socket is broken and also what do you mean by socket broken, how are you breaking it?
-
3. Re: Backup won't be activated if master crashed rather than graceful shutdown
dengyong Oct 30, 2012 6:09 AM (in response to ataylor)I kill the master HornetQ process. Then the netty connection (socket and the netty connection is used for data replication) between master and backup will be broken. In this case, we are expecting the failure listener will be invoked.
but during my debug, the FailureListener add on CoreRemotingConnection won't be invoked.
But the failure listener added on ClientSessionFactory can be invoked.
-
4. Re: Backup won't be activated if master crashed rather than graceful shutdown
ataylor Oct 30, 2012 6:11 AM (in response to dengyong)if you provide a test some one will take a look
-
5. Re: Backup won't be activated if master crashed rather than graceful shutdown
dengyong Oct 30, 2012 6:11 AM (in response to ataylor)Master crash is the most common case in HA. It will be problem if hornetq can not support such cases. Do you agree?
-
6. Re: Backup won't be activated if master crashed rather than graceful shutdown
ataylor Oct 30, 2012 6:19 AM (in response to dengyong)hornetq does support this case, it would be pretty useless if it didn't, we have lots of tests that test this, Im asking you to provide a runnable test that shows the scenario you have.
-
7. Re: Backup won't be activated if master crashed rather than graceful shutdown
dengyong Oct 30, 2012 10:42 AM (in response to ataylor)Andy Taylor wrote:
hornetq does support this case, it would be pretty useless if it didn't, we have lots of tests that test this, Im asking you to provide a runnable test that shows the scenario you have.
I am using HornetQ 2.3 BETA. My observe is not like what you described.
You can see my steps in my orignal post. I re-paste the steps here. For the configuration, you can get it from the attachment.
HornetQ version: 2.3 BETA
Topology: Two HornetQ has been configured to form HA live backup group. The HA mode is date replication
Steps:
1. start hornetq master A and backup B
2. after backup B finished replication from A, kill process A ( on windows, use task manager. on unix, use kill -9 <pid>)
3. expect backup B will take over A's position and be activated
But I find backup B won't be activated at all. If in step2, we gracefully stop the hornetQ A, it won't have issues.
Let me know if you need more.
-
8. Re: Backup won't be activated if master crashed rather than graceful shutdown
ataylor Oct 30, 2012 11:19 AM (in response to dengyong)Ive just tested this and see the same issue, could you raise a jira nad assign it to me please
-
9. Re: Backup won't be activated if master crashed rather than graceful shutdown
dengyong Oct 31, 2012 12:15 AM (in response to ataylor)1 of 1 people found this helpfulCreate a bug and the bug number is HORNETQ-1073
I have no permission to assign bug to you.