# Elasticsearch failed: Caused by: java.lang.IllegalArgumentException: Plugin \[search-guard-5\] was built for Elasticsearch version 5.4.0 but version 7.0.1 is running

**URL:** <https://discuss.elastic.co/t/elasticsearch-failed-caused-by-java-lang-illegalargumentexception-plugin-search-guard-5-was-built-for-elasticsearch-version-5-4-0-but-version-7-0-1-is-running/181428>\
**Category:** Elasticsearch\
**Created:** [May 16, 2019, 2:26pm UTC](https://discuss.elastic.co/t/elasticsearch-failed-caused-by-java-lang-illegalargumentexception-plugin-search-guard-5-was-built-for-elasticsearch-version-5-4-0-but-version-7-0-1-is-running/181428 "2019-05-16T14:26:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bader](https://avatars.discourse-cdn.com/v4/letter/b/13edae/32.png) [@Bader](https://discuss.elastic.co/u/Bader)\
**Post date:** [May 16, 2019, 2:26pm UTC](https://discuss.elastic.co/t/elasticsearch-failed-caused-by-java-lang-illegalargumentexception-plugin-search-guard-5-was-built-for-elasticsearch-version-5-4-0-but-version-7-0-1-is-running/181428/1 "2019-05-16T14:26:23Z")

</div>

Hi, I am relatively new to ELK stack and am trying to set it up (version 7.0.1) on a CentOS virtual box. I have Kibana and Logstash up and running, and my only problem is with Elasticsearch. I can always get it running for a couple minutes, then it fails and through the log, I always get a new reason which I try to fix. However, now I am completely stuck. It says that search-guard-5 is built, even though I have actually built search-guard-7 (/usr/share/elasticsearch/bin/elasticsearch-plugin install -b com.floragunn:search-guard-7:7.0.1-35.0.0). however, if I do  
(/usr/share/elasticsearch/bin/elasticsearch-plugin list) I get search-guard-5 is built. If I try to remove it, using (/usr/share/elasticsearch/bin/elasticsearch-plugin remove search-guard-5) I get (ERROR: plugin [search-guard-5] not found; run 'elasticsearch-plugin list' to get list of installed plugins). I can't seem to find a way to overcome this. Please let me know what you need to me provide so I can do that ASAP.  
Appreciate any help.  
Bader

---

<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:** [June 13, 2019, 2:26pm UTC](https://discuss.elastic.co/t/elasticsearch-failed-caused-by-java-lang-illegalargumentexception-plugin-search-guard-5-was-built-for-elasticsearch-version-5-4-0-but-version-7-0-1-is-running/181428/2 "2019-06-13T14:26:25Z")

</div>

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