java.lang.NoSuchFieldError: id_blake2s256

Hi All,

I’m using

Elasticsearch - 6.2.2

SearchGuard 6 - 6.2.2-21

I’m getting the following exception on starting Elasticseach after installing the Searchguard plugin.

[2018-03-05T15:39:04,367][ERROR][o.e.b.Bootstrap ] Exception

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

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Caused by: java.lang.NoSuchFieldError: id_blake2s256

at org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings.configure(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown Source) ~[?:?]

at com.floragunn.searchguard.SearchGuardPlugin$2.run(SearchGuardPlugin.java:215) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:211) ~[?:?]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Any idea why this is happening?

Pls post the startup logs when the node starts until it fails.

  • Which JVM version and vendor do you use?

  • Which operating system version and vendor?

  • Do you have installed other plugins (like x-pack?)

  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)

  • How did you install Search Guard?

···

On Monday, 5 March 2018 12:02:57 UTC+1, ihjaz Mohamed wrote:

Hi All,

I’m using

Elasticsearch - 6.2.2

SearchGuard 6 - 6.2.2-21

I’m getting the following exception on starting Elasticseach after installing the Searchguard plugin.

[2018-03-05T15:39:04,367][ERROR][o.e.b.Bootstrap ] Exception

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

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Caused by: java.lang.NoSuchFieldError: id_blake2s256

at org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings.configure(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown Source) ~[?:?]

at com.floragunn.searchguard.SearchGuardPlugin$2.run(SearchGuardPlugin.java:215) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:211) ~[?:?]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Any idea why this is happening?

  • Which JVM version and vendor do you use?

java -version

openjdk version “1.8.0_161”

OpenJDK Runtime Environment (build 1.8.0_161-b14)

OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

  • Which operating system version and vendor?

Red Hat Enterprise Linux Server release 7.4 (Maipo)

  • Do you have installed other plugins (like x-pack?)

No other plugins installed

  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)

rpm -ivh elasticsearch-6.2.2.rpm

  • How did you install Search Guard?

Downloaded search-guard-6-6.2.2-21.0.zip and ran below command.

/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file:///opt/search-guard-6-6.2.2-21.0.zip

I’ve attached the entire logs from startup.

elasticsearch.log (12.4 KB)

···

On Monday, March 5, 2018 at 6:24:11 PM UTC+5:30, Search Guard wrote:

Pls post the startup logs when the node starts until it fails.

  • Which JVM version and vendor do you use?
  • Which operating system version and vendor?
  • Do you have installed other plugins (like x-pack?)
  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)
  • How did you install Search Guard?

On Monday, 5 March 2018 12:02:57 UTC+1, ihjaz Mohamed wrote:

Hi All,

I’m using

Elasticsearch - 6.2.2

SearchGuard 6 - 6.2.2-21

I’m getting the following exception on starting Elasticseach after installing the Searchguard plugin.

[2018-03-05T15:39:04,367][ERROR][o.e.b.Bootstrap ] Exception

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

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Caused by: java.lang.NoSuchFieldError: id_blake2s256

at org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings.configure(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown Source) ~[?:?]

at com.floragunn.searchguard.SearchGuardPlugin$2.run(SearchGuardPlugin.java:215) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:211) ~[?:?]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Any idea why this is happening?

can not reproduce

AWS RHEL-7.4_HVM-20180103-x86_64-2-Hourly2-GP2 (ami-c90195b0)

sudo yum install wget java

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.rpm

sudo rpm -ivh elasticsearch-6.2.2.rpm

sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install -b com.floragunn:search-guard-6:6.2.2-21.0

sudo chmod +x /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh

sudo /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh -y -i -c

sudo systemctl restart elasticsearch.service

sudo cat /var/log/elasticsearch/searchguard_demo.log

curl -ksS -u admin:admin https://localhost:9200/_searchguard/authinfo?pretty

{

“user” : “User [name=admin, roles=[admin], requestedTenant=null]”,

“user_name” : “admin”,

“user_requested_tenant” : null,

“remote_address” : “[::1]:52214”,

“backend_roles” : [

“admin”

],

“custom_attribute_names” : [

“attr.internal.attribute1”,

“attr.internal.attribute2”,

“attr.internal.attribute3”

],

“sg_roles” : [

“sg_all_access”,

“sg_own_index”

],

“sg_tenants” : {

“admin_tenant” : true,

“admin” : true

},

“principal” : null,

“peer_certificates” : “0”

}

···

