Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039659Openbravo ERPA. Platformpublic2018-11-20 18:062018-12-11 20:22
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR19Q1 
alostale
Core
No
0039659: Cluster Service Leader Registrator should be able to recover properly after restarting the database
The Cluster Service Leader Registrator thread is not recovering nicely after restarting the database.
1) Configure Openbravo.properties to enable the ClusterServiceManager: cluster=true
2) Start Openbravo
3) Stop the database (without stopping Tomcat). The following warning will appear in the log after a few seconds:
[Cluster Service Leader Registrator] WARN org.openbravo.cluster.ClusterServiceManager - Node <nodeid> could not complete register/update
5) Restart the database. Note that the error continues
6) Check that the last ping is not being updated: select updated from ad_cluster_service;
      
No tags attached.
Issue History
2018-11-20 18:06caristuNew Issue
2018-11-20 18:06caristuAssigned To => platform
2018-11-20 18:06caristuModules => Core
2018-11-20 18:06caristuTriggers an Emergency Pack => No
2018-11-20 18:06caristuAssigned Toplatform => caristu
2018-11-20 18:07caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17943#r17943
2018-11-20 18:07caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17944#r17944
2018-11-20 18:07caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17945#r17945
2018-11-21 10:33hgbotCheckin
2018-11-21 10:33hgbotNote Added: 0108028
2018-11-21 10:33hgbotStatusnew => resolved
2018-11-21 10:33hgbotResolutionopen => fixed
2018-11-21 10:33hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/65f68c63d325eeac390d2e93c0d2940e26412d30 [^]
2018-11-21 11:28hgbotCheckin
2018-11-21 11:28hgbotNote Added: 0108030
2018-11-21 11:28caristuReview Assigned To => alostale
2018-11-23 13:46alostaleNote Added: 0108084
2018-11-23 13:46alostaleStatusresolved => closed
2018-11-23 13:46alostaleFixed in Version => 3.0PR19Q1
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108488
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108489

Notes
(0108028)
hgbot   
2018-11-21 10:33   
Repository: erp/devel/pi
Changeset: 65f68c63d325eeac390d2e93c0d2940e26412d30
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Nov 21 10:17:42 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/65f68c63d325eeac390d2e93c0d2940e26412d30 [^]

fixes bug 39659: ClusterServiceThread doesn't recover properly after DB restart

  Moved OBDal.getInstance().commitAndClose(); to a finally block in order to ensure that the connection is returned properly to the pool even if there is an error during the registering/update of the cluster service leader.

  Besides, in the finally block we are also forcing the cluster service to go to the database to check which node is the leader. Otherwise, in case of error it will be always checking against the ID of the leader that it keeps in cache.

---
M src/org/openbravo/cluster/ClusterServiceManager.java
---
(0108030)
hgbot   
2018-11-21 11:28   
Repository: erp/devel/pi
Changeset: 3d12a2f7f902a055da7d3511ef68cba643789095
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Nov 21 11:28:19 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/3d12a2f7f902a055da7d3511ef68cba643789095 [^]

related to issue 39659: improve log adding exception trace

---
M src/org/openbravo/cluster/ClusterServiceManager.java
---
(0108084)
alostale   
2018-11-23 13:46   
tested + reviewed
(0108488)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test
(0108489)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test