# "failed to load plugin class" When using Sgadmin

**URL:** <https://forum.search-guard.com/t/failed-to-load-plugin-class-when-using-sgadmin/1284>\
**Category:** Search Guard\
**Created:** [January 16, 2019, 9:30am UTC](https://forum.search-guard.com/t/failed-to-load-plugin-class-when-using-sgadmin/1284 "2019-01-16T09:30:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voortexx](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@Voortexx](https://forum.search-guard.com/u/Voortexx)\
**Post date:** [January 16, 2019, 9:30am UTC](https://forum.search-guard.com/t/failed-to-load-plugin-class-when-using-sgadmin/1284/1 "2019-01-16T09:30:01Z")

</div>

Elasticsearch and Search Guard version : 6.3.2

Entreprise Module : Disabled

JVM Version : 1.8.0\_111

Operating System : Debian 9

Hello,

I want to change the ID and the password for the Admin user on Search Guard, so i used the hash.sh tool to generate my hashed password.

After that, i opened my sg\_internal\_user.yml located in the Search Guard directory of my master node.

After modified the file with my new hashed password, i had to apply my modification to the whole cluster, so

i runned sgadmin.sh. Then i get this error :

WARNING: Seems you want connect to the Elasticsearch HTTP port.

sgadmin connects on the transport port which is normally 9300.

Will connect to 10.15.20.160:9200 … done

10:27:12.088 [main] ERROR com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore - Your keystore or PEM does not contain a certificate. Maybe you confused keys and certificates.

ERR: An unexpected IllegalStateException occured: failed to load plugin class [com.floragunn.searchguard.SearchGuardPlugin]

Trace:

java.lang.IllegalStateException: failed to load plugin class [com.floragunn.searchguard.SearchGuardPlugin]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:701)

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:114)

at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:107)

at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:132)

at org.elasticsearch.client.transport.TransportClient.(TransportClient.java:269)

at com.floragunn.searchguard.tools.SearchGuardAdmin$TransportClientImpl.(SearchGuardAdmin.java:886)

at com.floragunn.searchguard.tools.SearchGuardAdmin.main0(SearchGuardAdmin.java:441)

at com.floragunn.searchguard.tools.SearchGuardAdmin.main(SearchGuardAdmin.java:123)

Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:692)

… 7 more

Caused by: ElasticsearchSecurityException[Error while initializing transport SSL layer from PEM: java.lang.IllegalArgumentException: File does not contain valid certificates: /etc/elasticsearch/gandalf.cer]; nested: IllegalArgumentException[File does not contain valid certificates: /etc/elasticsearch/gandalf.cer]; nested: CertificateException[found no certificates in input stream];

at com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore.initSSLConfig(DefaultSearchGuardKeyStore.java:292)

at com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore.(DefaultSearchGuardKeyStore.java:145)

at com.floragunn.searchguard.ssl.SearchGuardSSLPlugin.(SearchGuardSSLPlugin.java:193)

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:197)

… 12 more

Caused by: java.lang.IllegalArgumentException: File does not contain valid certificates: /etc/elasticsearch/gandalf.cer

at io.netty.handler.ssl.SslContextBuilder.keyManager(SslContextBuilder.java:262)

at io.netty.handler.ssl.SslContextBuilder.forServer(SslContextBuilder.java:90)

at com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore.buildSSLServerContext(DefaultSearchGuardKeyStore.java:613)

at com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore.initSSLConfig(DefaultSearchGuardKeyStore.java:287)

… 15 more

Caused by: java.security.cert.CertificateException: found no certificates in input stream

at io.netty.handler.ssl.PemReader.readCertificates(PemReader.java:98)

at io.netty.handler.ssl.PemReader.readCertificates(PemReader.java:64)

at io.netty.handler.ssl.SslContext.toX509Certificates(SslContext.java:1070)

at io.netty.handler.ssl.SslContextBuilder.keyManager(SslContextBuilder.java:260)

… 18 more

