Logstash 1.5 dies with SyntaxError: (eval):9841: syntax error, unexpected tRBRACK


(Suny Kim) #1

Hi. We are switching to logstash 1.5.0-1 to be able to use Shield. But the --configtest throws
SyntaxError: (eval):9841: syntax error, unexpected tRBRACK
[exception][class] == "javax.servlet.ServletException"
^
eval at org/jruby/RubyKernel.java:1107
initialize at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.0-java/lib/logstash/pipeline.rb:30
execute at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.0-java/lib/logstash/agent.rb:109
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.0-java/lib/logstash/runner.rb:87
call at org/jruby/RubyProc.java:271
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.0-java/lib/logstash/runner.rb:92
call at org/jruby/RubyProc.java:271
initialize at /opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.19/lib/stud/task.rb:12

(The lostash service dies with the same message in *.err).

The config line that kills it is the second line of

    if [exception][message] == "Error while checking if webfilter is cookie session trackable" and
       [exception][class] == "javax.servlet.ServletException" {
        mutate {
            add_field => { "issue" => 103893 }
        }
    }

The config worked with logstash 1.4.2.
If you prefer, I'll raise an github issue.


(Magnus B├Ąck) #2

This is a known bug that was fixed two weeks ago and should end up in 1.5.1.


(Suny Kim) #3

Thanks, it's good to know that it will work with the old configuration again, and until then joining the two lines fixes it.


(system) #4