Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035113Retail ModulesStoreServerpublic2017-01-31 18:372017-03-10 14:29
AugustoMauch 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR17Q2 
mtaal
No
0035113: The ServerStateBackground server ping unregistered servers
When the ServerStateBackground is executed in Central Server, it will ping all the store servers defined in the Mobile Server window, even if the store server has not been deployed yet. In that case the store server will be offline until it is deployed, and the ping to that store server will be very slow because it will have to wait until the timeout is reached.
- In a central server, define two entries in the Mobile Server window.
- Place a breakpoint in the doExecute method of the ServerStateBackground class. You can check that the central server will try to ping the servers defined previously, even they they do not physically exist yet.
Check if the servers are registered in the central server using SymmetricDS before pinging them. This can be done by querying the sym_node table, if a store server has been registered it will be there.

The SymmetricDS module cannot be directly referenced from mobile.core, so a hook will probably be useful to filter the list of store servers to ping.
No tags attached.
related to feature request 0035482RR17Q2 closed AugustoMauch MobileMainServerCheck should also use last ping approach 
related to feature request 0035378 closed mtaal The ServerStateBackground process pings store server sequentially 
Issue History
2017-01-31 18:37AugustoMauchNew Issue
2017-01-31 18:37AugustoMauchAssigned To => mtaal
2017-01-31 18:37AugustoMauchTriggers an Emergency Pack => No
2017-02-28 11:43AugustoMauchSummaryThe ServerStateBackground server ping sequentially unregistered servers => The ServerStateBackground server ping unregistered servers
2017-02-28 11:43AugustoMauchDescription Updatedbug_revision_view_page.php?rev_id=14689#r14689
2017-02-28 12:05hgbotCheckin
2017-02-28 12:05hgbotNote Added: 0094657
2017-02-28 12:09hgbotCheckin
2017-02-28 12:09hgbotNote Added: 0094658
2017-02-28 12:09hgbotStatusnew => resolved
2017-02-28 12:09hgbotResolutionopen => fixed
2017-02-28 12:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/209ca118e6ec0727817468b3a223b7c20e257d47 [^]
2017-02-28 12:41AugustoMauchRelationship addedrelated to 0035378
2017-02-28 14:56hgbotCheckin
2017-02-28 14:56hgbotNote Added: 0094660
2017-02-28 15:04hgbotCheckin
2017-02-28 15:04hgbotNote Added: 0094661
2017-03-09 10:38mtaalReview Assigned To => mtaal
2017-03-09 11:22AugustoMauchStatusresolved => new
2017-03-09 11:22AugustoMauchResolutionfixed => open
2017-03-09 11:46hgbotCheckin
2017-03-09 11:46hgbotNote Added: 0094868
2017-03-09 11:50hgbotCheckin
2017-03-09 11:50hgbotNote Added: 0094869
2017-03-09 11:50hgbotStatusnew => resolved
2017-03-09 11:50hgbotResolutionopen => fixed
2017-03-09 11:50hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/209ca118e6ec0727817468b3a223b7c20e257d47 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8157c32c4adb273200d1ef3ad9229e6e5daf5cb8 [^]
2017-03-10 14:09mtaalNote Added: 0094919
2017-03-10 14:09mtaalStatusresolved => closed
2017-03-10 14:09mtaalFixed in Version => RR17Q2
2017-03-10 14:23mtaalRelationship addedrelated to 0035482
2017-03-10 14:24mtaalRelationship deletedrelated to 0035482
2017-03-10 14:29mtaalRelationship addedrelated to 0035482

Notes
(0094657)
hgbot   
2017-02-28 12:05   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 1ae21bb1861cf5114ad1630daef7a1f849339f2c
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 28 12:03:52 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1ae21bb1861cf5114ad1630daef7a1f849339f2c [^]

Related with issue 35113:Check if server should be pinged, if not it is offline

Before actually pinging a store server, the central server will check if ping should be done to that server. This check can be extended by implementing the PingServerChecker interface:

public interface PingServerChecker {

  boolean pingShouldBeDone(MobileServerDefinition mobileServer);

}

If the server is not pinged, it is considered to be offline.

---
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
A src/org/openbravo/mobile/core/servercontroller/PingServerChecker.java
---
(0094658)
hgbot   
2017-02-28 12:09   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 209ca118e6ec0727817468b3a223b7c20e257d47
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 28 12:08:41 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/209ca118e6ec0727817468b3a223b7c20e257d47 [^]

Fixes issue 35113: Store server is not pinged if it is not registered

The RegisteredServerPingChecker class implements PingServerChecker to prevent sending pings to stores that are not registered in SymmetricDS. The first time a store server is started it will automatically register, so if the server is not registered it means it has not been deployed, thus the ping is not needed, the server is offline.

---
A src/org/openbravo/retail/storeserver/synchronization/RegisteredServerPingChecker.java
---
(0094660)
hgbot   
2017-02-28 14:56   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 3508789c776dd79a7369b651c1ce92f1783ae58e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 28 14:56:17 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/3508789c776dd79a7369b651c1ce92f1783ae58e [^]

Related with issue 35113:Backs out changeset, will push when repo is not frozen

---
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
R src/org/openbravo/mobile/core/servercontroller/PingServerChecker.java
---
(0094661)
hgbot   
2017-02-28 15:04   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 9dde3c433181f998d0237d071de0870e4ae67e6f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Feb 28 15:04:06 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/9dde3c433181f998d0237d071de0870e4ae67e6f [^]

Related with issue 35113:Backs out changeset until mobile.core is unfrozen

---
R src/org/openbravo/retail/storeserver/synchronization/RegisteredServerPingChecker.java
---
(0094868)
hgbot   
2017-03-09 11:46   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: a5e52ee62ef2b0d6c1aea942dcc20d677d582d3e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Mar 09 11:44:25 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/a5e52ee62ef2b0d6c1aea942dcc20d677d582d3e [^]

Related with issue 35113: Reapplies changeset 209ca118e6ec

---
A src/org/openbravo/retail/storeserver/synchronization/RegisteredServerPingChecker.java
---
(0094869)
hgbot   
2017-03-09 11:50   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 8157c32c4adb273200d1ef3ad9229e6e5daf5cb8
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Mar 09 11:50:08 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/8157c32c4adb273200d1ef3ad9229e6e5daf5cb8 [^]

Fixes issue 35113: Reapplies changeset 1ae21bb1861c

---
M src/org/openbravo/mobile/core/servercontroller/ServerStateBackground.java
A src/org/openbravo/mobile/core/servercontroller/PingServerChecker.java
---
(0094919)
mtaal   
2017-03-10 14:09   
Reviewed and tested