Hello,
I'm receiving an error every time I open a Dashboard or Visualize.
Error in visualisation
[esaggs] > Unexpected token < in JSON at position 0
It's now clear to me that the error is caused by some timeout, because it always happens after 10 seconds, but I'm not sure which timeout is causing that.
Turned on verbose logging on Kibana and got following logs:
Kibana Verbose Logs
{"type":"ops","@timestamp":"2020-03-09T19:13:26-03:00","tags":[],"pid":8,"os":{"load":[0.18310546875,0.314453125,0.22314453125],"mem":{"total":33567559680,"free":10468941824},"uptime":13936089},"proc":{"uptime":200.982,"mem":{"rss":407814144,"heapTotal":330158080,"heapUsed":231994544,"external":2062262},"delay":0.15028762817382812},"load":{"requests":{"5601":{"total":0,"disconnects":0,"statusCodes":{}}},"responseTimes":{"5601":{"avg":null,"max":0}},"sockets":{"http":{"total":0},"https":{"total":0}}},"message":"memory: 221.2MB uptime: 0:03:21 load: [0.18 0.31 0.22] delay: 0.150"} {"type":"log","@timestamp":"2020-03-09T19:13:27-03:00","tags":["debug","connection","econnreset"],"pid":8,"message":"ECONNRESET: Socket was closed by the client (probably the browser) before it could be read completely"} {"type":"response","@timestamp":"2020-03-09T19:13:17-03:00","tags":[],"pid":8,"method":"post","statusCode":200,"req":{"url":"/elasticsearch/idx-access-apache-*/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1583791984684&timeout=30000ms","method":"post","headers":{"host":"elastic.example.com","content-length":"569","accept":"application/json, text/plain, */*","origin":"http://elastic.example.com","kbn-version":"7.6.0","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36","content-type":"application/json","referer":"http://elastic.example.com/s/capacidade/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7"},"remoteAddress":"10.0.4.8","userAgent":"10.0.4.8","referer":"http://elastic.example.com/s/capacidade/app/kibana"},"res":{"statusCode":200,"responseTime":10011,"contentLength":9},"message":"POST /elasticsearch/idx-access-apache-*/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1583791984684&timeout=30000ms 200 10011ms - 9.0B"} {"type":"log","@timestamp":"2020-03-09T19:13:27-03:00","tags":["debug","connection","econnreset"],"pid":8,"message":"ECONNRESET: Socket was closed by the client (probably the browser) before it could be read completely"} {"type":"response","@timestamp":"2020-03-09T19:13:17-03:00","tags":[],"pid":8,"method":"post","statusCode":200,"req":{"url":"/elasticsearch/idx-access-apache-*/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1583791984684&timeout=30000ms","method":"post","headers":{"host":"elastic.example.com","content-length":"895","accept":"application/json, text/plain, */*","origin":"http://elastic.example.com","kbn-version":"7.6.0","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36","content-type":"application/json","referer":"http://elastic.example.com/s/capacidade/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7"},"remoteAddress":"10.0.4.12","userAgent":"10.0.4.12","referer":"http://elastic.example.com/s/capacidade/app/kibana"},"res":{"statusCode":200,"responseTime":10005,"contentLength":9},"message":"POST /elasticsearch/idx-access-apache-*/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1583791984684&timeout=30000ms 200 10005ms - 9.0B"} {"type":"log","@timestamp":"2020-03-09T19:13:27-03:00","tags":["debug","connection","econnreset"],"pid":8,"message":"ECONNRESET: Socket was closed by the client (probably the browser) before it could be read completely"} {"type":"response","@timestamp":"2020-03-09T19:13:17-03:00","tags":[],"pid":8,"method":"post","statusCode":200,"req":{"url":"/elasticsearch/idx-access-apache-*/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1583791984684&timeout=30000ms","method":"post","headers":{"host":"elastic.example.com","content-length":"1269","accept":"application/json, text/plain, */*","origin":"http://elastic.example.com","kbn-version":"7.6.0","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36","content-type":"application/json","referer":"http://elastic.example.com/s/capacidade/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7"},"remoteAddress":"10.0.4.12","userAgent":"10.0.4.12","referer":"http://elastic.example.com/s/capacidade/app/kibana"},"res":{"statusCode":200,"responseTime":10004,"contentLength":9},"message":"POST /elasticsearch/idx-access-apache-*/_search?rest_total_hits_as_int=true&ignore_unavailable=true&ignore_throttled=true&preference=1583791984684&timeout=30000ms 200 10004ms - 9.0B"} {"type":"response","@timestamp":"2020-03-09T19:13:27-03:00","tags":[],"pid":8,"method":"get","statusCode":304,"req":{"url":"/bundles/kbn-ui-shared-deps/icon.alert-js.js","method":"get","headers":{"host":"elastic.example.com","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36","accept":"*/*","referer":"http://elastic.example.com/s/capacidade/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7","if-none-match":"\"3a009975e26e70e6af7e541592cdaf91e7a1ad8f-/bundles/kbn-ui-shared-deps/-gzip\""},"remoteAddress":"10.0.4.8","userAgent":"10.0.4.8","referer":"http://elastic.example.com/s/capacidade/app/kibana"},"res":{"statusCode":304,"responseTime":8,"contentLength":9},"message":"GET /bundles/kbn-ui-shared-deps/icon.alert-js.js 304 8ms - 9.0B"} {"type":"response","@timestamp":"2020-03-09T19:13:27-03:00","tags":[],"pid":8,"method":"get","statusCode":304,"req":{"url":"/bundles/kbn-ui-shared-deps/icon.cross-js.js","method":"get","headers":{"host":"elastic.example.com","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36","accept":"*/*","referer":"http://elastic.example.com/s/capacidade/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7","if-none-match":"\"ec36547acf2783e01382df96ab8d14630e9fb8aa-/bundles/kbn-ui-shared-deps/-gzip\""},"remoteAddress":"10.0.4.12","userAgent":"10.0.4.12","referer":"http://elastic.example.com/s/capacidade/app/kibana"},"res":{"statusCode":304,"responseTime":10,"contentLength":9},"message":"GET /bundles/kbn-ui-shared-deps/icon.cross-js.js 304 10ms - 9.0B"}
I appreciate anyone's help with this.