``

My certificates are validate by the the root CA

Can you explain me what is the problem please ?

Thank You !

---

<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:** [January 16, 2019, 12:22pm UTC](https://forum.search-guard.com/t/failed-to-load-plugin-class-when-using-sgadmin/1284/2 "2019-01-16T12:22:24Z")

</div>

File does not contain valid certificates: /etc/elasticsearch/gandalf.cer]

Seems gandalf.cer does not contain a valid X509 certificate in pem format

> **···**
>
> > Am 16.01.2019 um 10:30 schrieb Voortexx \<ekham93@gmail.com\>:
> > 
> > Elasticsearch and Search Guard version : 6.3.2
> > 
> > Entreprise Module : Disabled
> > 
> > JVM Version : 1.8.0\_111
> > 
> > Operating System : Debian 9
> > 
> > Hello,
> > 
> > I want to change the ID and the password for the Admin user on Search Guard, so i used the hash.sh tool to generate my hashed password.
> > 
> > After that, i opened my sg\_internal\_user.yml located in the Search Guard directory of my master node.
> > 
> > After modified the file with my new hashed password, i had to apply my modification to the whole cluster, so
> > 
> > i runned sgadmin.sh. Then i get this error :
> > 
> > WARNING: Seems you want connect to the Elasticsearch HTTP port.  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sgadmin connects on the transport port which is normally 9300.  
> > Will connect to 10.15.20.160:9200 ... done  
> > 10:27:12.088 [main] ERROR com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore - Your keystore or PEM does not contain a certificate. Maybe you confused keys and certificates.  
> > ERR: An unexpected IllegalStateException occured: failed to load plugin class [com.floragunn.searchguard.SearchGuardPlugin]  
> > Trace:  
> > java.lang.IllegalStateException: failed to load plugin class [com.floragunn.searchguard.SearchGuardPlugin]  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:701)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.plugins.PluginsService.\<init\>(PluginsService.java:114)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:107)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:132)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.client.transport.TransportClient.\<init\>(TransportClient.java:269)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.tools.SearchGuardAdmin$TransportClientImpl.\<init\>(SearchGuardAdmin.java:886)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.tools.SearchGuardAdmin.main0(SearchGuardAdmin.java:441)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.tools.SearchGuardAdmin.main(SearchGuardAdmin.java:123)  
> > Caused by: java.lang.reflect.InvocationTargetException  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.reflect.Constructor.newInstance(Constructor.java:423)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:692)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 7 more  
> > Caused by: ElasticsearchSecurityException[Error while initializing transport SSL layer from PEM: java.lang.IllegalArgumentException: File does not contain valid certificates: /etc/elasticsearch/gandalf.cer]; nested: IllegalArgumentException[File does not contain valid certificates: /etc/elasticsearch/gandalf.cer]; nested: CertificateException[found no certificates in input stream];  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore.initSSLConfig(DefaultSearchGuardKeyStore.java:292)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore.\<init\>(DefaultSearchGuardKeyStore.java:145)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.ssl.SearchGuardSSLPlugin.\<init\>(SearchGuardSSLPlugin.java:193)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.SearchGuardPlugin.\<init\>(SearchGuardPlugin.java:197)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 12 more  
> > Caused by: java.lang.IllegalArgumentException: File does not contain valid certificates: /etc/elasticsearch/gandalf.cer  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at io.netty.handler.ssl.SslContextBuilder.keyManager(SslContextBuilder.java:262)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at io.netty.handler.ssl.SslContextBuilder.forServer(SslContextBuilder.java:90)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore.buildSSLServerContext(DefaultSearchGuardKeyStore.java:613)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.floragunn.searchguard.ssl.DefaultSearchGuardKeyStore.initSSLConfig(DefaultSearchGuardKeyStore.java:287)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 15 more  
> > Caused by: java.security.cert.CertificateException: found no certificates in input stream  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at io.netty.handler.ssl.PemReader.readCertificates(PemReader.java:98)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at io.netty.handler.ssl.PemReader.readCertificates(PemReader.java:64)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at io.netty.handler.ssl.SslContext.toX509Certificates(SslContext.java:1070)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at io.netty.handler.ssl.SslContextBuilder.keyManager(SslContextBuilder.java:260)  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;... 18 more
> > 
> > My certificates are validate by the the root CA
> > 
> > Can you explain me what is the problem please ?
> > 
> > Thank You !
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups "Search Guard Community Forum" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to search-guard+unsubscribe@googlegroups.com.  
> > To post to this group, send email to search-guard@googlegroups.com.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/search-guard/f01c8557-12d8-4a51-ac89-50621dc83f1d%40googlegroups.com\](https://groups.google.com/d/msgid/search-guard/f01c8557-12d8-4a51-ac89-50621dc83f1d%40googlegroups.com%5C).  
> > For more options, visit [https://groups.google.com/d/optout\](https://groups.google.com/d/optout%5C).

---

<div class="post-metadata">

**Author:** ![Voortexx](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@Voortexx](https://forum.search-guard.com/u/Voortexx)\
**Post date:** [January 22, 2019, 2:51pm UTC](https://forum.search-guard.com/t/failed-to-load-plugin-class-when-using-sgadmin/1284/3 "2019-01-22T14:51:44Z")

</div>

Thanks for help, I create new certificate and it works now.

However, I get a new error message. It says that it can’t check if the cluster is sane but when i run --diagnose i can see that sgadmin has

found the slaves nodes

Error Message :

Search Guard Admin v6

Will connect to 10.15.20.160:9300 … done

Unable to check whether cluster is sane: None of the configured nodes are available: [{#transport#-1}{hqNdlsB2TQSX1Jw3ukt\_Cg}{10.15.20.160}{10.15.20.160:9300}]

ERR: Cannot connect to Elasticsearch. Please refer to elasticsearch logfile for more information

Trace:

NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{hqNdlsB2TQSX1Jw3ukt\_Cg}{10.15.20.160}{10.15.20.160:9300}]]

```
    at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:347)

    at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:245)

    at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:60)

    at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:378)

    at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:405)

    at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:394)

    at com.floragunn.searchguard.tools.SearchGuardAdmin.main0(SearchGuardAdmin.java:450)

    at com.floragunn.searchguard.tools.SearchGuardAdmin.main(SearchGuardAdmin.java:123)

```

``

---

<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:** [January 24, 2019, 11:30am UTC](https://forum.search-guard.com/t/failed-to-load-plugin-class-when-using-sgadmin/1284/4 "2019-01-24T11:30:49Z")

</div>

Can you please attach your elasticsearch.yml (as file) and share the exact sgadmin command you are issueing?

Please also look into the logfiles if there is anything conspicuous

> **···**
>
> On Tuesday, 22 January 2019 15:51:45 UTC+1, Voortexx wrote:
> 
> > Thanks for help, I create new certificate and it works now.
> 
> > 
> 
> > However, I get a new error message. It says that it can’t check if the cluster is sane but when i run --diagnose i can see that sgadmin has
> 
> > found the slaves nodes
> 
> > 
> 
> > Error Message :
> 
> > 
> 
> > 
> 
> > Search Guard Admin v6
> 
> > Will connect to [10.15.20.160:9300](http://10.15.20.160:9300) … done
> 
> > Unable to check whether cluster is sane: None of the configured nodes are available: [{#transport#-1}{hqNdlsB2TQSX1Jw3ukt\_Cg}{10.15.20.160}{[10.15.20.160:9300](http://10.15.20.160:9300)}]
> 
> > ERR: Cannot connect to Elasticsearch. Please refer to elasticsearch logfile for more information
> 
> > Trace:
> 
> > NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{hqNdlsB2TQSX1Jw3ukt\_Cg}{10.15.20.160}{10.15.20.160:9300}]]
> 
> > ```
> > at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:347)
> > 
> > ```
> 
> > ```
> > at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:245)
> > 
> > ```
> 
> > ```
> > at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:60)
> > 
> > ```
> 
> > ```
> > at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:378)
> > 
> > ```
> 
> > ```
> > at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:405)
> > 
> > ```
> 
> > ```
> > at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:394)
> > 
> > ```
> 
> > ```
> > at com.floragunn.searchguard.tools.SearchGuardAdmin.main0(SearchGuardAdmin.java:450)
> > 
> > ```
> 
> > ```
> > at com.floragunn.searchguard.tools.SearchGuardAdmin.main(SearchGuardAdmin.java:123)
> > 
> > ```
> 
> > 
> 
> > ``
> 
> >

---

<div class="post-metadata">

**Author:** ![Voortexx](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@Voortexx](https://forum.search-guard.com/u/Voortexx)\
**Post date:** [January 25, 2019, 9:08am UTC](https://forum.search-guard.com/t/failed-to-load-plugin-class-when-using-sgadmin/1284/5 "2019-01-25T09:08:18Z")

</div>

> Here is my elasticsearch.yml :

# ======================== Elasticsearch Configuration =========================

[sgadmin\_diag\_trace\_2019-Jan-22\_14-29-09.txt](https://forum.search-guard.com/uploads/short-url/1z48BuSXkF86JtLfQYF8ZScfniL.txt) (268 KB)

> **···**
>
> # 
> 
> # NOTE: Elasticsearch comes with reasonable defaults for most settings.
> 
> # Before you set out to tweleak and tune the configuration, make sure you understand what are you trying to accomplish and the consequences.
> 
> # 
> 
> # The primary way of configuring a node is via this file. This template lists the most important settings you may want to configure for a production cluster.
> 
> # 
> 
> # Please consult the documentation for further information on configuration options: [Elasticsearch Guide | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)
> 
> # 
> 
> # ---------------------------------- Cluster -----------------------------------
> 
> # 
> 
> # Use a descriptive name for your cluster:
> 
> # 
> 
> cluster.name: ClustBase
> 
> # 
> 
> # ------------------------------------ Node ------------------------------------
> 
> # 
> 
> # Use a descriptive name for the node:
> 
> node.master: true
> 
> node.name: Master
> 
> # 
> 
> # Add custom attributes to the node:
> 
> # 
> 
> #node.attr.rack: r1
> 
> # 
> 
> # ----------------------------------- Paths ------------------------------------
> 
> # 
> 
> # Path to directory where to store the data (separate multiple locations by comma):
> 
> # 
> 
> path.data: /var/lib/elasticsearch
> 
> path.repo: /mnt/repo\_snapshots
> 
> # 
> 
> #Path to log files:
> 
> # 
> 
> path.logs: /var/log/elasticsearch
> 
> # 
> 
> # ----------------------------------- Memory -----------------------------------
> 
> # 
> 
> # Lock the memory on startup:
> 
> # 
> 
> #bootstrap.memory\_lock: true
> 
> # 
> 
> # Make sure that the heap size is set to about half the memory available on the system and that the owner of the process is allowed to use this limit.
> 
> # 
> 
> # Elasticsearch performs poorly when the system is swapping the memory.
> 
> # 
> 
> # ---------------------------------- Network -----------------------------------
> 
> # 
> 
> # Set the bind address to a specific IP (IPv4 or IPv6):
> 
> # 
> 
> network.host: 10.15.20.160
> 
> # 
> 
> # Set a custom port for HTTP:
> 
> # 
> 
> http.port: 9200
> 
> # 
> 
> # For more information, consult the network module documentation.
> 
> # 
> 
> # --------------------------------- Discovery ----------------------------------
> 
> # 
> 
> # Pass an initial list of hosts to perform discovery when new node is started: The default list of hosts is [“127.0.0.1”, “[::1]”]
> 
> # 
> 
> discovery.zen.ping.unicast.hosts: [“10.15.20.160”, “10.15.20.167”, “10.15.20.168”]
> 
> # 
> 
> # Prevent the “split brain” by configuring the majority of nodes (total number of master-eligible
> 
> # 
> 
> #discovery.zen.minimum\_master\_nodes:
> 
> # 
> 
> # For more information, consult the zen discovery module documentation.
> 
> # 
> 
> # ---------------------------------- Gateway -----------------------------------
> 
> # 
> 
> # Block initial recovery after a full cluster restart until N nodes are started:
> 
> # 
> 
> #gateway.recover\_after\_nodes: 3
> 
> # 
> 
> # For more information, consult the gateway module documentation.
> 
> # 
> 
> # ---------------------------------- Various -----------------------------------
> 
> # 
> 
> # Require explicit names when deleting indices:
> 
> # 
> 
> #action.destructive\_requires\_name: true shared repo path\_repo: [“mount/backups”, “/mount/longterm\_backups”]
> 
> #path.repo: [“mnt/repo\_snapshots”]
> 
> #---------------------------------Search-Guard---------------------------------
> 
> searchguard.ssl.transport.pemcert\_filepath: 87.cer
> 
> searchguard.ssl.transport.pemkey\_filepath: sdevfrekham.reyesholdings.com.key
> 
> searchguard.ssl.transport.pemkey\_password: wd6qpyOQ32hw
> 
> searchguard.ssl.transport.pemtrustedcas\_filepath: root-ca.cer
> 
> searchguard.ssl.transport.enforce\_hostname\_verification: false
> 
> searchguard.ssl.transport.resolve\_hostname: false
> 
> searchguard.ssl.http.enabled: true
> 
> searchguard.ssl.http.pemcert\_filepath: 88.cer
> 
> searchguard.ssl.http.pemkey\_filepath: sdevfrekham.reyesholdings.com\_http.key
> 
> searchguard.ssl.http.pemkey\_password: EofEHuwj2zI1
> 
> searchguard.ssl.http.pemtrustedcas\_filepath: root-ca.cer
> 
> searchguard.nodes\_dn:
> 
> - [CN=sdevfrekham.reyesholdings.com](http://CN=sdevfrekham.reyesholdings.com),OU=IT,O=reyesholdings Com, Inc.,DC=reyesholdings,DC=com
> 
> - [CN=sdevfrekham2.reyesholdings.com](http://CN=sdevfrekham2.reyesholdings.com),OU=IT,O=reyesholdings Com, Inc.,DC=reyesholdings,DC=com
> 
> - [CN=sdevfrekham3.reyesholdings.com](http://CN=sdevfrekham3.reyesholdings.com),OU=IT,O=reyesholdings Com, Inc.,DC=reyesholdings,DC=com
> 
> searchguard.authcz.admin\_dn:
> 
> - [CN=superuser.reyesholdings.com](http://CN=superuser.reyesholdings.com),OU=IT,O=reyesholdings Com, Inc.,DC=reyesholdings,DC=com
> 
> #-----------------------------------X-Pack-------------------------------------
> 
> xpack.security.enabled: false
> 
> xpack.monitoring.enabled : false
> 
> xpack.graph.enabled : false
> 
> xpack.watcher.enabled : false
> 
> searchguard.enterprise\_modules\_enabled: false
> 
> ``
> 
> Here is the command to push files on the whole cluster :
> 
> ./sgadmin.sh -cd /usr/share/elasticsearch/plugins/search-guard-6/sgconfig/ -cacert /tmp/root-ca.cer -cert /etc/elasticsearch/superuser.reyesholdings.com.cer -key /etc/elasticsearch/superuser.reyesholdings.com.key -keypass EPyrMnFqFzsY -nhnv -icn -h 10.15.20.160
> 
> When i run --diagnose, i get the file “sgadmin\_diag\_trace\_2019-Jan-22\_14-29-09.txt”

---

<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 3, 2019, 3:37pm UTC](https://forum.search-guard.com/t/failed-to-load-plugin-class-when-using-sgadmin/1284/6 "2019-02-03T15:37:37Z")

</div>

There is not “-icn” sgadmin option. I guess you mean “-icl” ?

And in the diag trace i can see that your cluster is “red” because you have 18 unassigned shards (see [How to Resolve Unassigned Shards in Elasticsearch | Datadog](https://www.datadoghq.com/blog/elasticsearch-unassigned-shards/) and [Safely disable/enable replicas to fix unassigned shards - Elasticsearch - Discuss the Elastic Stack](https://discuss.elastic.co/t/safely-disable-enable-replicas-to-fix-unassigned-shards/151432))

Add the “-arc” (allow red cluster) option to sgadmin to allow operations on a red cluster.

> **···**
>
> On Friday, 25 January 2019 10:08:18 UTC+1, Voortexx wrote:
> 
> > > Here is my elasticsearch.yml :
> 
> > 
> 
> > # ======================== Elasticsearch Configuration =========================
> 
> > #
> 
> > # NOTE: Elasticsearch comes with reasonable defaults for most settings.
> 
> > # Before you set out to tweleak and tune the configuration, make sure you understand what are you trying to accomplish and the consequences.
> 
> > #
> 
> > # The primary way of configuring a node is via this file. This template lists the most important settings you may want to configure for a production cluster.
> 
> > #
> 
> > # Please consult the documentation for further information on configuration options: [https://www.elastic.co/guide/en/elasticsearch/reference/index.html](https://www.elastic.co/guide/en/elasticsearch/reference/index.html)
> 
> > #
> 
> > # ---------------------------------- Cluster -----------------------------------
> 
> > #
> 
> > # Use a descriptive name for your cluster:
> 
> > #
> 
> > [cluster.name](http://cluster.name): ClustBase
> 
> > #
> 
> > # ------------------------------------ Node ------------------------------------
> 
> > #
> 
> > # Use a descriptive name for the node:
> 
> > node.master: true
> 
> > [node.name](http://node.name): Master
> 
> > #
> 
> > # Add custom attributes to the node:
> 
> > #
> 
> > #node.attr.rack: r1
> 
> > #
> 
> > # ----------------------------------- Paths ------------------------------------
> 
> > #
> 
> > # Path to directory where to store the data (separate multiple locations by comma):
> 
> > #
> 
> > path.data: /var/lib/elasticsearch
> 
> > path.repo: /mnt/repo\_snapshots
> 
> > #
> 
> > #Path to log files:
> 
> > #
> 
> > path.logs: /var/log/elasticsearch
> 
> > #
> 
> > # ----------------------------------- Memory -----------------------------------
> 
> > #
> 
> > # Lock the memory on startup:
> 
> > #
> 
> > #bootstrap.memory\_lock: true
> 
> > #
> 
> > # Make sure that the heap size is set to about half the memory available on the system and that the owner of the process is allowed to use this limit.
> 
> > #
> 
> > # Elasticsearch performs poorly when the system is swapping the memory.
> 
> > #
> 
> > # ---------------------------------- Network -----------------------------------
> 
> > #
> 
> > # Set the bind address to a specific IP (IPv4 or IPv6):
> 
> > #
> 
> > network.host: 10.15.20.160
> 
> > #
> 
> > # Set a custom port for HTTP:
> 
> > #
> 
> > http.port: 9200
> 
> > #
> 
> > # For more information, consult the network module documentation.
> 
> > #
> 
> > # --------------------------------- Discovery ----------------------------------
> 
> > #
> 
> > # Pass an initial list of hosts to perform discovery when new node is started: The default list of hosts is [“127.0.0.1”, “[::1]”]
> 
> > #
> 
> > discovery.zen.ping.unicast.hosts: [“10.15.20.160”, “10.15.20.167”, “10.15.20.168”]
> 
> > #
> 
> > # Prevent the “split brain” by configuring the majority of nodes (total number of master-eligible
> 
> > #
> 
> > #discovery.zen.minimum\_master\_nodes:
> 
> > #
> 
> > # For more information, consult the zen discovery module documentation.
> 
> > #
> 
> > # ---------------------------------- Gateway -----------------------------------
> 
> > #
> 
> > # Block initial recovery after a full cluster restart until N nodes are started:
> 
> > #
> 
> > #gateway.recover\_after\_nodes: 3
> 
> > #
> 
> > # For more information, consult the gateway module documentation.
> 
> > #
> 
> > # ---------------------------------- Various -----------------------------------
> 
> > #
> 
> > # Require explicit names when deleting indices:
> 
> > #
> 
> > #action.destructive\_requires\_name: true shared repo path\_repo: [“mount/backups”, “/mount/longterm\_backups”]
> 
> > #path.repo: [“mnt/repo\_snapshots”]
> 
> > 
> 
> > #---------------------------------Search-Guard---------------------------------
> 
> > searchguard.ssl.transport.pemcert\_filepath: 87.cer
> 
> > searchguard.ssl.transport.pemkey\_filepath: sdevfrekham.reyesholdings.com.key
> 
> > searchguard.ssl.transport.pemkey\_password: wd6qpyOQ32hw
> 
> > searchguard.ssl.transport.pemtrustedcas\_filepath: root-ca.cer
> 
> > searchguard.ssl.transport.enforce\_hostname\_verification: false
> 
> > searchguard.ssl.transport.resolve\_hostname: false
> 
> > searchguard.ssl.http.enabled: true
> 
> > searchguard.ssl.http.pemcert\_filepath: 88.cer
> 
> > searchguard.ssl.http.pemkey\_filepath: sdevfrekham.reyesholdings.com\_http.key
> 
> > searchguard.ssl.http.pemkey\_password: EofEHuwj2zI1
> 
> > searchguard.ssl.http.pemtrustedcas\_filepath: root-ca.cer
> 
> > searchguard.nodes\_dn:
> 
> > - CN=[sdevfrekham.reyesholdings.com](http://sdevfrekham.reyesholdings.com),OU=IT,O=reyesholdings Com, Inc.,DC=reyesholdings,DC=com
> 
> > - CN=[sdevfrekham2.reyesholdings.com](http://sdevfrekham2.reyesholdings.com),OU=IT,O=reyesholdings Com, Inc.,DC=reyesholdings,DC=com
> 
> > - CN=[sdevfrekham3.reyesholdings.com](http://sdevfrekham3.reyesholdings.com),OU=IT,O=reyesholdings Com, Inc.,DC=reyesholdings,DC=com
> 
> > searchguard.authcz.admin\_dn:
> 
> > - CN=[superuser.reyesholdings.com](http://superuser.reyesholdings.com),OU=IT,O=reyesholdings Com, Inc.,DC=reyesholdings,DC=com
> 
> > 
> 
> > #-----------------------------------X-Pack-------------------------------------
> 
> > 
> 
> > xpack.security.enabled: false
> 
> > xpack.monitoring.enabled : false
> 
> > xpack.graph.enabled : false
> 
> > xpack.watcher.enabled : false
> 
> > 
> 
> > searchguard.enterprise\_modules\_enabled: false
> 
> > 
> 
> > ``
> 
> > 
> 
> > 
> 
> > Here is the command to push files on the whole cluster :
> 
> > 
> 
> > ./sgadmin.sh -cd /usr/share/elasticsearch/plugins/search-guard-6/sgconfig/ -cacert /tmp/root-ca.cer -cert /etc/elasticsearch/superuser.reyesholdings.com.cer -key /etc/elasticsearch/superuser.reyesholdings.com.key -keypass EPyrMnFqFzsY -nhnv -icn -h 10.15.20.160
> 
> > 
> 
> > When i run --diagnose, i get the file “sgadmin\_diag\_trace\_2019-Jan-22\_14-29-09.txt”
> 
> > 
> 
> >
