Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--configtest not working on 2.3 (undefined method `config_valid?') #4933

Closed
jraby opened this issue Mar 30, 2016 · 13 comments
Closed

--configtest not working on 2.3 (undefined method `config_valid?') #4933

jraby opened this issue Mar 30, 2016 · 13 comments
Assignees

Comments

@jraby
Copy link

jraby commented Mar 30, 2016

I'm getting the following error on 2 instances of logstash that were upgraded from 2.0 to 2.3, both are running ubuntu 12.04 amd64.

The error occurs when running logstash -f /etc/logstash/conf.d --configtest.
Since the new init script uses configtest when doing a restart, it means /etc/init.d/logstash restart cannot be used.

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}
@suyograo suyograo added the bug label Mar 30, 2016
@suyograo
Copy link
Contributor

thanks, we'll check it out

@jakauppila
Copy link

I'm getting the same error with 2.3.0 on Windows Server 2012 R2. It works fine with 2.2.2.

?[33mAn unexpected error occurred! {:error=>#<NoMethodError: undefined method `config_valid?' for LogStash::Pipeline:Class>, :class=>"NoMethodError", :backtrace=>["D:/Logstash/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.0-java/lib/logstash/agent.rb:169:in `execute'", "D:/Logstash/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'", "D:/Logstash/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'", "D:/Logstash/logstash/vendor/bundle/jruby/1.9/gems/stud-0.0.22/lib/stud/task.rb:24:in `initialize'"], :level=>:warn}?[0m

@berglh
Copy link

berglh commented Mar 31, 2016

My continuous integration testing is failing because of this, please fix 👍

@Slach
Copy link

Slach commented Mar 31, 2016

+1
Ubuntu 14.04
service logstash configtest
failed with same error

my deployment scripts is broken ;) please fix it

@sc0rp10
Copy link

sc0rp10 commented Mar 31, 2016

+1
Ubuntu 14.04
service logstash configtest

o\

jsvd added a commit to jsvd/logstash that referenced this issue Mar 31, 2016
@jsvd
Copy link
Member

jsvd commented Mar 31, 2016

Unfortunately "-t/--config-test" had absolutely no tests, so we never realised it broke 👎

I've created a pr to fix the problem and a basic ok/nok test for the 2.3 branch. I'll create another against master in a few minutes.

Once the fix is merged we should expect a patch release shortly after, as this is a huge bug..

@svenmueller
Copy link

when will this fix be available?

@colinsurprenant
Copy link
Contributor

@svenmueller @AlexClineBB @benlavender @Sakorah We just built a snapshot of 2.3.1 for sanity testing before doing a formal 2.3.1 release as soon as we green light this snapshot. Feel free to test that and let us know if that works for you. +Standard disclaimer about a snapshot release.

@colinsurprenant
Copy link
Contributor

FYI 2.3.1 is released, https://www.elastic.co/blog/logstash-2.3.1-and-2.2.4-released

@jraby
Copy link
Author

jraby commented Apr 7, 2016

thx @colinsurprenant I'll test that.

@Sakorah
Copy link

Sakorah commented Apr 8, 2016

2.3.1 worked for me on ubuntu14.04. I tried an upgrade from 2.3.0 (verified that configtest failed) to 2.3.1 and it worked.

@gaspaio
Copy link

gaspaio commented May 3, 2016

Just stumbled into the error. It bothered me. Google it. Found this issue. Saw it was alreay fixed. Upgraded and everything is fine again.
God I love open-source :-). Many thanx to all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.