Skip to content

NoClassDefFoundError while executing groovy script #20811

@darshanmehta10

Description

@darshanmehta10

Elasticsearch version: 1.7.3

Plugins installed: [Kopf, Bigdesk]

JVM version: 1.8.0_101

OS version: GNU/Linux

Description of the problem including expected versus actual behavior:
ES update request throws NoClassDefFoundError for sun.security.util.SecurityConstants class after recovering from network outage. We have then tried restarting nodes but are still seeing the error.

There is no change in the scripts/JVM version, the error is thrown for every update request after node recovery/restart.

Steps to reproduce:

  1. Send update request with script file param and json document
  2. Update fails with error message : org.elasticsearch.script.groovy.GroovyScriptExecutionException: NoClassDefFoundError[Could not initialize class sun.security.util.SecurityConstants]

Provide logs (if relevant):
Failed to index document
org.elasticsearch.ElasticsearchIllegalArgumentException: failed to execute script
at org.elasticsearch.action.update.UpdateHelper.prepare(UpdateHelper.java:202)
at org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:176)
at org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:170)
at org.elasticsearch.action.support.single.instance.TransportInstanceSingleOperationAction$AsyncSingleAction$1.run(TransportInstanceSingleOperationAction.java:187)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.groovy.GroovyScriptExecutionException: NoClassDefFoundError[Could not initialize class sun.security.util.SecurityConstants]
at org.elasticsearch.script.groovy.GroovyScriptEngineService$GroovyScript.run(GroovyScriptEngineService.java:274)
at org.elasticsearch.action.update.UpdateHelper.prepare(UpdateHelper.java:198)
... 6 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Core/Infra/ScriptingScripting abstractions, Painless, and Mustache

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions