Error while using sgadmin.sh

Hello folks,

I am getting error while using the ./sgadmin.sh -ts truststore.jks -ks kirk-keystore.jks -cd …/sgconfig -icl

i had copied the truststor and kirk-keystore files in the same directory of sgadmin.sh

aslo made the changes to the eleasticsearch.yml file

  searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=DE
as i am using example pki scripts for creating the certificates

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

at java.lang.Class.privateGetMethodRecursive(Class.java:3048)

at java.lang.Class.getMethod0(Class.java:3018)

at java.lang.Class.getMethod(Class.java:1784)

at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

your directory structure seems to be messed up. The sgadmin.sh script should set the classpath properly normally.
commons-cli-1.3.1.jar is in lib/ folder of elasticsearch and this whole folder is included in the classpath when running sgadmin.sh

How does you directory structure looks like and from which directory you call sgadmin.sh?

···

On Friday, 14 October 2016 07:01:29 UTC+2, Rajat Singh wrote:

Hello folks,

I am getting error while using the ./sgadmin.sh -ts truststore.jks -ks kirk-keystore.jks -cd …/sgconfig -icl

i had copied the truststor and kirk-keystore files in the same directory of sgadmin.sh

aslo made the changes to the eleasticsearch.yml file

  searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=DE
as i am using example pki scripts for creating the certificates

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

at java.lang.Class.privateGetMethodRecursive(Class.java:3048)

at java.lang.Class.getMethod0(Class.java:3018)

at java.lang.Class.getMethod(Class.java:1784)

at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Thanks for the reply
I am calling the sgadmin.sh from the

Elasticsearch

Plugins

Search-guard-2

Tools

sgadmin.sh

and in the same folder i am having truststore.jks and kirk-keystore.jks

sgconfig file is inside the Tools directory

Please Tell me if any other thing is required in order to figure out the issue

···

On Sun, Oct 16, 2016 at 1:45 AM, info@search-guard.com wrote:

your directory structure seems to be messed up. The sgadmin.sh script should set the classpath properly normally.
commons-cli-1.3.1.jar is in lib/ folder of elasticsearch and this whole folder is included in the classpath when running sgadmin.sh

How does you directory structure looks like and from which directory you call sgadmin.sh?

On Friday, 14 October 2016 07:01:29 UTC+2, Rajat Singh wrote:

Hello folks,

I am getting error while using the ./sgadmin.sh -ts truststore.jks -ks kirk-keystore.jks -cd …/sgconfig -icl

i had copied the truststor and kirk-keystore files in the same directory of sgadmin.sh

aslo made the changes to the eleasticsearch.yml file

  searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=DE
as i am using example pki scripts for creating the certificates

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

at java.lang.Class.privateGetMethodRecursive(Class.java:3048)

at java.lang.Class.getMethod0(Class.java:3018)

at java.lang.Class.getMethod(Class.java:1784)

at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

You received this message because you are subscribed to a topic in the Google Groups “Search Guard” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/search-guard/5HrqvwFZJfw/unsubscribe.

To unsubscribe from this group and all its topics, 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/7e152efa-c059-44c4-87c6-7c930f5d8d5e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

The keystore and truststore JKS files should be in the /path-to-ES/plugins/search-guard-2/sgconfig dir, since you specify “-cd …/sgconfig” in your command line. The “-cd” option says “look for the JKS files relative to that path”

···

On Monday, October 17, 2016 at 7:00:33 AM UTC-4, Rajat Singh wrote:

Thanks for the reply
I am calling the sgadmin.sh from the

Elasticsearch

Plugins

Search-guard-2

Tools

sgadmin.sh

and in the same folder i am having truststore.jks and kirk-keystore.jks

sgconfig file is inside the Tools directory

Please Tell me if any other thing is required in order to figure out the issue

On Sun, Oct 16, 2016 at 1:45 AM, in...@search-guard.com wrote:

your directory structure seems to be messed up. The sgadmin.sh script should set the classpath properly normally.
commons-cli-1.3.1.jar is in lib/ folder of elasticsearch and this whole folder is included in the classpath when running sgadmin.sh

How does you directory structure looks like and from which directory you call sgadmin.sh?

On Friday, 14 October 2016 07:01:29 UTC+2, Rajat Singh wrote:

Hello folks,