On Monday, 5 March 2018 14:38:43 UTC+1, ihjaz Mohamed wrote:

  • Which JVM version and vendor do you use?

java -version

openjdk version “1.8.0_161”

OpenJDK Runtime Environment (build 1.8.0_161-b14)

OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

  • Which operating system version and vendor?

Red Hat Enterprise Linux Server release 7.4 (Maipo)

  • Do you have installed other plugins (like x-pack?)

No other plugins installed

  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)

rpm -ivh elasticsearch-6.2.2.rpm

  • How did you install Search Guard?

Downloaded search-guard-6-6.2.2-21.0.zip and ran below command.

/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file:///opt/search-guard-6-6.2.2-21.0.zip

I’ve attached the entire logs from startup.

On Monday, March 5, 2018 at 6:24:11 PM UTC+5:30, Search Guard wrote:

Pls post the startup logs when the node starts until it fails.

  • Which JVM version and vendor do you use?
  • Which operating system version and vendor?
  • Do you have installed other plugins (like x-pack?)
  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)
  • How did you install Search Guard?

On Monday, 5 March 2018 12:02:57 UTC+1, ihjaz Mohamed wrote:

Hi All,

I’m using

Elasticsearch - 6.2.2

SearchGuard 6 - 6.2.2-21

I’m getting the following exception on starting Elasticseach after installing the Searchguard plugin.

[2018-03-05T15:39:04,367][ERROR][o.e.b.Bootstrap ] Exception

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

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Caused by: java.lang.NoSuchFieldError: id_blake2s256

at org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings.configure(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown Source) ~[?:?]

at com.floragunn.searchguard.SearchGuardPlugin$2.run(SearchGuardPlugin.java:215) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:211) ~[?:?]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Any idea why this is happening?

Hi,

I replaced the below jars at /usr/share/elasticsearch/plugins/search-guard-6

bcpg-jdk15on-1.59.jar

bcprov-jdk15on-1.59.jar

with

bcpg-jdk15on-1.57.jar

bcprov-jdk15on-1.57.jar

This worked for me. Elasticsearch started without any errors.

My JDK has the following Bouncycastle jars. Looks like these don’t have all the ciphers supported by the new jars.

bc-fips-1.0.1.jar

bcpkix-fips-1.0.0.jar

Can you please check if your JVM has any Bouncycastle related jars ?

···

On Monday, March 5, 2018 at 7:40:10 PM UTC+5:30, Search Guard wrote:

can not reproduce

AWS RHEL-7.4_HVM-20180103-x86_64-2-Hourly2-GP2 (ami-c90195b0)

sudo yum install wget java

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.rpm

sudo rpm -ivh elasticsearch-6.2.2.rpm

sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install -b com.floragunn:search-guard-6:6.2.2-21.0

sudo chmod +x /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh

sudo /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh -y -i -c

sudo systemctl restart elasticsearch.service

sudo cat /var/log/elasticsearch/searchguard_demo.log

curl -ksS -u admin:admin https://localhost:9200/_searchguard/authinfo?pretty

{

“user” : “User [name=admin, roles=[admin], requestedTenant=null]”,

“user_name” : “admin”,

“user_requested_tenant” : null,

“remote_address” : “[::1]:52214”,

“backend_roles” : [

“admin”

],

“custom_attribute_names” : [

“attr.internal.attribute1”,

“attr.internal.attribute2”,

“attr.internal.attribute3”

],

“sg_roles” : [

“sg_all_access”,

“sg_own_index”

],

“sg_tenants” : {

“admin_tenant” : true,

“admin” : true

},

“principal” : null,

“peer_certificates” : “0”

}

On Monday, 5 March 2018 14:38:43 UTC+1, ihjaz Mohamed wrote:

  • Which JVM version and vendor do you use?

java -version

openjdk version “1.8.0_161”

OpenJDK Runtime Environment (build 1.8.0_161-b14)

OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

  • Which operating system version and vendor?

Red Hat Enterprise Linux Server release 7.4 (Maipo)

  • Do you have installed other plugins (like x-pack?)

No other plugins installed

  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)

rpm -ivh elasticsearch-6.2.2.rpm

  • How did you install Search Guard?

Downloaded search-guard-6-6.2.2-21.0.zip and ran below command.

/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file:///opt/search-guard-6-6.2.2-21.0.zip

I’ve attached the entire logs from startup.

On Monday, March 5, 2018 at 6:24:11 PM UTC+5:30, Search Guard wrote:

