# stuck when execute sgadmin

**URL:** <https://forum.search-guard.com/t/stuck-when-execute-sgadmin/790>\
**Category:** Search Guard\
**Created:** [February 11, 2018, 9:42am UTC](https://forum.search-guard.com/t/stuck-when-execute-sgadmin/790 "2018-02-11T09:42:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![775878550](https://avatars.discourse-cdn.com/v4/letter/7/e56c9b/32.png) [@775878550](https://forum.search-guard.com/u/775878550)\
**Post date:** [February 11, 2018, 9:42am UTC](https://forum.search-guard.com/t/stuck-when-execute-sgadmin/790/1 "2018-02-11T09:42:03Z")

</div>

I installed searchguard plugin into my elasticsearch cluster, which have some data.,but it stuck when excuting sgadmin.sh.

log:

Will connect to 0.0.0.0:9300 … done

Contacting elasticsearch cluster ‘test’ and wait for YELLOW clusterstate …

but when I install searchguard plugin into my elasticsearch cluster, which don’t have data,it works fine.

could u tell me how to install sg to es which have data?

> **···**
>
> * * *
> 
> Search Guard and Elasticsearch version：2.4.1
> 
> Java version :1.8
> 
> operating system version :centos7

---

<div class="post-metadata">

**Author:** ![Fabien\_Wernli](https://avatars.discourse-cdn.com/v4/letter/f/48db29/32.png) [@Fabien\_Wernli](https://forum.search-guard.com/u/Fabien_Wernli)\
**Post date:** [February 12, 2018, 7:21am UTC](https://forum.search-guard.com/t/stuck-when-execute-sgadmin/790/2 "2018-02-12T07:21:46Z")

</div>

sgconfig waits until the cluster state is GREEN.  
Maybe you have set up a number of replica that is too large for the number of nodes in your cluster?  
Check for `curl 0:9200/_cat/health`

---

<div class="post-metadata">

**Author:** ![775878550](https://avatars.discourse-cdn.com/v4/letter/7/e56c9b/32.png) [@775878550](https://forum.search-guard.com/u/775878550)\
**Post date:** [February 22, 2018, 2:17am UTC](https://forum.search-guard.com/t/stuck-when-execute-sgadmin/790/3 "2018-02-22T02:17:19Z")

</div>

my es setting:

number of nodes: 4 (2 nodes, 1 master, 1 client)

number of replica : 1

the largest index is about 2G

I excuted this comond `curl 0:9200/_cat/health`, but it returns searchguard not initualized…

I agree with u that the replica is too large for nodes and the status of es must be red, but how to resolve it?

在 2018年2月12日星期一 UTC+8下午3:21:47，Fabien Wernli写道：

> **···**
>
> > sgconfig waits until the cluster state is GREEN.  
> > Maybe you have set up a number of replica that is too large for the number of nodes in your cluster?  
> > Check for `curl 0:9200/_cat/health`

---

<div class="post-metadata">

**Author:** ![searchguard\_google\_group](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/searchguard_google_group/32/462_2.png) [@searchguard\_google\_group](https://forum.search-guard.com/u/searchguard_google_group)\
**Post date:** [February 22, 2018, 1:05pm UTC](https://forum.search-guard.com/t/stuck-when-execute-sgadmin/790/4 "2018-02-22T13:05:34Z")

</div>

Elasticsearch and Search Guard 2.4.1 is end of life (EOL).  
Therefore we do not longer provide support, pls. upgrade to latest 5.6.x or 6.2.x

> **···**
>
> On Sunday, 11 February 2018 10:42:03 UTC+1, 7…0@…q.com wrote:
> 
> > I installed searchguard plugin into my elasticsearch cluster, which have some data.,but it stuck when excuting sgadmin.sh.
> 
> > log:
> 
> > Will connect to [0.0.0.0:9300](http://0.0.0.0:9300) … done
> 
> > Contacting elasticsearch cluster ‘test’ and wait for YELLOW clusterstate …
> 
> > 
> 
> > but when I install searchguard plugin into my elasticsearch cluster, which don’t have data,it works fine.
> 
> > 
> 
> > could u tell me how to install sg to es which have data?
> 
> > * * *
> 
> > Search Guard and Elasticsearch version：2.4.1
> 
> > Java version :1.8
> 
> > operating system version :centos7
> 
> >
