Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038740Openbravo ERPA. Platformpublic2018-06-12 18:382018-06-22 10:48
shuehner 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q3 
caristu
Core
No
0038740: Tomcat version field sent in heartbeat statistics cannot be trusted as it is sending value from initial install forever.
If you install an instance using tomcat6 many years ago. Then update that instance to tomcat7 (i.e. by just using newer openbravo appliance) then the heartbeat value sent for tomcat version will be tomcat6 forever.

Consequence is that no value of tomcat version in collected heartbeat data can be trusted.

Problem is that the value is only collected and then saved on 'enabling heartbeat' and then sending heartbeat just uses this (potentially wrong) value instead of using actual tomcat version when sending the scheduled beat.

Note:
Tomcat version is the field where the problem has been found. When working on this issue all stack related fields should be reviewed.

Related it should be thought about if saving those values in i.e. ad_system_info locally gives any value as inside an instance / server they can be looked up very easily at any time.
check collected hearbeat statistics of i.e. butler server itself and notice i reports tomcat 6.0.x still today while the instance is running with newer tomcat7 for 3 years.
No tags attached.
depends on defect 0038763 closed alostale API change: removed servlet_container and servlet_container_version from ad_system_info 
related to defect 0038765 closed alostale ant version sent to heartbeat is not updated 
Issue History
2018-06-12 18:38shuehnerNew Issue
2018-06-12 18:38shuehnerAssigned To => platform
2018-06-12 18:38shuehnerModules => Core
2018-06-12 18:38shuehnerTriggers an Emergency Pack => No
2018-06-12 18:44shuehnerNote Added: 0105103
2018-06-15 09:09alostaleRelationship addeddepends on 0038763
2018-06-15 09:10alostaleAssigned Toplatform => alostale
2018-06-15 09:17hgbotCheckin
2018-06-15 09:17hgbotNote Added: 0105159
2018-06-15 09:17hgbotStatusnew => resolved
2018-06-15 09:17hgbotResolutionopen => fixed
2018-06-15 09:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/84035789ff4213853c706e895af7c41c0baf8af6 [^]
2018-06-15 09:21alostaleNote Added: 0105161
2018-06-15 09:34alostaleReview Assigned To => caristu
2018-06-15 09:41alostaleRelationship addedrelated to 0038765
2018-06-19 13:24hudsonbotCheckin
2018-06-19 13:24hudsonbotNote Added: 0105238
2018-06-22 10:48caristuNote Added: 0105332
2018-06-22 10:48caristuStatusresolved => closed
2018-06-22 10:48caristuFixed in Version => 3.0PR18Q3

Notes
(0105103)
shuehner   
2018-06-12 18:44   
Code to review: SystemInfo.java i.e. getServletContainer + getServletContainerVersion to not load data via sql but just from 'running tomcat'.
Note: When testing please check that code does not fail when running in wildfly (and ideally works by reporting wildfly)
(0105159)
hgbot   
2018-06-15 09:17   
Repository: erp/devel/pi
Changeset: 84035789ff4213853c706e895af7c41c0baf8af6
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jun 14 14:12:44 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/84035789ff4213853c706e895af7c41c0baf8af6 [^]

fixed bug 38740: incorrect Tomcat version sent to Heartbeat

  Tomcat version to be sent to Heartbeat was calculated once on beat activation
  and persisted in DB to be always sent. This results on instances updating Tomcat
  not reporting correct version.

  Fixed by reading version on start up and not persisting it in DB.

---
M src-db/database/model/tables/AD_SYSTEM_INFO.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/base/ServerVersionChecker.java
M src/org/openbravo/erpCommon/ad_forms/Heartbeat.java
M src/org/openbravo/erpCommon/utility/SystemInfo.java
M src/org/openbravo/erpCommon/utility/SystemInfo_data.xsql
R src/org/openbravo/erpCommon/ad_forms/Heartbeat_data.xsql
---
(0105161)
alostale   
2018-06-15 09:21   
Tested:
* Tomcat 7, 8, 8.5 and 9: expected name version is sent
* WildFly 10.1.0.Final: name is WildFly as expected, version is 2.2.0 which corresponds to the wildfly-server [1] component.

[1] https://mvnrepository.com/artifact/org.wildfly.core/wildfly-server [^]
(0105238)
hudsonbot   
2018-06-19 13:24   
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/dd1f20cf33f6 [^]
Maturity status: Test
(0105332)
caristu   
2018-06-22 10:48   
Code reviewed + tested OK.