geerlingguy / ansible-role-solr

Ansible Role - Apache Solr
https://galaxy.ansible.com/geerlingguy/solr/
MIT License
101 stars 124 forks source link

Debian 12 with OpenJDK Java 17 results in 'No ScriptEngine found' error #140

Open geerlingguy opened 9 months ago

geerlingguy commented 9 months ago
TASK [geerlingguy.solr : Create configured cores.] *****************************
  failed: [instance] (item=collection1) => {"ansible_loop_var": "item", "changed": true, "cmd": ["/opt/solr/bin/solr", "create", "-c", "collection1", "-p", "8983"], "delta": "0:00:02.255777", "end": "2024-01-25 04:22:02.323041", "item": "collection1", "msg": "non-zero return code", "rc": 1, "start": "2024-01-25 04:22:00.067264", "stderr": "\nERROR: Error CREATEing SolrCore 'collection1': Unable to create core [collection1] Caused by: No ScriptEngine found by file extension: update-script.js -- supported extensions: ", "stderr_lines": ["", "ERROR: Error CREATEing SolrCore 'collection1': Unable to create core [collection1] Caused by: No ScriptEngine found by file extension: update-script.js -- supported extensions: "], "stdout": "WARNING: Using _default configset with data driven schema functionality. NOT RECOMMENDED for production use.\n         To turn off: bin/solr config -c collection1 -p 8983 -action set-user-property -property update.autoCreateFields -value false", "stdout_lines": ["WARNING: Using _default configset with data driven schema functionality. NOT RECOMMENDED for production use.", "         To turn off: bin/solr config -c collection1 -p 8983 -action set-user-property -property update.autoCreateFields -value false"]}

Specifically:

ERROR: Error CREATEing SolrCore 'collection1': Unable to create core [collection1]
Caused by: No ScriptEngine found by file extension: update-script.js

The only other mention I've seen is https://stackoverflow.com/questions/77274988/solr-9-2-with-jdk-17-java-script-engine-not-found

Right now I'm planning on testing on Debian 11 and not 12 for the latest versions, since I can install OpenJDK 11 a little easier there.

vesdev commented 8 months ago

this is because nashorn got removed. https://solr.apache.org/guide/solr/latest/configuration-guide/script-update-processor.html#enababling-the-scriptingupdateprocessor-and-scripting-engines

It is still possible to use it by placing the jar in /lib/ https://mvnrepository.com/artifact/org.openjdk.nashorn/nashorn-core/15.4