# Cyclic reference eror while dissecting source.nat.port

**URL:** https://discuss.elastic.co/t/cyclic-reference-eror-while-dissecting-source-nat-port/319656
**Category:** Beats
**Tags:** filebeat
**Created:** [November 23, 2022, 12:37pm UTC](https://discuss.elastic.co/t/cyclic-reference-eror-while-dissecting-source-nat-port/319656 "2022-11-23T12:37:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![GeorgeGkinis](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@GeorgeGkinis](https://discuss.elastic.co/u/GeorgeGkinis)
#### Post date: [November 23, 2022, 12:37pm UTC](https://discuss.elastic.co/t/cyclic-reference-eror-while-dissecting-source-nat-port/319656/1 "2022-11-23T12:37:59Z")

</div>

i all!

I get the following output when starting filebeat with one processor:

```auto
....
{"log.level":"error","@timestamp":"2022-11-23T13:29:24.875+0100","log.origin":{"file.name":"instance/beat.go","file.line":1057},"message":"Exiting: error initializing processors: cyclic reference detected for key: 'source.nat.port' accessing 'processors.0.dissect.tokenizer' (source:'filebeat-bug.yml')",
"service.name":"filebeat","ecs.version":"1.6.0"}
Exiting: error initializing processors: cyclic reference detected for key: 'source.nat.port' accessing 'processors.0.dissect.tokenizer' (source:'filebeat-bug.yml')

```

The processor config is simplified here (I have more fields to be dissected):

```auto
# ================================= Processors =================================
processors:
  - dissect:
      tokenizer: "NatIP %{source.nat.ip|ip}:${source.nat.port|integer}"
      overwrite_keys: true

```

Any ideas?  
Seems like a bug.

There have been another cyclic reference issue in the past :

> <https://github.com/elastic/beats/issues/6214>
>
> \`\`\`json
> {
> "level": "error",
> "timestamp": "2018-01-29T15:57:07.020-0500",
> …
> "caller": "instance/beat.go:667",
> "message": "Exiting: error initializing publisher: cyclic reference detected for key: 'path.logs' accessing 'output.file.path' (source:'packetbeat.yml')"
> }
> \`\`\`
> 
> \`\`\`yaml
> packetbeat.interfaces.device: en0
> 
> packetbeat.protocols:
> \- type: http
> ports: \[80\]
> 
> output.file:
> path: '${path.logs}'
> filename: output.json
> 
> logging:
> level: info
> json: true
> files:
> name: packetbeat.json
> \`\`\`
> This same config works in 6.1.2.
> 
> Reported by @andrewkroh

filebeat version: 8.5.1 windows zip

---

<div class="post-metadata">

### Author: ![GeorgeGkinis](https://avatars.discourse-cdn.com/v4/letter/g/ecc23a/32.png) [@GeorgeGkinis](https://discuss.elastic.co/u/GeorgeGkinis)
#### Post date: [November 23, 2022, 12:42pm UTC](https://discuss.elastic.co/t/cyclic-reference-eror-while-dissecting-source-nat-port/319656/2 "2022-11-23T12:42:47Z")

</div>

> [@GeorgeGkinis](#):
>
> `"NatIP %{source.nat.ip|ip}:${source.nat.port|integer}"`

Should have been : "%{source.nat.port|integer}" (no $ at srart)

Closing.

---

<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 21, 2022, 2:43pm UTC](https://discuss.elastic.co/t/cyclic-reference-eror-while-dissecting-source-nat-port/319656/3 "2022-12-21T14:43:25Z")

</div>

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