Can't install Logsatash plugin in Centos


(Abhishek) #1

I am new for elk and trying to install logstash plugin for MongoDB in centos 7.1 but it always say command not found,
Elasticsearch and kibana are working fine, Can you please help me.


(Mark Walkom) #2

What command are you running.
What is the output?


(Abhishek) #3

logstash-plugin install logstash-input-mongodb

and o/p:- command not found


(Mark Walkom) #4

Please provide the entire commands and the output. Paste it directly from your shell.


(Abhishek) #5

[root@localhost bin]# logstash-plugin install logsatash

and o/p:- bash: logstash-plugin: command not found...


(Abhishek) #6

[root@localhost bin]# logstash-plugin list
bash: logstash-plugin: command not found...


(Mark Walkom) #7

What does ls -l in that directory show?


(Abhishek) #8

i found something like

[root@localhost bin]# /usr/share/logstash/bin/logstash-plugin install logstash-input-mongodb
Validating logstash-input-mongodb
Installing logstash-input-mongodb
which: no javac in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin)
which: no javac in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin)
Installation successful

Thanks for help


(Mark Walkom) #9

It doesn't look like you have java installed?


(Abhishek) #10

[root@localhost bin]# java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

java version shows the above output


(Abhishek) #11

but

[root@localhost bin]# /usr/share/logstash/bin/logstash-plugin install logstash-output-mongodb
Validating logstash-output-mongodb
Installing logstash-output-mongodb
Plugin version conflict, aborting
ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "mongo":
In snapshot (Gemfile.lock):
mongo (= 2.4.1)

In Gemfile:
logstash-input-mongodb (>= 0) java depends on
mongo (>= 2.0.0) java

logstash-output-mongodb (>= 0) java depends on
  mongo (~> 2.0.6) java

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "logstash-core":
In snapshot (Gemfile.lock):
logstash-core (= 5.2.0)

In Gemfile:
logstash-core-plugin-api (>= 0) java depends on
logstash-core (= 5.2.0) java

logstash-input-mongodb (>= 0) java depends on
  logstash-core (>= 5.0) java

logstash-output-mongodb (>= 0) java depends on
  logstash-core (< 2.0.0, >= 1.4.0) java

logstash-core (>= 0) java

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "logstash":
In Gemfile:
logstash-output-mongodb (>= 0) java depends on
logstash (< 2.0.0, >= 1.4.0) java
Could not find gem 'logstash (< 2.0.0, >= 1.4.0) java', which is required by gem 'logstash-output-mongodb (>= 0) java', in any of the sources.


(system) #14

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