Pls post the startup logs when the node starts until it fails.

  • Which JVM version and vendor do you use?
  • Which operating system version and vendor?
  • Do you have installed other plugins (like x-pack?)
  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)
  • How did you install Search Guard?

On Monday, 5 March 2018 12:02:57 UTC+1, ihjaz Mohamed wrote:

Hi All,

I’m using

Elasticsearch - 6.2.2

SearchGuard 6 - 6.2.2-21

I’m getting the following exception on starting Elasticseach after installing the Searchguard plugin.

[2018-03-05T15:39:04,367][ERROR][o.e.b.Bootstrap ] Exception

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

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Caused by: java.lang.NoSuchFieldError: id_blake2s256

at org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings.configure(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown Source) ~[?:?]

at com.floragunn.searchguard.SearchGuardPlugin$2.run(SearchGuardPlugin.java:215) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:211) ~[?:?]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Any idea why this is happening?

where does your JVM contain bouncycastle jars?

···

On Monday, 5 March 2018 15:59:37 UTC+1, ihjaz Mohamed wrote:

Hi,

I replaced the below jars at /usr/share/elasticsearch/plugins/search-guard-6

bcpg-jdk15on-1.59.jar

bcprov-jdk15on-1.59.jar

with

bcpg-jdk15on-1.57.jar

bcprov-jdk15on-1.57.jar

This worked for me. Elasticsearch started without any errors.

My JDK has the following Bouncycastle jars. Looks like these don’t have all the ciphers supported by the new jars.

bc-fips-1.0.1.jar

bcpkix-fips-1.0.0.jar

Can you please check if your JVM has any Bouncycastle related jars ?

On Monday, March 5, 2018 at 7:40:10 PM UTC+5:30, Search Guard wrote:

can not reproduce

AWS RHEL-7.4_HVM-20180103-x86_64-2-Hourly2-GP2 (ami-c90195b0)

sudo yum install wget java

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.rpm

sudo rpm -ivh elasticsearch-6.2.2.rpm

sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install -b com.floragunn:search-guard-6:6.2.2-21.0

sudo chmod +x /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh

sudo /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh -y -i -c

sudo systemctl restart elasticsearch.service

sudo cat /var/log/elasticsearch/searchguard_demo.log

curl -ksS -u admin:admin https://localhost:9200/_searchguard/authinfo?pretty

{

“user” : “User [name=admin, roles=[admin], requestedTenant=null]”,

“user_name” : “admin”,

“user_requested_tenant” : null,

“remote_address” : “[::1]:52214”,

“backend_roles” : [

“admin”

],

“custom_attribute_names” : [

“attr.internal.attribute1”,

“attr.internal.attribute2”,

“attr.internal.attribute3”

],

“sg_roles” : [

“sg_all_access”,

“sg_own_index”

],

“sg_tenants” : {

“admin_tenant” : true,

“admin” : true

},

“principal” : null,

“peer_certificates” : “0”

}

On Monday, 5 March 2018 14:38:43 UTC+1, ihjaz Mohamed wrote:

  • Which JVM version and vendor do you use?

java -version

openjdk version “1.8.0_161”

OpenJDK Runtime Environment (build 1.8.0_161-b14)

OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

  • Which operating system version and vendor?

Red Hat Enterprise Linux Server release 7.4 (Maipo)

  • Do you have installed other plugins (like x-pack?)

No other plugins installed

  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)

rpm -ivh elasticsearch-6.2.2.rpm

  • How did you install Search Guard?

Downloaded search-guard-6-6.2.2-21.0.zip and ran below command.

/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file:///opt/search-guard-6-6.2.2-21.0.zip

I’ve attached the entire logs from startup.

On Monday, March 5, 2018 at 6:24:11 PM UTC+5:30, Search Guard wrote:

Pls post the startup logs when the node starts until it fails.

  • Which JVM version and vendor do you use?
  • Which operating system version and vendor?
  • Do you have installed other plugins (like x-pack?)
  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)
  • How did you install Search Guard?

On Monday, 5 March 2018 12:02:57 UTC+1, ihjaz Mohamed wrote:

Hi All,

I’m using

Elasticsearch - 6.2.2

SearchGuard 6 - 6.2.2-21

I’m getting the following exception on starting Elasticseach after installing the Searchguard plugin.

[2018-03-05T15:39:04,367][ERROR][o.e.b.Bootstrap ] Exception

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

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Caused by: java.lang.NoSuchFieldError: id_blake2s256

at org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings.configure(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown Source) ~[?:?]

