KBN 7.17.14/ROR 1.64.2 SyntaxError: Unexpected token < in JSON at position 0

Hello,

I am currently using ELK version 7.17.14, yesterday upgraded Free ROR for KBN & ES from 1.54 to 1.64.2 and today I’ve found some error message when checking running kibana services status:

kibana[XXX]: SyntaxError: Unexpected token < in JSON at position 0
kibana[XXX]:     at JSON.parse (<anonymous>)
kibana[XXX]:     at /kibana_XXX/plugins/readonlyrestkbn/proxy/preElasticsearchProxy/requestInterceptor.js:1:1854
kibana[XXX]:     at /kibana_XXX/plugins/readonlyrestkbn/node_modules/express-http-proxy/app/steps/decorateUserRes.js:69:14
kibana[XXX]:     at processTicksAndRejections (node:internal/process/task_queues:95:5)

or

kibana[XXX]: [timestamp] [error][plugins][ReadonlyREST][lazyUtils] Caught an error in executeWithInterval FetchError: invalid json response body at http://localhost:XXX/.readonlyrest_kbn_sessions_XXX/_search reason: Unexpected token < in JSON at position 0
kibana[XXX]:     at /kibana_XXX/plugins/readonlyrestkbn/node_modules/node-fetch/lib/index.js:273:32
kibana[XXX]:     at processTicksAndRejections (node:internal/process/task_queues:95:5) {
kibana[XXX]:   type: 'invalid-json'
kibana[XXX]: }

Looking at these files I cannot figure out what is wrong.
I also cannot replicate this event myself but multiple kibana instances have it once at similar timestamp.
Could there be any problem with Kibana or maybe specific user actions or the plugin module files?

Regards,
Michał

Hello @mikeIT

yesterday upgraded Free ROR for KBN & ES from 1.54 to 1.64.2

Did you follow an upgrading procedure for a ReadonlyREST KBN and ES plugins?

Could there be any problem with Kibana or maybe specific user actions or the plugin module files?

At first glance, the call for sessions from the session indices returns non non-JSON response. Could you send full ES and KBN logs and your kibana.yml and readonlyrest.yml config files as a private message?

Oh, I’m sorry, but after deeper analysis it turned out that the above errors were most likely caused by some temporary network problems in communication with one node within cluster (and occured once and only during that time).

Did you follow an upgrading procedure for a ReadonlyREST KBN and ES plugins?

Yes, I did. Everything according to the documentation :slight_smile:

Thank you.

1 Like