Logstash upgrade from 2.2 to 2.3 failed

Here is my config, and works well in 2.2.

 cat /etc/logstash/conf.d/logstash.conf 
input {
    redis {
        data_type => "list"
        batch_count => 50
        host => "127.0.0.1"
        key => "logstash"
        password => "mypasswd"
    }
}

filter {
    if ! [type] or ! [tags] {
        drop { }
    }

    if [host] !~ "rtdstest.*" and "throttled" not in [tags] and (
        (
            [loglevel] == "ERROR" and 
            "未知采集器" not in [message] and 
            "数据上报帧里的sid为空" not in [message] and
            "没有对应的Sampler" not in [message] and
            "Connection reset by peer" not in [message]
        ) or
            [loglevel] != "ERROR" and
            "Exception" in [message]
    ) {
        mutate {
            add_tag => [ "alert" ]
            add_field => { "mailto" => "myemail@email.com"}
        }

        if "找不到对应的iid信息" in [message] or
           "未配置功率计算规则!" in [message] {
            mutate {
                update => {
                    "mailto" => "myemail@email.com"
                }
            }
        }
    }
}

output {
    elasticsearch {
        hosts => "127.0.0.1"
    }

    if "alert" in [tags] {
        email {
            address => "smtp.exmail.qq.com"
            authentication => "login"
            username => "username"
            password => "password"
            to => "%{mailto}"
            from => "Logstash<logstash@mydomain.com>"
            body => "%{message}"
            subject => "服务器 %{host} %{type} 日志发现异常, LOGLEVEL-%{loglevel}: %{content}"
        }
    }

    if "slow_query" in [tags] and
        [duration] >= 10000 {
        email {
            address => "smtp.exmail.qq.com"
            authentication => "login"
            username => "username"
            password => "password"
            to => "to@mydomain.com"
            from => "Logstash<logstash@mydomain.com>"
            body => "%{message}"
            subject => "服务器 %{host} %{type} 日志发现慢查询, query耗时: %{duration} ms"
        }
    }
}

But when I upgrade to 2.3, will raise this error:

 /opt/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf  -t
An unexpected error occurred! {:error=>#<NoMethodError: undefined method `config_valid?' for LogStash::Pipeline:Class>, :class=>"NoMethodError", :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.0-java/lib/logstash/agent.rb:169:in `execute'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.0-java/lib/logstash/runner.rb:94:in `run'", "org/jruby/RubyProc.java:281:in `call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.0-java/lib/logstash/runner.rb:99:in `run'", "org/jruby/RubyProc.java:281:in `call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/task.rb:24:in `initialize'"], :level=>:warn}

My OS is ubuntu 14.04, and java version is 1.8.0_77.

Hi, you got same error with me.
Now -t or --configtest not work on 2.3. But you can run with --verbose or --debug. It work fine !

https://github.com/elastic/logstash/issues/4933

Yes, that's it.

Now logstash 2.3 cannot work, and I have to downgrade to 2.2.

with me, all config file working on logstash 2.3. I think you don't need downgrade to 2.2.
When you run --debug, it's showing error config file if it have.

~$ sudo service logstash restart
Configuration error. Not restarting. Re-run with configtest parameter for details

Configuration error. May be logstash 2.3 has been changed some config. But I've checked the official release notes and not found it.

Oh, I know the reason. Because /etc/init.d/logstash script will check config file by using --configtest, but failed.

I try to use /opt/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf --debug to start manually, and it works.

I find another bug: https://github.com/elastic/logstash/issues/4940

Yep, i always use command for testing and check error

/opt/logstash/bin/logstash -f /etc/logstash/conf.d/ --debug

Optional, using -w and -b

https://www.elastic.co/guide/en/logstash/current/pipeline.html

any luck with this? I'm getting the same error.

Because of the wrong --configtestbehavior. So I just delete these lines about --configtest in /etc/init.d/logstash.

Replace the 147 - 151 lines to return 0.

Thanks for that info but even with the removed section the pipeline starts, then crashes.
Any time I try to do /opt/logstash -t -f /blah i get the following

An unexpected error occurred! {:error=>#<NoMethodError: undefined method `config_valid?' for LogStash::Pipeline:Class>, :class=>"NoMethodError", :backtrace=>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.0-java/lib/logstash/agent.rb:169:in `execute'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.0-java/lib/logstash/runner.rb:94:in `run'", "org/jruby/RubyProc.java:281:in `call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.0-java/lib/logstash/runner.rb:99:in `run'", "org/jruby/RubyProc.java:281:in `call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/task.rb:24:in `initialize'"], :level=>:warn}

Because -t|--configtest will not work for this version. Waiting for the fix version.

Yeah I just found that. I suppose i will run in debug mode until I hear what is going on.

Thanks.

the same to you.logstash 2.2 running well

Just wait. The developers have been already fixed this issue. Waiting for the next release soon, see: https://github.com/elastic/logstash/issues/4933