at com.floragunn.searchguard.SearchGuardPlugin$2.run(SearchGuardPlugin.java:215) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:211) ~[?:?]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Any idea why this is happening?

Hi,

Here is the location for the jars.

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/ext/bc-fips-1.0.1.jar

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/ext/bcpkix-fips-1.0.0.jar

···

On Tuesday, March 6, 2018 at 2:16:15 AM UTC+5:30, Search Guard wrote:

where does your JVM contain bouncycastle jars?

On Monday, 5 March 2018 15:59:37 UTC+1, ihjaz Mohamed wrote:

Hi,

I replaced the below jars at /usr/share/elasticsearch/plugins/search-guard-6

bcpg-jdk15on-1.59.jar

bcprov-jdk15on-1.59.jar

with

bcpg-jdk15on-1.57.jar

bcprov-jdk15on-1.57.jar

This worked for me. Elasticsearch started without any errors.

My JDK has the following Bouncycastle jars. Looks like these don’t have all the ciphers supported by the new jars.

bc-fips-1.0.1.jar

bcpkix-fips-1.0.0.jar

Can you please check if your JVM has any Bouncycastle related jars ?

On Monday, March 5, 2018 at 7:40:10 PM UTC+5:30, Search Guard wrote:

can not reproduce

AWS RHEL-7.4_HVM-20180103-x86_64-2-Hourly2-GP2 (ami-c90195b0)

sudo yum install wget java

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.rpm

sudo rpm -ivh elasticsearch-6.2.2.rpm

sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install -b com.floragunn:search-guard-6:6.2.2-21.0

sudo chmod +x /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh

sudo /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh -y -i -c

sudo systemctl restart elasticsearch.service

sudo cat /var/log/elasticsearch/searchguard_demo.log

curl -ksS -u admin:admin https://localhost:9200/_searchguard/authinfo?pretty

{

“user” : “User [name=admin, roles=[admin], requestedTenant=null]”,

“user_name” : “admin”,

“user_requested_tenant” : null,

“remote_address” : “[::1]:52214”,

“backend_roles” : [

“admin”

],

“custom_attribute_names” : [

“attr.internal.attribute1”,

“attr.internal.attribute2”,

“attr.internal.attribute3”

],

“sg_roles” : [

“sg_all_access”,

“sg_own_index”

],

“sg_tenants” : {

“admin_tenant” : true,

“admin” : true

},

“principal” : null,

“peer_certificates” : “0”

}

On Monday, 5 March 2018 14:38:43 UTC+1, ihjaz Mohamed wrote:

  • Which JVM version and vendor do you use?

java -version

openjdk version “1.8.0_161”

OpenJDK Runtime Environment (build 1.8.0_161-b14)

OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

  • Which operating system version and vendor?

Red Hat Enterprise Linux Server release 7.4 (Maipo)

  • Do you have installed other plugins (like x-pack?)

No other plugins installed

  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)

rpm -ivh elasticsearch-6.2.2.rpm

  • How did you install Search Guard?

Downloaded search-guard-6-6.2.2-21.0.zip and ran below command.

/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file:///opt/search-guard-6-6.2.2-21.0.zip

I’ve attached the entire logs from startup.

On Monday, March 5, 2018 at 6:24:11 PM UTC+5:30, Search Guard wrote:

Pls post the startup logs when the node starts until it fails.

  • Which JVM version and vendor do you use?
  • Which operating system version and vendor?
  • Do you have installed other plugins (like x-pack?)
  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)
  • How did you install Search Guard?

On Monday, 5 March 2018 12:02:57 UTC+1, ihjaz Mohamed wrote:

Hi All,

I’m using

Elasticsearch - 6.2.2

SearchGuard 6 - 6.2.2-21

I’m getting the following exception on starting Elasticseach after installing the Searchguard plugin.

[2018-03-05T15:39:04,367][ERROR][o.e.b.Bootstrap ] Exception

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

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Caused by: java.lang.NoSuchFieldError: id_blake2s256

at org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings.configure(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown Source) ~[?:?]

at com.floragunn.searchguard.SearchGuardPlugin$2.run(SearchGuardPlugin.java:215) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:211) ~[?:?]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Any idea why this is happening?

thx

this is not supported at the moment but we check this for the next release

···

On Tuesday, 6 March 2018 08:25:21 UTC+1, ihjaz Mohamed wrote:

Hi,

Here is the location for the jars.

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/ext/bc-fips-1.0.1.jar

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/ext/bcpkix-fips-1.0.0.jar

On Tuesday, March 6, 2018 at 2:16:15 AM UTC+5:30, Search Guard wrote:

