# Filebeat \> logstash "Invalid FieldReference" in the log

**URL:** https://discuss.elastic.co/t/filebeat-logstash-invalid-fieldreference-in-the-log/289747
**Category:** Logstash
**Created:** [November 20, 2021, 5:18pm UTC](https://discuss.elastic.co/t/filebeat-logstash-invalid-fieldreference-in-the-log/289747 "2021-11-20T17:18:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gyurgyalag](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@gyurgyalag](https://discuss.elastic.co/u/gyurgyalag)
#### Post date: [November 20, 2021, 5:18pm UTC](https://discuss.elastic.co/t/filebeat-logstash-invalid-fieldreference-in-the-log/289747/1 "2021-11-20T17:18:47Z")

</div>

seems there are similare topics to this without answer [1](https://discuss.elastic.co/t/beats-input-org-logstash-fieldreference-illegalsyntaxexception-invalid-fieldreference-string/267781)  
and one suggests there is no solution [2](https://discuss.elastic.co/t/how-do-i-fix-invalid-fieldreference-errors/283912/2)

But I ask anyway maybe somebody can help.  
This is the error:

```auto
^[[Alogstash | [2021-11-20T16:57:20,868][INFO][org.logstash.beats.BeatsHandler][main][49528894cc63845bf064fe8ec459595546be7d5bed825120377ffc0e6b836dd2] [local: 172.22.0.11:5044, remote: 139.162.166.68:42394] Handling exception: org.logstash.FieldReference$IllegalSyntaxException: Invalid FieldReference: `/UserAttribute[@ldap:targetAttribute="FullName"]` (caused by: org.logstash.FieldReference$IllegalSyntaxException: Invalid FieldReference: `/UserAttribute[@ldap:targetAttribute="FullName"]`)
logstash | [2021-11-20T16:57:20,869][WARN][io.netty.channel.DefaultChannelPipeline][main][49528894cc63845bf064fe8ec459595546be7d5bed825120377ffc0e6b836dd2] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.

```

as I understand the issue is caused by the '' square brackets, is there anything I can do on the filebeat or logstash side? In logstash i would be happy to even drop these messages if needed or just delete the content of the 'json' field. Or even log them into a file, just to see the full message, whether it appears in the key or value field.

The problem is that filebeats sends all the messages to logstash for a while, and maybe because too much of these exceptions (?) it just stops forwarding messages, I only get these exceptions in the log. After restarting the filebeats service everything again flowing for a short while.

---

<div class="post-metadata">

### Author: ![grumo35](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grumo35/32/59451_2.png) [@grumo35](https://discuss.elastic.co/u/grumo35)
#### Post date: [November 22, 2021, 2:47pm UTC](https://discuss.elastic.co/t/filebeat-logstash-invalid-fieldreference-in-the-log/289747/2 "2021-11-22T14:47:38Z")

</div>

> [@gyurgyalag](#):
>
> ```auto
> 
> ```

Can you show your config ? did you try to escape [ with \ ?

---

<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: [December 20, 2021, 2:47pm UTC](https://discuss.elastic.co/t/filebeat-logstash-invalid-fieldreference-in-the-log/289747/3 "2021-12-20T14:47:40Z")

</div>

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