Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036884Retail ModulesStoreServerpublic2017-09-19 09:372017-11-19 23:56
xabiermerino 
mtaal 
urgentmajoralways
closedfixed 
5
 
 
No
0036884: [SERQA 3289] If we stop the instance instead of tomcat we get a timeout paying a ticket
If we stop the instance instead of tomcat we get a timeout paying a ticket
1: Log into WebPOS (using Central Server URL)
2: Stop amazon's instance
3: Pay a ticket
4: realize a message of a timeout appears after some minutes
SERQA
related to feature request 0037249pi closed mtaal For server to server requests set read and connection time out 
Issue History
2017-09-19 09:37xabiermerinoNew Issue
2017-09-19 09:37xabiermerinoAssigned To => StoreServer
2017-09-19 09:37xabiermerinoResolution time => 1506895200
2017-09-19 09:37xabiermerinoTriggers an Emergency Pack => No
2017-09-19 09:38xabiermerinoTag Attached: SERQA
2017-11-06 18:44mtaalAssigned ToStoreServer => mtaal
2017-11-19 23:54mtaalNote Added: 0100604
2017-11-19 23:55mtaalRelationship addedduplicate of 0037249
2017-11-19 23:56mtaalRelationship deleted0037249
2017-11-19 23:56mtaalRelationship addedrelated to 0037249
2017-11-19 23:56mtaalStatusnew => scheduled
2017-11-19 23:56mtaalNote Added: 0100605
2017-11-19 23:56mtaalStatusscheduled => resolved
2017-11-19 23:56mtaalResolutionopen => fixed
2017-11-19 23:56mtaalNote Added: 0100606
2017-11-19 23:56mtaalStatusresolved => closed

Notes
(0100604)
mtaal   
2017-11-19 23:54   
I reproduced this on the
DRU_QA - BUT-DEV CENTRAL SERVER and DRU_QA - BUT-DEV STORE SERVER

Making a change in the MobileServerRequestExecutor.createConnection method solves and shows a message after 5 seconds. The change is to set connection/read time out.

This change has been implemented/added as part of another issue. This issue will be closed as it is already resolved by the other issue.


  private HttpURLConnection createConnection(String serverKey, String serverUrl, String wsPart,
      String method, JSONObject parameters) throws Exception {
    String localServerUrl = serverUrl;
    // TODO: maybe handle this with a validation on the formfield
    if (!localServerUrl.toLowerCase().startsWith("http://" [^])
        && !localServerUrl.toLowerCase().startsWith("https://" [^])) {
      localServerUrl = "http://" [^] + localServerUrl;
    }
    final URL url = new URL(localServerUrl + wsPart);
    final HttpURLConnection hc = (HttpURLConnection) url.openConnection();
    hc.setRequestMethod(method);
    hc.setAllowUserInteraction(false);
    hc.setDefaultUseCaches(false);
    hc.setDoOutput(true);
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    hc.setConnectTimeout(5000);
    hc.setReadTimeout(5000);
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
(0100605)
mtaal   
2017-11-19 23:56   
Resolved by issue: 32749
(0100606)
mtaal   
2017-11-19 23:56   
Closed as related issue is closed