# Can't install Logsatash plugin in Centos

**URL:** https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977
**Category:** Logstash
**Created:** [February 14, 2017, 7:30am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977 "2017-02-14T07:30:50Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![wolfghost](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfghost/32/15500_2.png) [@wolfghost](https://discuss.elastic.co/u/wolfghost)
#### Post date: [February 14, 2017, 7:30am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/1 "2017-02-14T07:30:50Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 14, 2017, 7:33am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/2 "2017-02-14T07:33:46Z")

</div>

What command are you running.  
What is the output?

---

<div class="post-metadata">

### Author: ![wolfghost](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfghost/32/15500_2.png) [@wolfghost](https://discuss.elastic.co/u/wolfghost)
#### Post date: [February 14, 2017, 7:37am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/3 "2017-02-14T07:37:55Z")

</div>

logstash-plugin install logstash-input-mongodb

and o/p:- command not found

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 14, 2017, 7:38am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/4 "2017-02-14T07:38:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![wolfghost](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfghost/32/15500_2.png) [@wolfghost](https://discuss.elastic.co/u/wolfghost)
#### Post date: [February 14, 2017, 7:45am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/5 "2017-02-14T07:45:23Z")

</div>

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

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

---

<div class="post-metadata">

### Author: ![wolfghost](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfghost/32/15500_2.png) [@wolfghost](https://discuss.elastic.co/u/wolfghost)
#### Post date: [February 14, 2017, 9:44am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/6 "2017-02-14T09:44:14Z")

</div>

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

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 14, 2017, 9:51am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/7 "2017-02-14T09:51:34Z")

</div>

What does `ls -l` in that directory show?

---

<div class="post-metadata">

### Author: ![wolfghost](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfghost/32/15500_2.png) [@wolfghost](https://discuss.elastic.co/u/wolfghost)
#### Post date: [February 14, 2017, 9:55am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/8 "2017-02-14T09:55:13Z")

</div>

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

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 14, 2017, 9:56am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/9 "2017-02-14T09:56:41Z")

</div>

It doesn't look like you have java installed?

---

<div class="post-metadata">

### Author: ![wolfghost](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfghost/32/15500_2.png) [@wolfghost](https://discuss.elastic.co/u/wolfghost)
#### Post date: [February 14, 2017, 10:01am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/10 "2017-02-14T10:01:13Z")

</div>

[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

---

<div class="post-metadata">

### Author: ![wolfghost](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfghost/32/15500_2.png) [@wolfghost](https://discuss.elastic.co/u/wolfghost)
#### Post date: [February 14, 2017, 10:01am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/11 "2017-02-14T10:01:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 14, 2017, 10:05am UTC](https://discuss.elastic.co/t/cant-install-logsatash-plugin-in-centos/74977/14 "2017-03-14T10:05:21Z")

</div>

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