# Use multiple codec in one file input ERROR After upgrade to logstash 6.3

**URL:** <https://discuss.elastic.co/t/use-multiple-codec-in-one-file-input-error-after-upgrade-to-logstash-6-3/142116>\
**Category:** Logstash\
**Created:** [July 30, 2018, 7:59am UTC](https://discuss.elastic.co/t/use-multiple-codec-in-one-file-input-error-after-upgrade-to-logstash-6-3/142116 "2018-07-30T07:59:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![btp2p007](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@btp2p007](https://discuss.elastic.co/u/btp2p007)\
**Post date:** [July 30, 2018, 7:59am UTC](https://discuss.elastic.co/t/use-multiple-codec-in-one-file-input-error-after-upgrade-to-logstash-6-3/142116/1 "2018-07-30T07:59:16Z")

</div>

It is working in the logstash version 5.6 . But not working in 6.3.2 It seems the input can not including two codec parameters . When I delete any one codecs. It is working. How to use both codec in logstash 6.3?

==================================

the input info like this .

input {  
kafka {  
bootstrap\_servers =\> "localhost:9092"  
topics =\> ["pglog","oshistory"]  
codec =\> "json"  
consumer\_threads =\> 2  
decorate\_events =\> true  
type =\> "pglog"  
codec =\> multiline {  
pattern =\> "^\d{4}-\d{1,2}-\d{1,2}"  
negate =\> true  
what =\> previous  
}  
}  
}

=============================

Error in logstash 6.3

[root@db-testnode3 home]# /usr/share/logstash/bin/logstash -f logstash\_postgresql\_xian3.conf  
WARNING: Could not find logstash.yml which is typically located in $LS\_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults  
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console  
[WARN] 2018-07-30 15:50:19.607 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[INFO] 2018-07-30 15:50:21.109 [LogStash::Runner] runner - Starting Logstash {"logstash.version"=\>"6.3.2"}  
[ERROR] 2018-07-30 15:50:24.518 [Converge PipelineAction::Create] agent - Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"TypeError", :message=\>"no implicit conversion of Java::OrgLogstashConfigIrImperative::PluginStatement into String", :backtrace=\>["org/jruby/RubyString.java:1144:in `+'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:119:in`block in expr\_attributes'", "org/jruby/RubyArray.java:1734:in `each'", "org/jruby/RubyEnumerable.java:936:in`inject'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:98:in `expr_attributes'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:76:in`expr'", "org/jruby/RubyArray.java:2486:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:69:in`expr'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:48:in `block in compile'", "org/jruby/RubyArray.java:1734:in`each'", "/usr/share/logstash/logstash-core/lib/logstash/compiler/lscl.rb:46:in `compile'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:46:in`compile\_imperative'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:50:in `compile_graph'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:12:in`block in compile\_sources'", "org/jruby/RubyArray.java:2486:in `map'", "/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:11:in`compile\_sources'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:49:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:167:in`initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:40:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:305:in`block in converge\_state'"]}  
[INFO] 2018-07-30 15:50:25.587 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=\>9600}

=====================================

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 30, 2018, 8:03am UTC](https://discuss.elastic.co/t/use-multiple-codec-in-one-file-input-error-after-upgrade-to-logstash-6-3/142116/2 "2018-07-30T08:03:34Z")

</div>

For any input plugin, you can only specify a single codec, and you have specified `json` and `multiline`. In this case you may need to keep the multiline codec and use a json filter instead of the codec.

---

<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 27, 2018, 8:03am UTC](https://discuss.elastic.co/t/use-multiple-codec-in-one-file-input-error-after-upgrade-to-logstash-6-3/142116/3 "2018-08-27T08:03:34Z")

</div>

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