# Custom input codec configuration

**URL:** <https://discuss.elastic.co/t/custom-input-codec-configuration/197120>\
**Category:** Logstash\
**Created:** [August 28, 2019, 12:58pm UTC](https://discuss.elastic.co/t/custom-input-codec-configuration/197120 "2019-08-28T12:58:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DottorP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dottorp/32/52891_2.png) [@DottorP](https://discuss.elastic.co/u/DottorP)\
**Post date:** [August 28, 2019, 12:58pm UTC](https://discuss.elastic.co/t/custom-input-codec-configuration/197120/1 "2019-08-28T12:58:42Z")

</div>

Hi everybody.  
I'm working on my very first codec for Logstash pipeline. The code itself works (according to unit tests).  
This is the input configuration in LS pipeline:

```
input {
	jdbc {
		#stuff
		statement => "select * from mytable"
		codec => my_awesome_codec{}
	}
}

```

I receive this error when starting pipeline:

```
[2019-08-28T13:04:23,492][FATAL][logstash.runner] The given configuration is invalid. Reason: java.lang.NoSuchMethodException: my.package.MyAwesomeCodec.<init>(co.elastic.logstash.api.Configuration,co.elastic.logstash.api.Context)
[2019-08-28T13:04:23,523][ERROR][org.logstash.Logstash] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

```

What could be the reason?

---

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [August 28, 2019, 2:50pm UTC](https://discuss.elastic.co/t/custom-input-codec-configuration/197120/2 "2019-08-28T14:50:40Z")

</div>

Run trace on the logstash.runner

---

<div class="post-metadata">

**Author:** ![DottorP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dottorp/32/52891_2.png) [@DottorP](https://discuss.elastic.co/u/DottorP)\
**Post date:** [August 28, 2019, 3:44pm UTC](https://discuss.elastic.co/t/custom-input-codec-configuration/197120/3 "2019-08-28T15:44:59Z")

</div>

> [@pastechecker](#):
>
> Run trace on the logstash.runner

Please, could you be more detailed? I'm totally new to the ELK stack.  
Anyway, I was calling an old version of the plugin, which was missing a constructor with `(co.elastic.logstash.api.Configuration,co.elastic.logstash.api.Context)`. Now I'm calling the right plugin, but the configuration is still invalid. This time the reason is unknown (for me), even adding `--log.level trace` as a parameter for logstash's executable.

---

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [August 30, 2019, 8:03am UTC](https://discuss.elastic.co/t/custom-input-codec-configuration/197120/4 "2019-08-30T08:03:51Z")

</div>

> [@pastechecker](#):
>
> logstash.runner

You can do it as follows:  
curl -XPUT '127.0.0.1:9600/\_node/logging?pretty' -H 'Content-Type: application/json' -d'  
{  
"logger.logstash.runner" : "TRACE"  
}  
'

note: this setting will not survive logstash restart and must be placed in the logstash.yml

---

<div class="post-metadata">

**Author:** ![DottorP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dottorp/32/52891_2.png) [@DottorP](https://discuss.elastic.co/u/DottorP)\
**Post date:** [August 30, 2019, 8:24am UTC](https://discuss.elastic.co/t/custom-input-codec-configuration/197120/5 "2019-08-30T08:24:48Z")

</div>

Thanks, I'll try.

---

<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:** [September 27, 2019, 8:24am UTC](https://discuss.elastic.co/t/custom-input-codec-configuration/197120/6 "2019-09-27T08:24:52Z")

</div>

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