Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039187Retail ModulesStoreServerpublic2018-08-24 14:452018-08-25 00:41
AugustoMauch 
AugustoMauch 
normalcriticalhave not tried
closedfixed 
5
 
 
mtaal
No
0039187: Store server can remain indefinitely in Transition to Offline status
Under certain circumstances the store server can remain in the Transition to Offline status indefinitely. While in this status, the POS Terminals of the store cannot work.

This line is the cause of the problem [1]. The transition to online is cancelled, but the status of the mobile server is not updated (for instance, it is updated in this other flow [2]).

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/3c1bc36f021e/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l628 [^]
[2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/3c1bc36f021e/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l640 [^]
I have not been able to reproduce it, the problem has been deduced based on production logs.

The sequence of events was the following:
- There is a problem with a stock webservice, and the StockConnectionHelper inits a transition to offline (store server status is updated to TOF)
- The offline checks are executed [1]
- They all pass, so a transition to online is invoked [2] (status is still TOF)
- The transition to online process checks if it can init the transition [3]
- It can't init the transition because there is data pending to be synchronized from the central to the store server, so the transition is cancelled [4] but the status is not updated, so it will remain TOF, and the store will not be able to operate

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/3c1bc36f021e/src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java#l98 [^]
[2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/3c1bc36f021e/src/org/openbravo/mobile/core/servercontroller/MobileMainServerCheck.java#l120 [^]
[3] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/3c1bc36f021e/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l628 [^]
[4] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/3c1bc36f021e/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l629 [^]
No tags attached.
related to defect 0039195 closed AugustoMauch Connection leak in MobileServerController.TransitionToOnline 
Issue History
2018-08-24 14:45AugustoMauchNew Issue
2018-08-24 14:45AugustoMauchAssigned To => AugustoMauch
2018-08-24 14:45AugustoMauchTriggers an Emergency Pack => No
2018-08-24 14:48hgbotCheckin
2018-08-24 14:48hgbotNote Added: 0106478
2018-08-24 14:48hgbotStatusnew => resolved
2018-08-24 14:48hgbotResolutionopen => fixed
2018-08-24 14:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cf49abe279718596c23450662a00217afb370224 [^]
2018-08-24 14:48AugustoMauchReview Assigned To => mtaal
2018-08-25 00:41mtaalNote Added: 0106481
2018-08-25 00:41mtaalStatusresolved => closed
2018-08-29 10:51AugustoMauchRelationship addedrelated to 0039195

Notes
(0106478)
hgbot   
2018-08-24 14:48   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: cf49abe279718596c23450662a00217afb370224
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Aug 24 14:48:19 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cf49abe279718596c23450662a00217afb370224 [^]

Fixes issue 39187:If a transition to online fails, update the status to OFFLINE

In this flow [1], if a transition to offline fails, the status of the store server is updated to
OFFLINE. But in this other flow [2], the status update was missing, and the store server could
remain in the Transition to Offline status indefinitely, rendering the store unoperative.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/3c1bc36f021e/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l642 [^]
[2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/3c1bc36f021e/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l629 [^]

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
---
(0106481)
mtaal   
2018-08-25 00:41   
reviewed and tested