# Thrift parse exception | runtime error: index out of range

**URL:** <https://discuss.elastic.co/t/thrift-parse-exception-runtime-error-index-out-of-range/142467>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [August 1, 2018, 6:06am UTC](https://discuss.elastic.co/t/thrift-parse-exception-runtime-error-index-out-of-range/142467 "2018-08-01T06:06:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![npallavi](https://avatars.discourse-cdn.com/v4/letter/n/4bbf92/32.png) [@npallavi](https://discuss.elastic.co/u/npallavi)\
**Post date:** [August 1, 2018, 6:06am UTC](https://discuss.elastic.co/t/thrift-parse-exception-runtime-error-index-out-of-range/142467/1 "2018-08-01T06:06:14Z")

</div>

Hi,

Packetbeat is continuosly throwing the following exception for thrift-rpc monitoring:

ERROR runtime/panic.go:28 ParseThrift exception. Recovering, but please report this.{"panic": "runtime error: index out of range", "stack": "[github.com/elastic/beats/libbeat/logp.Recover\n\t/go/src/github.com/elastic/beats/libbeat/logp/global.go:88\nruntime.call32\n\t/usr/local/go/src/runtime/asm\_amd64.s:509\nruntime.gopanic\n\t/usr/local/go/src/runtime/panic.go:491\nruntime.panicindex\n\t/usr/local/go/src/runtime/panic.go:28\ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://github.com/elastic/beats/libbeat/logp.Recover%5Cn%5Ct/go/src/github.com/elastic/beats/libbeat/logp/global.go:88%5Cnruntime.call32%5Cn%5Ct/usr/local/go/src/runtime/asm_amd64.s:509%5Cnruntime.gopanic%5Cn%5Ct/usr/local/go/src/runtime/panic.go:491%5Cnruntime.panicindex%5Cn%5Ct/usr/local/go/src/runtime/panic.go:28%5Cngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).readStruct\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:606\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).([github.com/elastic/beats/packetbeat/protos/thrift.readStruct](http://github.com/elastic/beats/packetbeat/protos/thrift.readStruct))-fm\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:680\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).readListOrSet\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:494\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).readList\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:522\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).([github.com/elastic/beats/packetbeat/protos/thrift.readList](http://github.com/elastic/beats/packetbeat/protos/thrift.readList))-fm\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:674\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).readStruct\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:625\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).([github.com/elastic/beats/packetbeat/protos/thrift.readStruct](http://github.com/elastic/beats/packetbeat/protos/thrift.readStruct))-fm\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:680\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).readField\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:713\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).messageParser\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:765\[ngithub.com/elastic/beats/packetbeat/protos/thrift.(\*thriftPlugin](http://ngithub.com/elastic/beats/packetbeat/protos/thrift.(*thriftPlugin)).Parse\n\t/go/src/github.com/elastic/beats/packetbeat/protos/thrift/thrift.go:938\[ngithub.com/elastic/beats/packetbeat/protos/tcp.(\*TCPStream](http://ngithub.com/elastic/beats/packetbeat/protos/tcp.(*TCPStream)).addPacket\n\t/go/src/github.com/elastic/beats/packetbeat/protos/tcp/tcp.go:127\[ngithub.com/elastic/beats/packetbeat/protos/tcp.(\*TCP](http://ngithub.com/elastic/beats/packetbeat/protos/tcp.(*TCP)).Process\n\t/go/src/github.com/elastic/beats/packetbeat/protos/tcp/tcp.go:222\[ngithub.com/elastic/beats/packetbeat/decoder.(\*Decoder](http://ngithub.com/elastic/beats/packetbeat/decoder.(*Decoder)).onTCP\n\t/go/src/github.com/elastic/beats/packetbeat/decoder/decoder.go:317\[ngithub.com/elastic/beats/packetbeat/decoder.(\*Decoder](http://ngithub.com/elastic/beats/packetbeat/decoder.(*Decoder)).process\n\t/go/src/github.com/elastic/beats/packetbeat/decoder/decoder.go:258\[ngithub.com/elastic/beats/packetbeat/decoder.(\*Decoder](http://ngithub.com/elastic/beats/packetbeat/decoder.(*Decoder)).OnPacket\n\t/go/src/github.com/elastic/beats/packetbeat/decoder/decoder.go:164\[ngithub.com/elastic/beats/packetbeat/sniffer.(\*Sniffer](http://ngithub.com/elastic/beats/packetbeat/sniffer.(*Sniffer)).Run\n\t/go/src/github.com/elastic/beats/packetbeat/sniffer/sniffer.go:193\[ngithub.com/elastic/beats/packetbeat/beater.(\*packetbeat](http://ngithub.com/elastic/beats/packetbeat/beater.(*packetbeat)).Run.func2\n\t/go/src/github.com/elastic/beats/packetbeat/beater/packetbeat.go:202"}

Found an old issue here: [Packetbeat 5.6.1 - Thrift Protocol Error - index out of range](https://discuss.elastic.co/t/packetbeat-5-6-1-thrift-protocol-error-index-out-of-range/101635)

Any plans for fixing this in the upcoming releases? We unable to use Packetbeat because of this due to possible data loss.

- 

Thanks,  
Pallavi

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [August 1, 2018, 4:01pm UTC](https://discuss.elastic.co/t/thrift-parse-exception-runtime-error-index-out-of-range/142467/2 "2018-08-01T16:01:20Z")

</div>

I followed up at [https://github.com/elastic/beats/issues/995#issuecomment-409626074](https://github.com/elastic/beats/issues/995#issuecomment-409626074).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 29, 2018, 4:01pm UTC](https://discuss.elastic.co/t/thrift-parse-exception-runtime-error-index-out-of-range/142467/3 "2018-08-29T16:01:20Z")

</div>

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