java.lang.NoSuchFieldError: id_blake2s256

1,080 views
Skip to first unread message

ihjaz Mohamed

unread,
Mar 5, 2018, 6:02:57 AM3/5/18
to Search Guard Community Forum
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.<init>(PluginsService.java:146) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.node.Node.<init>(Node.java:303) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.node.Node.<init>(Node.java:246) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(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.<init>(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.<init>(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?

Search Guard

unread,
Mar 5, 2018, 7:54:11 AM3/5/18
to Search Guard Community Forum
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?

ihjaz Mohamed

unread,
Mar 5, 2018, 8:38:43 AM3/5/18
to Search Guard Community Forum


- 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

Search Guard

unread,
Mar 5, 2018, 9:10:10 AM3/5/18
to Search Guard Community Forum
can not reproduce

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

sudo yum install wget java
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


{
  "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"

ihjaz Mohamed

unread,
Mar 5, 2018, 9:59:37 AM3/5/18
to Search Guard Community Forum
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 ? 

Search Guard

unread,
Mar 5, 2018, 3:46:15 PM3/5/18
to Search Guard Community Forum
where does your JVM contain bouncycastle jars?

ihjaz Mohamed

unread,
Mar 6, 2018, 2:25:21 AM3/6/18
to Search Guard Community Forum
 
  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

Search Guard

unread,
Mar 6, 2018, 2:36:02 AM3/6/18
to Search Guard Community Forum
thx

this is not supported at the moment but we check this for the next release
Reply all
Reply to author
Forward
0 new messages