Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035121Retail ModulesStoreServerpublic2017-02-01 10:352017-02-21 09:47
mtaal 
mtaal 
normalmajorhave not tried
closedfixed 
5
 
RR17Q2 
AugustoMauch
No
0035121: Offline store server keeps sending requests to central server
The store server can be offline because the CS is not available or when another system (e.g. stockmd) can not be reached. In the latter case the CS can be online and reachable.

In this case the store server (in synchronized mode) will try to send requests to the central server while the store server is still offline.

A probably related topic is that the CS can be really offline but behind an apache server which returns an empty result. In this case the following message is shown to the webpos user: The transaction failed on the server, change your input or try again. Detailed error message: No result obtained from OBMOBC_SERVER_DEFINITION(3B53B397974E42DABF2EFFB09D0572C1) (name: CentralServer) for service /org.openbravo.mobile.core.service.jsonrest/org.openbravo.mobile.core.servercontroller.SynchronizedServerProcessCaller

Install multi-server
set synchronized mode
add 'false &&' to the if-statement, so that the transitiontoonline handlers are not cleaned, so SS remains offline:
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/8e6f88539ceb/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java#l615 [^]

start servers
login to webpos
do a ticket
stop central
enter a ticket in webpos and press done button
SS offline
start CS


Also set the CS status when the transition to offline is triggered in MultiServerJSONProcess here [1]

Around the same location do not call central server if the store server is offline

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/7162b5054a86/src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java#l391 [^]
No tags attached.
Issue History
2017-02-01 10:35mtaalNew Issue
2017-02-01 10:35mtaalAssigned To => mtaal
2017-02-01 10:35mtaalTriggers an Emergency Pack => No
2017-02-03 22:00mtaalSummaryCentral server is not flagged as offline if offline is detected through normal request => Offline store server keeps sending requests to central server
2017-02-03 22:00mtaalDescription Updatedbug_revision_view_page.php?rev_id=14469#r14469
2017-02-03 22:00mtaalSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14471#r14471
2017-02-03 22:00mtaalProposed Solution updated
2017-02-03 22:00mtaalReview Assigned To => AugustoMauch
2017-02-03 22:04hgbotCheckin
2017-02-03 22:04hgbotNote Added: 0094051
2017-02-03 22:04hgbotStatusnew => resolved
2017-02-03 22:04hgbotResolutionopen => fixed
2017-02-03 22:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0fbb074eab0acd6b03bd27ac5650ef735a4faf54 [^]
2017-02-21 09:47AugustoMauchNote Added: 0094503
2017-02-21 09:47AugustoMauchStatusresolved => closed

Notes
(0094051)
hgbot   
2017-02-03 22:04   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0fbb074eab0acd6b03bd27ac5650ef735a4faf54
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Feb 03 22:04:08 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0fbb074eab0acd6b03bd27ac5650ef735a4faf54 [^]

Fixes issue 35121: Offline store server keeps sending requests to central server
Only call CS if the SS itself has online status

- MobileServerController: formatting changes, set transition to offline in admin mode
- MobileServerRequestExecutor: set server status as returned from other server
- MultiServerJSONProcess: formatting changes, only execute in central if SS is online, set CS status if exception is thrown

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java
M src/org/openbravo/mobile/core/servercontroller/MultiServerJSONProcess.java
---
(0094503)
AugustoMauch   
2017-02-21 09:47   
Code reviewed and verified