Afer configuring the impa plugin on logstash and running the following command:
bin/logstash -f email_log.conf --path.data /var/lib/logstash/imap --config.reload.automatic
I get the following error:
[ERROR] 2018-06-06 13:33:11.795 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] agent - Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, => at line 13, column 20 (byte 214) after output {\n stdout { codec ", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:42: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:51:in
initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:169: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:315:in block in converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in
with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:312:in block in converge_state'", "org/jruby/RubyArray.java:1734:in
each'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:299:in converge_state'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:166:in
block in converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:141:in with_pipelines'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:164:in
converge_state_and_update'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:105:in block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/interval.rb:18:in
interval'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:94:in execute'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:348:in
block in execute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:24:in `block in initialize'"]}
Checking at line 13 on the script task.rb I can see the following
class Task
... the full code output is:
require "thread"
require "stud/interval"
module Stud
A Task spawns a thread to execute the given block. execution completion and result retrieval is
done using the Task#wait method. A Task is run once and the thread exists upon block completion.
A task and its underlying thread are not reusable.
Task does not provide a mean to force-interrupt a running task, it only provides the #stop!
method to signal the task for a stop request. The task or code block can use the #stop? method
to check for a stop request. Note that the #stop! and #stop? methods are thread safe.
class Task
# provide access to the underlying thread if ever needed.
attr_reader :thread
def initialize(*args, &block)
# A queue to receive the result of the block
# TODO(sissel): Don't use a queue, just store it in an instance variable.
@queue = Queue.new
@thread = Thread.new(@queue, *args) do |queue, *args|
begin
result = block.call(*args)
queue << [:return, result]
rescue => e
queue << [:exception, e]
end
end # thread
end # def initialize
# wait waits for the task thread to complete and return the block return value
# if the block raises an exception, this exception is propagated in this
# wait method.
# @return [Object, Exception] block return value
def wait
@thread.join
reason, result = @queue.pop
if reason == :exception
#raise StandardError.new(result)
raise result
else
return result
end
end # def wait
# stop! requests the task to stop. the Thread#wakeup method is also
# called so that a sleeping task is waked up and has a chance to verify
# the stop request using the #stop? method. also see Stud.stop!
def stop!
Stud.stop!(@thread)
end
# stop? returns true if this task stop! has been called
# See Stud.stop?
# @return [Boolean] true if the stop! has been called
def stop?
Stud.stop?(@thread)
end
alias_method :interrupted?, :stop?
end # class Task
end # module Stud
Is anybody able to assist with this error please, as the error notification seems to be pointing to the wrong place, else there may be a bug with this module on Elasticsearch 6.2.0