zowe / zebra

ZEBRA is an open-source incubator project for Zowe. It is a data parsing framework that allows quick and easy access to z/OS performance metrics.
https://zebra.talktothemainframe.com
Eclipse Public License 2.0
22 stars 13 forks source link

error retrieving JSON report #70

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hello,

I just recently brought up zebra for testing and the following errors are showing on the log when trying to retrieve the reports:

GET /rmfm3?reports=SYSINFO - - ms - - GET /rmfm3?reports=SYSINFO - - ms - - GET /rmfm3?report=USAGE - - ms - - GET /rmfm3?report=USAGE - - ms - - GET /rmfm3?report=CPC - - ms - - GET /rmfm3?report=CPC - - ms - - GET /rmfm3?report=PROC 200 20036.297 ms - 35911 GET /rmfm3?report=PROC 200 20036.297 ms - 35911 GET /rmfm3?report=CPC 200 20037.281 ms - 35911 GET /rmfm3?report=CPC 200 20037.281 ms - 35911 GET /rmfm3?report=USAGE 200 20037.913 ms - 35911 GET /rmfm3?report=USAGE 200 20037.913 ms - 35911 GET /rmfm3?reports=SYSINFO 200 20038.396 ms - 35911 GET /rmfm3?reports=SYSINFO 200 20038.396 ms - 35911 GET /rmfm3?reports=SYSSUM&resource=%22,,SYSPLEX%22 200 40.384 ms - 35911 GET /rmfm3?reports=SYSSUM&resource=%22,,SYSPLEX%22 200 40.384 ms - 35911 (node:193034) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined at fedDatabase (my-folder/src/mongo.js:53:45) at my-folder/src/mongo.js:137:7 at my-folder/src/mongo.js:32:5 at process._tickCallback (internal/process/next_tick.js:68:7) (node:193034) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 739) CPC Updated Successflly PROC Updated Successflly USAGE Updated Successflly GET /rmfm3?reports=SYSSUM&resource=%22,,SYSPLEX%22 200 37.685 ms - 35911 GET /rmfm3?reports=SYSSUM&resource=%22,,SYSPLEX%22 200 37.685 ms - 35911 Workload Updated Successflly GET /prommetric 200 0.257 ms - - GET /prommetric 200 0.257 ms - - GET /prommetric 200 0.361 ms - - GET /prommetric 200 0.361 ms - - GET /prommetric 200 0.243 ms - - GET /prommetric 200 0.243 ms - - GET /prommetric 200 0.332 ms - - GET /prommetric 200 0.332 ms - - GET /prommetric 200 0.305 ms - - GET /prommetric 200 0.305 ms - - (node:193034) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'msg' of undefined at my-folder/src/app_server/Controllers/RMF3Controller.js:234:22 at my-folder/src/app_server/Controllers/RMF3Controller.js:460:9 at my-folder/src/app_server/Controllers/RMF3Controller.js:77:9 at process._tickCallback (internal/process/next_tick.js:68:7) (node:193034) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 741) GET /rmfm3?report=PROC 200 18.698 ms - 2 GET /rmfm3?report=PROC 200 18.698 ms - 2 (node:193034) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined at fedDatabase (my-folder/src/mongo.js:53:45) at my-folder/src/mongo.js:128:5 at my-folder/src/mongo.js:32:5 at process._tickCallback (internal/process/next_tick.js:68:7) (node:193034) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 743) (node:193034) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toString' of undefined at Parser.exports.Parser.Parser.parseString (my-folder/src/node_modules/xml2js/lib/parser.js:312:19) at Parser.parseString (my-folder/src/node_modules/xml2js/lib/parser.js:5:59) at Object.module.exports.RMF3bodyParser (my-folder/src/app_server/parser/RMFMonitor3parser.js:11:12) at my-folder/src/app_server/Controllers/RMF3Controller.js:217:27 at my-folder/src/app_server/Controllers/RMF3Controller.js:135:9 at process._tickCallback (internal/process/next_tick.js:68:7) (node:193034) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 745) (node:193034) UnhandledPromiseRejectionWarning: ReferenceError: result is not defined at my-folder/src/app_server/Controllers/RMF3Controller.js:637:12 at my-folder/src/app_server/Controllers/RMF3Controller.js:77:9 at process._tickCallback (internal/process/next_tick.js:68:7) (node:193034) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 747)

I am not a node expert, so wasn't able to find what could have done wrong when installing it.

salisbuk7897 commented 2 years ago

Hi @Michelin001, from my understanding of the log, you are running ZEBRA from the main branch, you have configured it correctly since some data is getting saved into mongoDB. Some of the error messages in the log occurred because zebra cannot parsed the data received from DDS. Since we haven't worked on that branch for a while, I will request you please try out the zebra_dev branch. I guess that branch have a better way of handling errors. If the problem persists, please let us know. Thank you!

ghost commented 2 years ago

Hi @salisbuk7897 , yes, that is correct I used the main branch as I tought it was the most recent code for it, but have cloned the zebra_dev branch now and will start testing on it... thank you for your quick response on it. =)