hastic-zzz / hastic-server

Hastic data management server for analyzing patterns and anomalies from Grafana
GNU General Public License v3.0
330 stars 23 forks source link

Can`t parse response from analytics as json #882

Open mcichecki opened 4 years ago

mcichecki commented 4 years ago

After trying to apply labeled Jump patterns I get following error:

Can`t parse response from analytics as json:
{"method": "TASK_RESULT", "payload": {"status": "SUCCESS", "payload": {"cache": {"timeStep": 300000, "patternCenter": [224, 506], "patternModel": [0.3573671207012321, 0.34474072213900264, 0.3270747499276627, 0.3161291242738873, 0.3114655996815898, 0.3153417554952327, 0.3052157755336822, 0.29415136454435853, 0.28585098557553046, 0.27958014833493294, 0.2768950569232089, 0.27038093981584055, 0.2624395953925802, 0.25550897704487063, 0.2510886080713419, 0.2429290372949744, 0.2295565758442617, 0.22494906218524235, 0.21972552800582612, 0.20931659541464853, 0.20390067874831352, 0.19442935262115668, 0.19254411969866148, 0.19004300358909454, 0.18505130302915518, 0.17919858470518335, 0.17172814948317772, 0.1651183244583585, 0.16210548333144104, 0.16818794805277548, 0.1577800714529367, 0.15264429518828315, 0.14980975652145112, 0.14487203448896757, 0.14287948608398438, 0.13484175870803483, 0.13330331822380614, 0.13282107420473466, 0.12504374432506182, 0.12778598517540196, 0.11757792575118309, 0.1150447205157139, 0.11790105069902523, 0.11777165550035917, 0.11593259182570748, 0.12071287801768804, 0.10795413893777273, 0.09976886567615395, 0.09373029161407054, 0.08844409636971307, 0.08419153662963552, 0.0764012528843736, 0.07407290092122132, 0.0747967613041638, 0.08311999417781912, 0.09265178015090036, 0.08396736742316868, 0.09193364990825437, 0.08087420418662106, 0.07918910211042451, 0.08300495512697914, 0.07531222265703796, NaN, NaN, NaN, 0.17666574251853895, 0.16327528560600513, 0.15507326287738366, 0.1504145610548484, 0.16710701635328462, 0.17717781713453462, 0.23905349990068814, 0.27464268571239536, 0.27687491902407757, 0.2767763299457098, 0.29299202611890784, 0.30503019403115417, 0.3243992692333144, 0.34191575264944696, 0.3964310985500532, 0.5041374594478292, 0.6033945891816739, 0.6751026931664601, 0.7279994124073088, 0.7967881024894066, 0.8559356635944813, 0.9049211922338447, 0.9547484067362824, 0.9894988496424801, 0.948191497285487, 0.9002271749205502, 0.9638156589884836, 0.993754366278857, 0.9805375438625532, 0.9987161927304022, 1.0483127529338248, 1.0738227438466854, 1.0635716200292915, 1.0500943458686454, 1.0595677262645662, 1.0440553969489699, 1.0823550466763763, 1.124699791574395, 1.1078734317068317, 1.1036061432402011, 1.1285109216187301, 1.1686852353138928, 1.1885251837261652, 1.2050822629766955, 1.1889519125728292, 1.1720975946084167, 1.1495795548136378, 1.1333064709679554, 1.1362935728945978, 1.1088122351694913, 1.0732039201336256, 1.0727139176993532, 1.0709187135858045, 1.0649445097325216, 1.067777106387096, 1.054265988214473, 1.0394261247020662, 1.0267096050715043, 1.0049464338916838, 1.007787859418947, 1.0011338323685663, 0.9827565338652011, 0.9910350734904654, 1.0261121846861752, 1.0349189851940341, 1.038248353085276, 1.05743408203125, 1.0898949039532795, 1.1162373171014313, 1.1052748001785329, 1.1105191505561436, 1.1135915982521176, 1.11913907325874, 1.1270732868491091, 1.1469617940611752, 1.1740164029396194, 1.1962916487354338, 1.1863665243535628, 1.1797198546970886, 1.197742526814089, 1.2218953795352228, 1.2678967492055087, 1.301745175618585, 1.2993613799923978, 1.3213232008077327, 1.3338690288996293, 1.3489752300715043, 1.322585729602343, 1.2964875819319381, 1.285307286149365, 1.2843684826867072, 1.2781382415254239, 1.2619004731705008, 1.2493767172603274, 1.2534733141882946, 1.2262480137711869, 1.180465894439358, 1.155069642147776], "convolveMax": 105.86034940783587, "convolveMin": 92.43902884841232, "windowSize": 81, "convDelMin": 0.0, "convDelMax": 0.0, "confidence": 0.4883484921212933, "jumpHeight": 0.41545467376708983, "jumpLength": 25}}, "_id": "9hP0RENH9wbQRUku"}}
Server exception:
Error: Can`t parse response from analytics as json, see log
    at h._onAnalyticsMessage (/.../hastic/hastic-server-0.3.9/server/dist/server.js:354:25029)
    at emitOne (events.js:116:13)
    at E.emit (events.js:211:7)
    at e.exports.R (/.../hastic/hastic-server-0.3.9/server/dist/server.js:296:41414)
    at emitOne (events.js:116:13)
    at e.exports.emit (events.js:211:7)
    at e.exports.dataMessage (/.../hastic/hastic-server-0.3.9/server/dist/server.js:296:47457)
    at e.exports.getData (/.../hastic/hastic-server-0.3.9/server/dist/server.js:296:46699)
    at e.exports.startLoop (/.../hastic/hastic-server-0.3.9/server/dist/server.js:296:44108)
    at e.exports._write (/.../hastic/hastic-server-0.3.9/server/dist/server.js:296:43463)

is it because of NaN values in json file?

jonyrock commented 4 years ago

@mcichecki would you be so kind to provide steps to reproduce as weel as info about hastic-server?