Well, this error keeps coming back. We thought things were cleared up as it was good for a month or more, but now we've gotten it twice within a couple weeks of each other.
One thing we've observed is that every time the error has happened, it's been a scripting datasource using httpBuilder that has the error. I found this by going through all of these data sources and clicking the Validate button, and the there's always one that will get the error:
java.lang.RuntimeException: java.io.FileNotFoundException: C:\Databases\mangoTSDB\67\33597\771.data.rev (Access is denied)
The full error in the ma.log is:
FATAL 2022-07-18T14:57:57,169 [high-pool-2-thread-29880 --> NoSQL Batch Writer 0] - Should never happen, data loss for unknown reason
java.lang.RuntimeException: java.io.FileNotFoundException: C:\Databases\mangoTSDB\67\33597\771.data.rev (Access is denied)
Here's a look at the scripting data source's code. Is there anything we're doing that should be modified to stop this error? We're hitting the Runtime Status endpoint so we can get are more complete history of poll durations, aborted poll, average poll time, etc.
Is this something we shouldn't be doing and using a different method to get this information from the app?
var xid = "dataSourceXID";
var noRec = 2; //Used to know how many records to get from the runtime status
/* ###################################################################
## Set parameters to retrieve data source runtime status from the API
###################################################################### */
var url = "https://ourdomain.com/rest/v2/data-sources/status/"+xid;
var headers = {Accept: "application/json, text/plain, */*",
Authorization: "Bearer ourauthcode"};
var params = {};
hitAPI(url, headers, params, parseContent, xid, noRec);
/* #############################################################
## Function to hit the API and retrieve the data set
################################################################ */
function hitAPI(url, headers, params, callback, xid, noRec) {
HttpBuilder.get(url,headers,params)
.err(function(status, headers, content) { //setErrorCallback for linguistic completion
//setErrorCallback for linguistic completion
print("");
print("Fail Status: " + status);
print("Fail Headers: " + headers);
print("Fail Content: " + content);
}).resp(function(status, headers, content) {
callback(status, headers, content, xid, noRec);
}).excp(function(exception) { //setExceptionCallback
throw exception.getMessage();
}).execute();
} //End function getAPI
function parseContent (status, headers, content, xid, noRec) {
var content = JSON.parse(content);
//Logic here to parse through the results and set data point values
} //End function parseContent
Any help or insights are appreciated.
Thanks,
Chad