Incompatible SDK version
search cancel

Incompatible SDK version

book

Article ID: 131408

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration

Issue/Introduction

After upgrading CAPM the following error was seen in the DA karaf.log as well as the DR vertica.log

ERROR 6999: The library [ApproximateMedianLib] for the function [APPROXIMATE_PERCENTILE(float)] was compiled with an incompatible SDK Version [8.1.0] 
HINT: Recompile the library with the SDK version [9.0.1] and then recreate the library and functions


The following query was noted as part of the error

SELECT 1555786800 as theTime,t1.item_id as item_id, APPROXIMATE_PERCENTILE(im_MaxWindowSize USING PARAMETERS percentile=0.95) pct_im_MaxWindowSize FROM nrm_event_health_times_rate t1 INNER JOIN (SELECT DISTINCT FIRST_VALUE(dcm_id)OVER(PARTITION BY item_id ORDER BY tstamp DESC) AS dcm_id,item_id FROM nrm_event_health_times_rate WHERE dcm_id in (6) AND tstamp > 1555783200 AND tstamp <= 1555786800) AS t2 ON t1.item_id=t2.item_id WHERE tstamp > 1555783200 AND tstamp <= 1555786800 GROUP BY t1.item_id, t2.dcm_id;

Environment

CAPM 3.x

Resolution

To resolve, do the following:

1. su - dradmin (or equivalent user) 
2. cd /opt/vertica/bin 
3. ./vsql -U<user> -w<password> 

Where user and password should be dbUser from /opt/IMDataAggregator/apache-karaf-2.4.3/etc/dbconnection.cfg and whatever the password is 

Example:

dbUser=dauser 
dbEncryptedPassword=QUVTOkMZrUfMytW85NBX+bj7T4w= 

Once connected, run the following query: 

SELECT 1555786800 as theTime,t1.item_id as item_id, APPROXIMATE_PERCENTILE(im_MaxWindowSize USING PARAMETERS percentile=0.95) pct_im_MaxWindowSize FROM nrm_event_health_times_rate t1 INNER JOIN (SELECT DISTINCT FIRST_VALUE(dcm_id)OVER(PARTITION BY item_id ORDER BY tstamp DESC) AS dcm_id,item_id FROM nrm_event_health_times_rate WHERE dcm_id in (6) AND tstamp > 1555783200 AND tstamp <= 1555786800) AS t2 ON t1.item_id=t2.item_id WHERE tstamp > 1555783200 AND tstamp <= 1555786800 GROUP BY t1.item_id, t2.dcm_id; 


It may fail on one or more nodes with the following error

ERROR 6999: The library [ApproximateMedianLib] for the function [APPROXIMATE_PERCENTILE(float)] was compiled with an incompatible SDK Version [8.1.0]
HINT: Recompile the library with the SDK version [9.0.1] and then recreate the library and functions


To resolve run the following on all nodes to reinstall the "approxomate" package:

./admintools -t install_package -d drdata -p xxxxxx -P approximate --force-reinstall 

If successful you should see this

Installing package approximate... 
...Success! 


Now repeat the steps noted above to run the query.  It should succeed

dauser=> SELECT 1555786800 as theTime,t1.item_id as item_id, APPROXIMATE_PERCENTILE(im_MaxWindowSize USING PARAMETERS percentile=0.95) pct_im_MaxWindowSize FROM nrm_event_health_times_rate t1 INNER JOIN (SELECT DISTINCT FIRST_VALUE(dcm_id)OVER(PARTITION BY item_id ORDER BY tstamp DESC) AS dcm_id,item_id FROM nrm_event_health_times_rate WHERE dcm_id in (6) AND tstamp > 1555783200 AND tstamp <= 1555786800) AS t2 ON t1.item_id=t2.item_id WHERE tstamp > 1555783200 AND tstamp <= 1555786800 GROUP BY t1.item_id, t2.dcm_id; 
theTime | item_id | pct_im_MaxWindowSize 
------------+---------+---------------------- 
1555786800 | 1001564 | 86400 
1555786800 | 1221012 | 1800 
1555786800 | 2252758 | 300 
1555786800 | 1074358 | 1800 
1555786800 | 4681 | 
1555786800 | 5601 | 1800 
1555786800 | 1075784 | 600 
(7 rows) 

 

Additional Information

A side affect of this exception could be that the rollup does stops working.  The above steps can be done with both the DA and DR running, but if it seems rollup is not working correctly (i.e not seeing hourly data etc) then you should restart the DA TO RESTART THE ROLLUP THREADS