where does your JVM contain bouncycastle jars?

On Monday, 5 March 2018 15:59:37 UTC+1, ihjaz Mohamed wrote:

Hi,

I replaced the below jars at /usr/share/elasticsearch/plugins/search-guard-6

bcpg-jdk15on-1.59.jar

bcprov-jdk15on-1.59.jar

with

bcpg-jdk15on-1.57.jar

bcprov-jdk15on-1.57.jar

This worked for me. Elasticsearch started without any errors.

My JDK has the following Bouncycastle jars. Looks like these don’t have all the ciphers supported by the new jars.

bc-fips-1.0.1.jar

bcpkix-fips-1.0.0.jar

Can you please check if your JVM has any Bouncycastle related jars ?

On Monday, March 5, 2018 at 7:40:10 PM UTC+5:30, Search Guard wrote:

can not reproduce

AWS RHEL-7.4_HVM-20180103-x86_64-2-Hourly2-GP2 (ami-c90195b0)

sudo yum install wget java

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.2.rpm

sudo rpm -ivh elasticsearch-6.2.2.rpm

sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install -b com.floragunn:search-guard-6:6.2.2-21.0

sudo chmod +x /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh

sudo /usr/share/elasticsearch/plugins/search-guard-6/tools/install_demo_configuration.sh -y -i -c

sudo systemctl restart elasticsearch.service

sudo cat /var/log/elasticsearch/searchguard_demo.log

curl -ksS -u admin:admin https://localhost:9200/_searchguard/authinfo?pretty

{

“user” : “User [name=admin, roles=[admin], requestedTenant=null]”,

“user_name” : “admin”,

“user_requested_tenant” : null,

“remote_address” : “[::1]:52214”,

“backend_roles” : [

“admin”

],

“custom_attribute_names” : [

“attr.internal.attribute1”,

“attr.internal.attribute2”,

“attr.internal.attribute3”

],

“sg_roles” : [

“sg_all_access”,

“sg_own_index”

],

“sg_tenants” : {

“admin_tenant” : true,

“admin” : true

},

“principal” : null,

“peer_certificates” : “0”

}

On Monday, 5 March 2018 14:38:43 UTC+1, ihjaz Mohamed wrote:

  • Which JVM version and vendor do you use?

java -version

openjdk version “1.8.0_161”

OpenJDK Runtime Environment (build 1.8.0_161-b14)

OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

  • Which operating system version and vendor?

Red Hat Enterprise Linux Server release 7.4 (Maipo)

  • Do you have installed other plugins (like x-pack?)

No other plugins installed

  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)

rpm -ivh elasticsearch-6.2.2.rpm

  • How did you install Search Guard?

Downloaded search-guard-6-6.2.2-21.0.zip and ran below command.

/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file:///opt/search-guard-6-6.2.2-21.0.zip

I’ve attached the entire logs from startup.

On Monday, March 5, 2018 at 6:24:11 PM UTC+5:30, Search Guard wrote:

Pls post the startup logs when the node starts until it fails.

  • Which JVM version and vendor do you use?
  • Which operating system version and vendor?
  • Do you have installed other plugins (like x-pack?)
  • How did you install Elasticsearch (zip, tar.gz, rpm, deb, …)
  • How did you install Search Guard?

On Monday, 5 March 2018 12:02:57 UTC+1, ihjaz Mohamed wrote:

Hi All,

I’m using

Elasticsearch - 6.2.2

SearchGuard 6 - 6.2.2-21

I’m getting the following exception on starting Elasticseach after installing the Searchguard plugin.

[2018-03-05T15:39:04,367][ERROR][o.e.b.Bootstrap ] Exception

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

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:505) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:422) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.plugins.PluginsService.(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.node.Node.(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-6.2.2.jar:6.2.2]

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) [elasticsearch-6.2.2.jar:6.2.2]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Caused by: java.lang.NoSuchFieldError: id_blake2s256

at org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings.configure(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source) ~[?:?]

at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at org.bouncycastle.jce.provider.BouncyCastleProvider.(Unknown Source) ~[?:?]

at com.floragunn.searchguard.SearchGuardPlugin$2.run(SearchGuardPlugin.java:215) ~[?:?]

at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_161]

at com.floragunn.searchguard.SearchGuardPlugin.(SearchGuardPlugin.java:211) ~[?:?]

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) ~[?:1.8.0_161]

at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:554) ~[elasticsearch-6.2.2.jar:6.2.2]

… 15 more

Any idea why this is happening?