RangeError: Invalid typed array length

Hi I'm trying to generate CSV reports from kibana however no matter what subset of data I try and export I get the same error RangeError: Invalid typed array length.

I'm running version 6.2.2 on filebeat, logstash, kibana and elasticsearch. I have the basic licence setup and configured:

elasticsearch-6.2.2-1.noarch
{
  "license" : {
    "status" : "active",
    "uid" : "***",
    "type" : "basic",
    "issue_date" : "2018-05-01T00:00:00.000Z",
    "issue_date_in_millis" : ...,
    "expiry_date" : "2019-05-01T23:59:59.999Z",
    "expiry_date_in_millis" : ...,
    "max_nodes" : 100,
    "issued_to" : "...",
    "issuer" : "...",
    "start_date_in_millis" : ...
  }
}

Error message from Kibana UI: There was an error generating your report for the "test" search: RangeError: Invalid typed array length

Log entries from around the time I attempted to generate the report:

<kibana_server_url>/api/reporting/generate/csv?jobParams=(conflictedTypesFields:!(),fields:!(%27@timestamp%27,message),indexPatternId:filebeat-6.2.2,metaFields:!(_source,_id,_type,_index,_score),searchRequest:(body:(_source:(excludes:!(),includes:!(%27@timestamp%27,message)),docvalue_fields:!(%27@timestamp%27),query:(bool:(filter:!(),must:!((match_all:()),(match_phrase:(nginx.access.geoip.ip:(query:<some_ip_address>))),(range:(%27@timestamp%27:(format:epoch_millis,gte:1525163938560,lte:1525164838560)))),must_not:!(),should:!())),script_fields:(),sort:!((%27@timestamp%27:(order:desc,unmapped_type:boolean))),stored_fields:!(%27@timestamp%27,message),version:!t),index:%27filebeat-6.2.2*%27),title:test,type:search)


{"type":"response","@timestamp":"2018-05-01T08:54:38Z","tags":[],"pid":1428,"method":"post","statusCode":200,"req":{"url":"/api/reporting/generate/csv?jobParams=(conflictedTypesFields%3A!()%2Cfields%3A!('%40timestamp'%2Cmessage)%2CindexPatternId%3Afilebeat-6.2.2%2CmetaFields%3A!(_source%2C_id%2C_type%2C_index%2C_score)%2CsearchRequest%3A(body%3A(_source%3A(excludes%3A!()%2Cincludes%3A!('%40timestamp'%2Cmessage))%2Cdocvalue_fields%3A!('%40timestamp')%2Cquery%3A(bool%3A(filter%3A!()%2Cmust%3A!((match_all%3A())%2C(match_phrase%3A(nginx.access.geoip.ip%3A(query%3A'<some_ip_address>')))%2C(range%3A('%40timestamp'%3A(format%3Aepoch_millis%2Cgte%3A1525163978852%2Clte%3A1525164878852))))%2Cmust_not%3A!()%2Cshould%3A!()))%2Cscript_fields%3A()%2Csort%3A!(('%40timestamp'%3A(order%3Adesc%2Cunmapped_type%3Aboolean)))%2Cstored_fields%3A!('%40timestamp'%2Cmessage)%2Cversion%3A!t)%2Cindex%3A'filebeat-6.2.2*')%2Ctitle%3Atest%2Ctype%3Asearch)","method":"post","headers":{"host":"kibana","connection":"close","content-length":"2","accept":"application/json, text/plain, */*","origin":"<kibana_server_url>","kbn-version":"6.2.2","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36","content-type":"application/json;charset=UTF-8","referer":"<kibana_server_url>/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-GB,en;q=0.9"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"<kibana_server_url>/app/kibana"},"res":{"statusCode":200,"responseTime":142,"contentLength":9},"message":"POST /api/reporting/generate/csv?jobParams=(conflictedTypesFields%3A!()%2Cfields%3A!('%40timestamp'%2Cmessage)%2CindexPatternId%3Afilebeat-6.2.2%2CmetaFields%3A!(_source%2C_id%2C_type%2C_index%2C_score)%2CsearchRequest%3A(body%3A(_source%3A(excludes%3A!()%2Cincludes%3A!('%40timestamp'%2Cmessage))%2Cdocvalue_fields%3A!('%40timestamp')%2Cquery%3A(bool%3A(filter%3A!()%2Cmust%3A!((match_all%3A())%2C(match_phrase%3A(nginx.access.geoip.ip%3A(query%3A'<some_ip_address>')))%2C(range%3A('%40timestamp'%3A(format%3Aepoch_millis%2Cgte%3A1525163978852%2Clte%3A1525164878852))))%2Cmust_not%3A!()%2Cshould%3A!()))%2Cscript_fields%3A()%2Csort%3A!(('%40timestamp'%3A(order%3Adesc%2Cunmapped_type%3Aboolean)))%2Cstored_fields%3A!('%40timestamp'%2Cmessage)%2Cversion%3A!t)%2Cindex%3A'filebeat-6.2.2*')%2Ctitle%3Atest%2Ctype%3Asearch) 200 142ms - 9.0B"}


{"type":"response","@timestamp":"2018-05-01T08:54:47Z","tags":[],"pid":1428,"method":"get","statusCode":200,"req":{"url":"/api/reporting/jobs/list?ids=jgnfsg8o013o6574d91z32xb","method":"get","headers":{"host":"kibana","connection":"close","accept":"application/json, text/plain, */*","kbn-system-api":"true","kbn-version":"6.2.2","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36","referer":"<kibana_server_url>/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-GB,en;q=0.9"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"<kibana_server_url>/app/kibana"},"res":{"statusCode":200,"responseTime":10,"contentLength":9},"message":"GET /api/reporting/jobs/list?ids=jgnfsg8o013o6574d91z32xb 200 10ms - 9.0B"}

How can I get reporting to work in kibana, this is an essential requirement for us

@stevesimpson I've been unable to replicate the error that you're seeing, but it alludes to a really large document causing the CSV export process to fail. Could you try only selecting the timestamp field field and generating a CSV to see if you still experience this issue?

@Brandon_Kobel - Appreciate the investigation. I did try limiting the csv to use a really tiny subset of data so I'd be fairly confident it wasn't hitting any size limitations.

Since posting I've upgraded the cluster to the latest release (6.2.4) and reporting is now working again. I'm unable to determine what "fixed" the issue.

As this has not been documented anywhere else on the forums or reported as a bug (that I can see), I'll assume this was down to a configuration issue at my end.

Thanks again!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.