I am getting error while using the ./sgadmin.sh -ts truststore.jks -ks kirk-keystore.jks -cd …/sgconfig -icl

i had copied the truststor and kirk-keystore files in the same directory of sgadmin.sh

aslo made the changes to the eleasticsearch.yml file

  searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=DE
as i am using example pki scripts for creating the certificates

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

at java.lang.Class.privateGetMethodRecursive(Class.java:3048)

at java.lang.Class.getMethod0(Class.java:3018)

at java.lang.Class.getMethod(Class.java:1784)

at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

You received this message because you are subscribed to a topic in the Google Groups “Search Guard” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/search-guard/5HrqvwFZJfw/unsubscribe.

To unsubscribe from this group and all its topics, send an email to search-guard...@googlegroups.com.

To post to this group, send email to search...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/7e152efa-c059-44c4-87c6-7c930f5d8d5e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hello folks,

I had changed the path of truststore and kirk file and placed it in sgconfig folder but then also i am getting the same error

Looking forward for reply

Thanks,

Rajat Singh

···

On Mon, Oct 17, 2016 at 6:47 PM, ZillaYT zilla62@gmail.com wrote:

Thanks for the reply
I am calling the sgadmin.sh from the

Elasticsearch

Plugins

Search-guard-2

Tools

sgadmin.sh

and in the same folder i am having truststore.jks and kirk-keystore.jks

sgconfig file is inside the Tools directory

Please Tell me if any other thing is required in order to figure out the issue

On Sun, Oct 16, 2016 at 1:45 AM, in...@search-guard.com wrote:

your directory structure seems to be messed up. The sgadmin.sh script should set the classpath properly normally.
commons-cli-1.3.1.jar is in lib/ folder of elasticsearch and this whole folder is included in the classpath when running sgadmin.sh

How does you directory structure looks like and from which directory you call sgadmin.sh?

On Friday, 14 October 2016 07:01:29 UTC+2, Rajat Singh wrote:

Hello folks,

I am getting error while using the ./sgadmin.sh -ts truststore.jks -ks kirk-keystore.jks -cd …/sgconfig -icl

i had copied the truststor and kirk-keystore files in the same directory of sgadmin.sh

aslo made the changes to the eleasticsearch.yml file

  searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=DE
as i am using example pki scripts for creating the certificates

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

at java.lang.Class.privateGetMethodRecursive(Class.java:3048)

at java.lang.Class.getMethod0(Class.java:3018)

at java.lang.Class.getMethod(Class.java:1784)

at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

You received this message because you are subscribed to a topic in the Google Groups “Search Guard” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/search-guard/5HrqvwFZJfw/unsubscribe.

To unsubscribe from this group and all its topics, send an email to search-guard...@googlegroups.com.

To post to this group, send email to search...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/7e152efa-c059-44c4-87c6-7c930f5d8d5e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

The keystore and truststore JKS files should be in the /path-to-ES/plugins/search-guard-2/sgconfig dir, since you specify “-cd …/sgconfig” in your command line. The “-cd” option says “look for the JKS files relative to that path”

On Monday, October 17, 2016 at 7:00:33 AM UTC-4, Rajat Singh wrote:

You received this message because you are subscribed to a topic in the Google Groups “Search Guard” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/search-guard/5HrqvwFZJfw/unsubscribe.

To unsubscribe from this group and all its topics, 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/1d3e9197-6fed-451b-aafc-d7a77d7b7981%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

I use absolute paths, like this

./sgadmin.sh -ts /path_to/truststore.jks -ks /path_to/kirk-keystore.jks -cd …/sgconfig -icl

``

···

On Tuesday, October 18, 2016 at 2:08:16 AM UTC-4, Rajat Singh wrote:

Hello folks,

I had changed the path of truststore and kirk file and placed it in sgconfig folder but then also i am getting the same error

Looking forward for reply

Thanks,

Rajat Singh

On Mon, Oct 17, 2016 at 6:47 PM, ZillaYT zil...@gmail.com wrote:

Thanks for the reply
I am calling the sgadmin.sh from the

Elasticsearch

Plugins

Search-guard-2

Tools

sgadmin.sh

and in the same folder i am having truststore.jks and kirk-keystore.jks

sgconfig file is inside the Tools directory

Please Tell me if any other thing is required in order to figure out the issue

On Sun, Oct 16, 2016 at 1:45 AM, in...@search-guard.com wrote:

