• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Need help understanding this server error for ES

Renegade

Well-known member
#1
Can someone help me figure out whats wrong and what should I look at. Elastic search is running on server and the IP/port are correctly bound in config and ACP.

XenForo_Exception: Elasticsearch error: ClusterBlockException[blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];[SERVICE_UNAVAILABLE/2/no master];] - library/XenES/Search/SourceHandler/ElasticSearch.php:828
 

Renegade

Well-known member
#3
That is fixed now and the search was working until I rebuilt the index. Now I am getting this error.

XenForo_Exception: Elasticsearch error: SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[RQGeF7CxRd6rQFlkD5TpYw][cl_texf][1]: SearchParseException[[cl_texf][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"query_string":{"query":"game theory","fields":["title^3","message"],"default_operator":"and"}},"script_score":{"params":{"now":1407862907,"halflife":31536000},"script":"xf-date-weighted"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":200,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[cl_texf] script_score the script could not be loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled]; }{[RQGeF7CxRd6rQFlkD5TpYw][cl_texf][0]: SearchParseException[[cl_texf][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"query_string":{"query":"game theory","fields":["title^3","message"],"default_operator":"and"}},"script_score":{"params":{"now":1407862907,"halflife":31536000},"script":"xf-date-weighted"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":200,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[cl_texf] script_score the script could not be loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled]; }{[RQGeF7CxRd6rQFlkD5TpYw][cl_texf][4]: SearchParseException[[cl_texf][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":{"function_score":{"boost_mode":"replace","query":{"query_string":{"query":"game theory","fields":["title^3","message"],"default_operator":"and"}},"script_score":{"params":{"now":1407862907,"halflife":31536000},"script":"xf-date-weighted"}}},"sort":[{"_score":"desc"},{"date":"desc"}],"size":200,"fields":["discussion_id","user","date"]}]]]; nested: QueryParsingException[[cl_texf] script_score the script could not be loaded]; nested: ScriptException[dynamic scripting for [mvel] disabled]; }] -library/XenES/Search/SourceHandler/ElasticSearch.php:828

I did follow these instructions: Stop ES. Delete the data directory, restart ES and reindex.
 
Last edited:

Mike

XenForo developer
Staff member
#4
See the options in XFES regarding dynamic scripting - you need to setup those based on ES and possibly manually copy script files to the expected directory in ES.
 

Renegade

Well-known member
#5
Thanks Mike. I will look into this later. For now I have just disabled the following option and all seems to be working
Enable recency weighted relevance searching with specified half-life (days):