Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038361
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] Web POSmajoralways2018-04-13 10:152018-12-11 20:22
ReporteregoitzView Statuspublic 
Assigned Tomarvintm 
PrioritynormalResolutionfixedFixed in VersionRR19Q1
StatusclosedFix in branchFixed in SCM revisiona16a113b5f65
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomigueldejuana
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038361: The terminal does not go to offline mode if the database is colapsed but the tomcat works

DescriptionIf for example, the database get out of connections, the webpos does not go offline.
Steps To Reproduce-Access to a terminal
-Stop postgresql.
-Refresh the application.
*It tryies to login but then you are continuosly requested to login again.
OFFLINE does not work
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0039445RR18Q4 closedmarvintm The terminal does not go to offline mode if the database is colapsed but the tomcat works 
depends on backport 0039446RR18Q3.2 closedmarvintm The terminal does not go to offline mode if the database is colapsed but the tomcat works 
depends on backport 0039451RR18Q2.4 closedmarvintm The terminal does not go to offline mode if the database is colapsed but the tomcat works 

-  Notes
(0107286)
hgbot (developer)
2018-10-15 10:42

Repository: erp/devel/pi
Changeset: 31f161352319157b70bc6c6d11ad1719cc5df556
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:18:19 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/31f161352319157b70bc6c6d11ad1719cc5df556 [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
When there is an exception in the critical part of the HttpSecureAppServlet which tries to detect if the client is authenticated, we should not necessarily force a logout and reply with '401- Not authenticated' response. Instead, the appropriate action is to just return a '500-Internal Server Error' response. Logging out in this case may kill a valid request when the server is temporarily overloaded, and makes no sense, and the 401 response may confuse the client, thinking that it needs to do login again when in reality, the problem is just that the server is either overloaded, or affected by some serious problem which prevents even basic authentication checking to work.

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
(0107287)
hgbot (developer)
2018-10-15 10:42

Repository: erp/devel/pi
Changeset: 618fcb380761b3580d202c292f1d5b1ede437123
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Oct 15 10:41:39 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/618fcb380761b3580d202c292f1d5b1ede437123 [^]

Related to issue 38361. Improved comment and log.

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
(0107288)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d8a54fc7c2683e641af3aaba83f9db35fdbc5ab8
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Sun Oct 14 10:58:08 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d8a54fc7c2683e641af3aaba83f9db35fdbc5ab8 [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Two changes have been made:
- In the main Terminal request, if the response is not a known message, then most probably it is a critical error which happened in the server when trying to compute the terminal. In this case, it is better to try to force an offline login than block the process, as this may otherwise make it impossible to do an offline login in the system when the server is affected by some serious problem.
- In the loginUtils request, if the request fails with an unexpected error, we will try to continue with the main flow to allow an offline login to be completed.

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0107289)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: c73d499af2679e0df61e2f7d08fa62340efba4dd
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:25:04 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c73d499af2679e0df61e2f7d08fa62340efba4dd [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Added some basic check with a database query. Modified the response to ensure that it follows a correct format.

---
M src/org/openbravo/mobile/core/login/CheckServerAvailability.java
---
(0107290)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 54d25661ddc24983b27c2d6916332b659357cc3d
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:27:03 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/54d25661ddc24983b27c2d6916332b659357cc3d [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
If server ran out of connections, we will generate an '500-Internal Server Error'. Otherwise, if it's just a normal Exception, we assume that it is a plain defect in functional code which should not be considered cause of a general server problem, and will return a standard error with a 200 response.

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
---
(0107291)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 5b04e6405abddbe3437e107ceb102df41930a4e8
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:28:07 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5b04e6405abddbe3437e107ceb102df41930a4e8 [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Do not catch Throwables, we just let them leak to super classes, in which they will be handled correctly (will still return '500 Internal Server error' in this case)

---
M src/org/openbravo/mobile/core/process/MobileService.java
---
(0107292)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e78063c7fddfe836b3b98e5380713594f9e65045
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:28:46 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e78063c7fddfe836b3b98e5380713594f9e65045 [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Do not catch Throwables, we just let them leak to super classes, in which they will be handled correctly (will still return '500 Internal Server error' in this case).

---
M src/org/openbravo/mobile/core/process/WebServiceAbstractServlet.java
---
(0107293)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b0f80aa0446b1426f43e8843d9a3f037b5b71f74
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:30:22 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b0f80aa0446b1426f43e8843d9a3f037b5b71f74 [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
> Avoid setting wrong (unauthorized) state, in case HttpSecureAppServlet was affected by an exception in a critical part, and returned a 500 state

---
M src/org/openbravo/mobile/core/process/WebServiceAuthenticatedServlet.java
---
(0107294)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 283ba9e128a4e165f06c38f924d1815cdc52f083
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:31:33 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/283ba9e128a4e165f06c38f924d1815cdc52f083 [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
Ensure transitionToOnline counter correctly resets to the next step, in case of CheckServerAvailability error.

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0107295)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: a16a113b5f65ce8cc671f1bead1a54a8b569bc52
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Oct 11 18:32:22 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a16a113b5f65ce8cc671f1bead1a54a8b569bc52 [^]

Fixed issue 38361. The terminal does not go to offline mode if the database is colapsed but the tomcat works
When doing offline login ensure that when connectedToERP variable changes due to the load of the Terminal object from cache, this doesn't affect the rest of the login process.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0107296)
hgbot (developer)
2018-10-15 10:43

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: e94772afb866d11a831fe68e73d6ef5cdb03be54
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Sat Oct 13 19:02:46 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e94772afb866d11a831fe68e73d6ef5cdb03be54 [^]

Related to issue 38361. Applied formatter.

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0107336)
hgbot (developer)
2018-10-16 14:15

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7bfcd71dd516c7dc73864eb9a6af298533c996f5
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Oct 16 14:15:30 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7bfcd71dd516c7dc73864eb9a6af298533c996f5 [^]

Related to issue 38361. Language will not be reset if response is invalid.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0107340)
migueldejuana (developer)
2018-10-16 16:15

Tested and reviewed
(0108426)
hudsonbot (developer)
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
(0108427)
hudsonbot (developer)
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

- Issue History
Date Modified Username Field Change
2018-04-13 10:15 egoitz New Issue
2018-04-13 10:15 egoitz Assigned To => Retail
2018-04-13 10:15 egoitz Triggers an Emergency Pack => No
2018-05-03 09:19 egoitz Summary The terminal does not go to offline mode if the database is colapsed but the application works => The terminal does not go to offline mode if the database is colapsed but the tomcat works
2018-05-03 09:19 egoitz Steps to Reproduce Updated View Revisions
2018-06-26 16:30 egoitz Type design defect => defect
2018-07-11 15:08 rqueralta Assigned To Retail => rqueralta
2018-07-13 13:36 migueldejuana Assigned To rqueralta => migueldejuana
2018-07-16 17:52 jorge-garcia Assigned To migueldejuana => jorge-garcia
2018-07-24 13:44 martinsdan Issue Monitored: martinsdan
2018-08-23 12:53 marvintm Category Offline Mode => Web POS
2018-08-23 12:53 marvintm Type defect => design defect
2018-08-23 12:53 marvintm Status new => scheduled
2018-08-23 12:53 marvintm Assigned To jorge-garcia => marvintm
2018-09-05 12:17 rafaroda Issue Monitored: rafaroda
2018-10-15 10:36 marvintm Status scheduled => acknowledged
2018-10-15 10:36 marvintm Status acknowledged => scheduled
2018-10-15 10:42 hgbot Checkin
2018-10-15 10:42 hgbot Note Added: 0107286
2018-10-15 10:42 hgbot Status scheduled => resolved
2018-10-15 10:42 hgbot Resolution open => fixed
2018-10-15 10:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/31f161352319157b70bc6c6d11ad1719cc5df556 [^]
2018-10-15 10:42 hgbot Checkin
2018-10-15 10:42 hgbot Note Added: 0107287
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107288
2018-10-15 10:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/31f161352319157b70bc6c6d11ad1719cc5df556 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d8a54fc7c2683e641af3aaba83f9db35fdbc5ab8 [^]
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107289
2018-10-15 10:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d8a54fc7c2683e641af3aaba83f9db35fdbc5ab8 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c73d499af2679e0df61e2f7d08fa62340efba4dd [^]
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107290
2018-10-15 10:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/c73d499af2679e0df61e2f7d08fa62340efba4dd [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/54d25661ddc24983b27c2d6916332b659357cc3d [^]
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107291
2018-10-15 10:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/54d25661ddc24983b27c2d6916332b659357cc3d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5b04e6405abddbe3437e107ceb102df41930a4e8 [^]
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107292
2018-10-15 10:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5b04e6405abddbe3437e107ceb102df41930a4e8 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e78063c7fddfe836b3b98e5380713594f9e65045 [^]
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107293
2018-10-15 10:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/e78063c7fddfe836b3b98e5380713594f9e65045 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b0f80aa0446b1426f43e8843d9a3f037b5b71f74 [^]
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107294
2018-10-15 10:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b0f80aa0446b1426f43e8843d9a3f037b5b71f74 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/283ba9e128a4e165f06c38f924d1815cdc52f083 [^]
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107295
2018-10-15 10:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/283ba9e128a4e165f06c38f924d1815cdc52f083 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/a16a113b5f65ce8cc671f1bead1a54a8b569bc52 [^]
2018-10-15 10:43 hgbot Checkin
2018-10-15 10:43 hgbot Note Added: 0107296
2018-10-15 15:22 marvintm Status resolved => new
2018-10-15 15:22 marvintm Resolution fixed => open
2018-10-15 15:22 marvintm Status new => scheduled
2018-10-15 15:22 marvintm Status scheduled => resolved
2018-10-15 15:22 marvintm Fixed in Version => RR19Q1
2018-10-15 15:22 marvintm Resolution open => fixed
2018-10-16 14:15 hgbot Checkin
2018-10-16 14:15 hgbot Note Added: 0107336
2018-10-16 16:15 migueldejuana Review Assigned To => migueldejuana
2018-10-16 16:15 migueldejuana Note Added: 0107340
2018-10-16 16:15 migueldejuana Status resolved => closed
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108426
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108427


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker