Issue with JMX Plugin - No such file or directory - No such directory


I'm experiencing issues when attempting to get the JMX plugin to start via Logstash in a v5 ELK farm.

I have previously installed the jmx plugin via bin/logstash-plugin install logstash-input-jmx and received an error for javac.

I resolved this javac error, then reran the install, no errors after that.

Basically when attempting to start logstash with jmx, it throws a no such file or directory error, even though the jmxconfig file is in the same folder as my bin/logstash -f .conf

[2017-06-27T16:37:32,621][ERROR][logstash.inputs.jmx ] No such file or directory - No such directory: /opt/logstash/logstash-5.4.0/bin/jmx-config
[2017-06-27T16:37:32,621][ERROR][logstash.inputs.jmx ] org/jruby/ initialize' org/jruby/'
/opt/logstash/logstash-5.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-jmx-3.0.2/lib/logstash/inputs/jmx.rb:326:in run' /opt/logstash/logstash-5.4.0/logstash-core/lib/logstash/pipeline.rb:443:ininputworker'
/opt/logstash/logstash-5.4.0/logstash-core/lib/logstash/pipeline.rb:436:in `start_input'

Further through the log it performs the following:

[2017-06-27T16:37:32,731][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<LogStash::ShutdownSignal: LogStash::ShutdownSignal>, :backtrace=>["/opt/logstash/logstash-5.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-jmx-3.0.2/lib/logstash/inputs/jmx.rb:321:in `run'"]}
[2017-06-27T16:37:32,735][DEBUG][logstash.pipeline ] Shutdown waiting for worker thread #Thread:0x68639872

I appreciate any assistance anyone can give resolving this issue.

Thanks again!

The second error message from the log is incomplete. Please post it again but format it as preformatted text using the </> toolbar button.

Hi Magnus,

See below:

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Sending Logstash's logs to /opt/logstash/logstash-5.4.0/logs which is now configured via
[2017-07-05T11:01:29,747][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>250}
[2017-07-05T11:01:29,789][INFO ][logstash.inputs.jmx ] Create queue dispatching JMX requests to threads
[2017-07-05T11:01:29,790][INFO ][logstash.inputs.jmx ] Compile regexp for group alias object replacement
[2017-07-05T11:01:29,795][INFO ][logstash.pipeline ] Pipeline main started
[2017-07-05T11:01:29,804][INFO ][logstash.inputs.jmx ] Initialize 4 threads for JMX metrics collection
[2017-07-05T11:01:29,832][INFO ][logstash.inputs.jmx ] Loading configuration files in path {:path=>"/opt/logstash/logstash-5.4.0/bin/jmx-config"}
[2017-07-05T11:01:29,833][ERROR][logstash.inputs.jmx ] No such file or directory - No such directory: /opt/logstash/logstash-5.4.0/bin/jmx-config
[2017-07-05T11:01:29,833][ERROR][logstash.inputs.jmx ] org/jruby/ initialize' org/jruby/'
/opt/logstash/logstash-5.4.0/vendor/bundle/jruby/1.9/gems/logstash-input-jmx-3.0.2/lib/logstash/inputs/jmx.rb:326:in run' /opt/logstash/logstash-5.4.0/logstash-core/lib/logstash/pipeline.rb:443:ininputworker'
/opt/logstash/logstash-5.4.0/logstash-core/lib/logstash/pipeline.rb:436:in `start_input'
[2017-07-05T11:01:29,867][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2017-07-05T11:01:32,812][WARN ][logstash.agent ] stopping pipeline {:id=>"main"}

It looks like you've configured the input to look for configuration files in /opt/logstash/logstash-5.4.0/bin/jmx-config but that there's no such directory on the machine.

Ok, I thought I just had to have the json file there, not an actual directory containing them. Got it making a connection attempt now.

Thanks for your assistance.

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