JNI error after sgadmin

Hi,

I installed the following modules:
elasticsearch-6.3.1
kibana-6.3.1-windows-x86_64

search-guard-6-6.3.1-22.3

search-guard-tlstool-1.5

jdk1.8.0_181

jre1.8.0_181

The elastic search and the kibana are working. And first I can run sgadmin, so I could create the certificates. After that I want to add new users to internal_users. But the sgadmin (use the same command) cause the next error:

Error: A JNI error has occurred, please check your installation and try again

Exception in thread “main” java.lang.NoClassDefFoundError: org/elasticsearch/client/transport/NoNodeAvailableException

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

at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

at java.lang.Class.privateGetMethodRecursive(Unknown Source)

at java.lang.Class.getMethod0(Unknown Source)

at java.lang.Class.getMethod(Unknown Source)

at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)

at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.transport.NoNodeAvailableException

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

… 7 more

In elasticsearch.yml:

cluster.name: TFClaster (I tried comment out it, but didn’t work)

node.name: TFnode-1

node.attr.rack: r1

path.data: C:\mypath\Desktop\ElasticData

path.logs: C:\mypath\Desktop\ElasticLog

network.host: DESKTOP-V10O5HE

transport.tcp.port: 9300

http.port: 9200

transport.host: 0.0.0.0

searchguard.enterprise_modules_enabled: false

xpack.monitoring.enabled: true

xpack.graph.enabled: false

xpack.ml.enabled: false

xpack.security.enabled: false

xpack.watcher.enabled: false

searchguard.ssl.transport.pemcert_filepath: node1.pem

searchguard.ssl.transport.pemkey_filepath: node1.key

searchguard.ssl.transport.pemkey_password: MeFJjC46FtM4

searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem

searchguard.ssl.transport.enforce_hostname_verification: false

searchguard.ssl.transport.resolve_hostname: false

searchguard.ssl.http.enabled: true

searchguard.ssl.http.pemcert_filepath: node1_http.pem

searchguard.ssl.http.pemkey_filepath: node1_http.key

searchguard.ssl.http.pemkey_password: vkggFzIFpr6c

searchguard.ssl.http.pemtrustedcas_filepath: root-ca.pem

searchguard.authcz.admin_dn:

searchguard.cert.oid: 1.2.3.4.5.5

Could you help me? I can’t find the problem :frowning:

Sorry, I don’t fully understand this issue. First, how exactly did you install Search Guard? And what does your elasticsearch.yml look like?

When you say:

“And first I can run sgadmin, so I could create the certificates”

what do you mean? Did you run sgadmin successfully? And how does running sgadmin relate to creating certificates?

“But the sgadmin (use the same command) cause the next error”

I also don’t understand, sorry. Do you mean you ran sgadmin once successfully, and the exact same command failed the second time?

What exact command did you run?

···

On Monday, July 23, 2018 at 11:33:18 AM UTC+2, csullogesztee wrote:

Hi,

I installed the following modules:
elasticsearch-6.3.1
kibana-6.3.1-windows-x86_64

search-guard-6-6.3.1-22.3

search-guard-tlstool-1.5

jdk1.8.0_181

jre1.8.0_181

The elastic search and the kibana are working. And first I can run sgadmin, so I could create the certificates. After that I want to add new users to internal_users. But the sgadmin (use the same command) cause the next error:

Error: A JNI error has occurred, please check your installation and try again

Exception in thread “main” java.lang.NoClassDefFoundError: org/elasticsearch/client/transport/NoNodeAvailableException

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

at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

at java.lang.Class.privateGetMethodRecursive(Unknown Source)

at java.lang.Class.getMethod0(Unknown Source)

at java.lang.Class.getMethod(Unknown Source)

at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)

at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.transport.NoNodeAvailableException

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

… 7 more

In elasticsearch.yml:

cluster.name: TFClaster (I tried comment out it, but didn’t work)

node.name: TFnode-1

node.attr.rack: r1

path.data: C:\mypath\Desktop\ElasticData

path.logs: C:\mypath\Desktop\ElasticLog

network.host: DESKTOP-V10O5HE

transport.tcp.port: 9300

http.port: 9200

transport.host: 0.0.0.0

searchguard.enterprise_modules_enabled: false

xpack.monitoring.enabled: true

xpack.graph.enabled: false

xpack.ml.enabled: false

xpack.security.enabled: false

xpack.watcher.enabled: false

searchguard.ssl.transport.pemcert_filepath: node1.pem

searchguard.ssl.transport.pemkey_filepath: node1.key

searchguard.ssl.transport.pemkey_password: MeFJjC46FtM4

searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem

searchguard.ssl.transport.enforce_hostname_verification: false

searchguard.ssl.transport.resolve_hostname: false

searchguard.ssl.http.enabled: true

searchguard.ssl.http.pemcert_filepath: node1_http.pem

searchguard.ssl.http.pemkey_filepath: node1_http.key

searchguard.ssl.http.pemkey_password: vkggFzIFpr6c

searchguard.ssl.http.pemtrustedcas_filepath: root-ca.pem

searchguard.authcz.admin_dn:

searchguard.cert.oid: 1.2.3.4.5.5

Could you help me? I can’t find the problem :frowning:

Sorry, it’s my fault. I’m beginner and it’s my first installation. That step was the created the certificates for me. But it contain create the certificates with Offline TLS Tools and after that pushed configuration changes to SG with sgadmin.
The command was:
sgadmin.bat -cd …\sgconfig\ -icl -nhnv -cacert …....\config\root-ca.pem -cert …....\config\kirk.pem --hostname desktop-v10o5he -key …....\config\kirk.key -keypass 7zojtw0eJTIF
It worked. Next step was configuring the elastic.yml and kibana.yml. The ES and the kibana works and run in https. When I tried add new users to Kibana I modified the sg_internal_users. If I know well I have to run sgadmin again (I use the same command first, after I try this: ./sgadmin.sh -f …/sg_internal_users.yml -t internalusers -ts … -tspass … -ks … -kspass … with the correct values) But I got the upper exception. And I don’t know why.

My full elastic.yml:

---------------------------------- Cluster -----------------------------------

···

2018-07-23 21:54 GMT+02:00 Jochen Kressin jkressin@floragunn.com:

Sorry, I don’t fully understand this issue. First, how exactly did you install Search Guard? And what does your elasticsearch.yml look like?

When you say:

“And first I can run sgadmin, so I could create the certificates”

what do you mean? Did you run sgadmin successfully? And how does running sgadmin relate to creating certificates?

“But the sgadmin (use the same command) cause the next error”

I also don’t understand, sorry. Do you mean you ran sgadmin once successfully, and the exact same command failed the second time?

What exact command did you run?

On Monday, July 23, 2018 at 11:33:18 AM UTC+2, csullogesztee wrote:

Hi,

I installed the following modules:
elasticsearch-6.3.1
kibana-6.3.1-windows-x86_64

search-guard-6-6.3.1-22.3

search-guard-tlstool-1.5

jdk1.8.0_181

jre1.8.0_181

The elastic search and the kibana are working. And first I can run sgadmin, so I could create the certificates. After that I want to add new users to internal_users. But the sgadmin (use the same command) cause the next error:

Error: A JNI error has occurred, please check your installation and try again

Exception in thread “main” java.lang.NoClassDefFoundError: org/elasticsearch/client/transport/NoNodeAvailableException

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

at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

at java.lang.Class.privateGetMethodRecursive(Unknown Source)

at java.lang.Class.getMethod0(Unknown Source)

at java.lang.Class.getMethod(Unknown Source)

at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)

at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.transport.NoNodeAvailableException

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

… 7 more

In elasticsearch.yml:

cluster.name: TFClaster (I tried comment out it, but didn’t work)

node.name: TFnode-1

node.attr.rack: r1

path.data: C:\mypath\Desktop\ElasticData

path.logs: C:\mypath\Desktop\ElasticLog

network.host: DESKTOP-V10O5HE

transport.tcp.port: 9300

http.port: 9200

transport.host: 0.0.0.0

searchguard.enterprise_modules_enabled: false

xpack.monitoring.enabled: true

xpack.graph.enabled: false

xpack.ml.enabled: false

xpack.security.enabled: false

xpack.watcher.enabled: false

searchguard.ssl.transport.pemcert_filepath: node1.pem

searchguard.ssl.transport.pemkey_filepath: node1.key

searchguard.ssl.transport.pemkey_password: MeFJjC46FtM4

searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem

searchguard.ssl.transport.enforce_hostname_verification: false

searchguard.ssl.transport.resolve_hostname: false

searchguard.ssl.http.enabled: true

searchguard.ssl.http.pemcert_filepath: node1_http.pem

searchguard.ssl.http.pemkey_filepath: node1_http.key

searchguard.ssl.http.pemkey_password: vkggFzIFpr6c

searchguard.ssl.http.pemtrustedcas_filepath: root-ca.pem

searchguard.authcz.admin_dn:

searchguard.cert.oid: 1.2.3.4.5.5

Could you help me? I can’t find the problem :frowning:

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/4401f888-76a1-40cd-914a-22af16c05a1a%40googlegroups.com.

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