your directory structure seems to be messed up. The sgadmin.sh script should set the classpath properly normally.
commons-cli-1.3.1.jar is in lib/ folder of elasticsearch and this whole folder is included in the classpath when running sgadmin.sh

How does you directory structure looks like and from which directory you call sgadmin.sh?

On Friday, 14 October 2016 07:01:29 UTC+2, Rajat Singh wrote:

Hello folks,

I am getting error while using the ./sgadmin.sh -ts truststore.jks -ks kirk-keystore.jks -cd …/sgconfig -icl

i had copied the truststor and kirk-keystore files in the same directory of sgadmin.sh

aslo made the changes to the eleasticsearch.yml file

  searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=DE
as i am using example pki scripts for creating the certificates

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

at java.lang.Class.privateGetMethodRecursive(Class.java:3048)

at java.lang.Class.getMethod0(Class.java:3018)

at java.lang.Class.getMethod(Class.java:1784)

at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

You received this message because you are subscribed to a topic in the Google Groups “Search Guard” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/search-guard/5HrqvwFZJfw/unsubscribe.

To unsubscribe from this group and all its topics, send an email to search-guard...@googlegroups.com.

To post to this group, send email to search...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/7e152efa-c059-44c4-87c6-7c930f5d8d5e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

The keystore and truststore JKS files should be in the /path-to-ES/plugins/search-guard-2/sgconfig dir, since you specify “-cd …/sgconfig” in your command line. The “-cd” option says “look for the JKS files relative to that path”

On Monday, October 17, 2016 at 7:00:33 AM UTC-4, Rajat Singh wrote:

You received this message because you are subscribed to a topic in the Google Groups “Search Guard” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/search-guard/5HrqvwFZJfw/unsubscribe.

To unsubscribe from this group and all its topics, send an email to search-guard...@googlegroups.com.

To post to this group, send email to search...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/1d3e9197-6fed-451b-aafc-d7a77d7b7981%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Actually, that’s not true. The -cd switch only specifies where your config files are located. It has nothing to do with the keystore or truststore paths. The key- and truststore paths are relative to the directory where you execute sgadmin from. So, the bullet-proof way is either to use absolute paths, or, just place the files in the tools directory and execute sgadmin from there.

···

On Monday, 17 October 2016 16:17:33 UTC+3, ZillaYT wrote:

Thanks for the reply
I am calling the sgadmin.sh from the

Elasticsearch

Plugins

Search-guard-2

Tools

sgadmin.sh

and in the same folder i am having truststore.jks and kirk-keystore.jks

sgconfig file is inside the Tools directory

Please Tell me if any other thing is required in order to figure out the issue

On Sun, Oct 16, 2016 at 1:45 AM, in...@search-guard.com wrote:

your directory structure seems to be messed up. The sgadmin.sh script should set the classpath properly normally.
commons-cli-1.3.1.jar is in lib/ folder of elasticsearch and this whole folder is included in the classpath when running sgadmin.sh

How does you directory structure looks like and from which directory you call sgadmin.sh?

On Friday, 14 October 2016 07:01:29 UTC+2, Rajat Singh wrote:

Hello folks,

I am getting error while using the ./sgadmin.sh -ts truststore.jks -ks kirk-keystore.jks -cd …/sgconfig -icl

i had copied the truststor and kirk-keystore files in the same directory of sgadmin.sh

aslo made the changes to the eleasticsearch.yml file

  searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=DE
as i am using example pki scripts for creating the certificates

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

at java.lang.Class.privateGetMethodRecursive(Class.java:3048)

at java.lang.Class.getMethod0(Class.java:3018)

at java.lang.Class.getMethod(Class.java:1784)

at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

You received this message because you are subscribed to a topic in the Google Groups “Search Guard” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/search-guard/5HrqvwFZJfw/unsubscribe.

To unsubscribe from this group and all its topics, send an email to search-guard...@googlegroups.com.

To post to this group, send email to search...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/7e152efa-c059-44c4-87c6-7c930f5d8d5e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

The keystore and truststore JKS files should be in the /path-to-ES/plugins/search-guard-2/sgconfig dir, since you specify “-cd …/sgconfig” in your command line. The “-cd” option says “look for the JKS files relative to that path”

On Monday, October 17, 2016 at 7:00:33 AM UTC-4, Rajat Singh wrote: