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

SearchPhaseExecutionException[Failed to execute phase [query], all shards failed;

Discussion in 'Enhanced Search Support' started by Mouth, Sep 20, 2014.

  1. Mouth

    Mouth Well-Known Member

    xfES v1.1.1
    ElasticSearch v1.3.2

    Have started getting the following error for all searches ...

    ElasticSearch options ..
    Screen Shot 2014-09-20 at 11.22.19.png

    Search Options ...
    Screen Shot 2014-09-20 at 11.22.48.png

    I've just finished a full rebuild, but this didn't resolve it ...
    Screen Shot 2014-09-20 at 11.24.45.png

    Have also restarted ElasticSearch to check it is running properly ...
    Code:
    curl http://127.0.0.1:9200
    {
      "status" : 200,
      "name" : "Master Mold",
      "version" : {
        "number" : "1.3.2",
        "build_hash" : "dee175dbe2f254f3f26992f5d7591939aaefd12f",
        "build_timestamp" : "2014-08-13T14:29:30Z",
        "build_snapshot" : false,
        "lucene_version" : "4.9"
      },
      "tagline" : "You Know, for Search"
    }
     
  2. MattW

    MattW Well-Known Member

  3. Mouth

    Mouth Well-Known Member

    Thanks, I previously read those.
    According to #3 since I have the dynamic search enabled then I don't need to have the _scripts/* copied over to /etc/elasticsearch/
    I'll try turning it off though (and copying the files), and see how that goes.
     
  4. Mouth

    Mouth Well-Known Member

    Thanks, that fixed it.
    I must have mis-understood - I read that the scripts weren't required if using dynamic.
    Appears better that I have it off.
     
  5. Mike

    Mike XenForo Developer Staff Member

    The scripts aren't required if using dynamic scripting, but it does need to be enabled in your config. (Dynamic scripting with Groovy is supposed to be the default from my understanding.)

    The relevant part of the exception was at the end:
     
  6. archimedes

    archimedes Member

    Is there a groovy script for elasticsearch 1.4.3?
     
  7. Mike

    Mike XenForo Developer Staff Member

    There is a Groovy script included with Enhanced Search (in library/XenES/_scripts).
     
  8. archimedes

    archimedes Member

    Doesn't work for me with elasticsearch version 1.4.3
    Now I deactivated dynamic scripting in the config, but the other way is more secure.
     
  9. Mike

    Mike XenForo Developer Staff Member

    Are you sure you put the scripts in the correct place? If so, you will see log entries in Elasticsearch indicated that they were loaded. (Note that Elasticsearch polls for script changes, so you need to wait for the log entry indicating that they were loaded.)
     
  10. Moshe1010

    Moshe1010 Well-Known Member

    I'm a litte bit confused. What would be "better", to enable dynamic scripting or using the included script?
     
  11. Mike

    Mike XenForo Developer Staff Member

    Dynamic scripting can be a security issue if your Elasticsearch server can be accessed by untrusted users (or is misconfigured so that can happen).

    Non-dynamic scripting will likely be slightly (probably imperceptibly) faster due to pre-compiling rather than doing it with each search.
     
    Moshe1010 likes this.
  12. Mouth

    Mouth Well-Known Member

  13. Moshe1010

    Moshe1010 Well-Known Member

  14. TheComputerGuy

    TheComputerGuy Active Member

    I'm getting several errors as of late.

    Code:
    ScriptException[dynamic scripting for [groovy] disabled]; }]
    Does Groovy need to be enabled?
     
  15. The Forum Heroes

    The Forum Heroes Well-Known Member

    With us Chris?
     
  16. TheComputerGuy

    TheComputerGuy Active Member

    Nope. This is the setup with AWS
     
    The Forum Heroes likes this.
  17. Mike

    Mike XenForo Developer Staff Member

    You'd either need to enable dynamic scripting with groovy or switch to non-dynamic scripting (and ensure the scripts are stored in your Elasticsearch config).
     

Share This Page