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

Elasticsearch Server Details?

Discussion in 'Enhanced Search Support' started by cmeinck, Jan 18, 2012.

  1. cmeinck

    cmeinck Well-Known Member

    I've had my IT support group reluctantly install Elasticsearch on my server, letting me know they won't provide me any support. I've uploaded the new library files and found my way to Search Options.

    Before I enable Elasticsearch, I wanted to know what should be in the Elasticsearch Server Details. Right now, it's defaulted to

    Elasticsearch Index Name is blank.

    Thoughts? Suggestions?
  2. Slavik

    Slavik XenForo Moderator Staff Member

    If they have done a basic install, leave those as they are, when you try to index if they have configured different ports it will throw an error.
  3. cmeinck

    cmeinck Well-Known Member

    It allows me to enable it. However, when I go to Tools > Elasticsearch Setup, it keeps reverting back to "Do Not Change" if I select Stemming Analyzer. If I attempt to rebuild search caches, I get the error "No response returned from Elasticsearch. Is it running?"
  4. Mike

    Mike XenForo Developer Staff Member

    Your elasticsearch server may not be binding to the correct IP. You may need to setup your configuration to only bind to your internal IP address (which is probably the safest thing to do).

    The IP it bound to may be in a log file somewhere (depending on configuration), but the easiest thing would be to stop the elasticsearch service and then re-run it in the foreground (/path/to/es/elasticsearch -f) and see what it says. One option would be to enter that IP in XF.
  5. anonymous

    anonymous Member

    If you're running it on the same server that should do. I would on the other hand only use it if you really need it, and if you know your way around a terminal. You should tune elasticsearch.yml to work with your setup.

    According to the config:

    # ElasticSearch, by default, binds itself to the address, and listens
    # on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node
    # communication.

    This means (someone please correct me if wrong) when it's running, elasticsearch can be reached from all the interfaces on your server (private / public). In your case I would specify

  6. Deebs

    Deebs Well-Known Member

    You definitely need a port specified. The default is 9200.

    If you have shell access to your server enter the following:
    If should return some information if it is running and listening on the port specified, in this case 9200.
  7. cmeinck

    cmeinck Well-Known Member

    I appreciate the support, but unfortunately it's beyond my knowledge level. I'm going to push the server support group I employ to see if they'll be able to assist.

    I really wish I knew more about this sort of stuff -- very frustrating dealing with my server support. They just throw their hands in the air.
  8. giorgino

    giorgino Well-Known Member

    It's ok something like this?
    # netstat -an | grep -i listen | grep 9200
    tcp        0      0 :::9200                    :::*                        LISTEN  
  9. Deebs

    Deebs Well-Known Member

    That is telling me it is listening on all IP addresses bound to your server.
    giorgino likes this.
  10. cmeinck

    cmeinck Well-Known Member

    In layman's terms how would I go about this? I do have shell access via terminal, so can run commands if provided.
  11. Slavik

    Slavik XenForo Moderator Staff Member

    I'll add it into the guide shortly.

    For now run

    netstat -an | grep -i listen | grep 9200​

    And post back the results.
  12. cmeinck

    cmeinck Well-Known Member

    Nothing. Just goes back to terminal prompt.
  13. Slavik

    Slavik XenForo Moderator Staff Member

    Ok, from your posts, I assume your on RHEL and are not versed in using any command line editors.

    First off, download and install WinSCP, this will allow you a GUI to make the edits required.

    Open it up and connect to your server

    Navigate to /elasticsearch/config and open up elasticsearch.yml

    Scroll down to line 199 and change

    # network.host:
    Go to line 211 and change
    # http.port: 9200
    http.port: 9200
    Save and exit.
    Open up terminal (Ctrl+T in WinSCP) and type
    rcelasticsearch start
    Once it has restarted type
    netstat -an | grep -i listen | grep 9200
    And it should come back with some results.

    Go into XenForo search options and set the address and port to and 9200 respectively.
  14. Slavik

    Slavik XenForo Moderator Staff Member

    If your a bit dubious about doing these changes, I can also do them for you if you need.
  15. cmeinck

    cmeinck Well-Known Member

    I downloaded WinSCP, but it cannot find that path.

    I reached out to my server support team, asking them for the path and what they had done this morning. I received this response:

    I downloaded the package to /usr/local/ and symlynk exec to /usr/bin/ so it can be execured from console .
    I also installed open-jdk, because Elastisearch was requesting java .
    Unfortunately, we cannot provind further assistance with configurations because we are not providing support for this software.

    I'm ok with making changes if I can find the appropriate files. They also had port 9200 blocked, so they apparently reopened that port.
  16. cmeinck

    cmeinck Well-Known Member

    I was able to locate the file and make the changes. When I run the execute command in terminal, I receive the following error:

    Command 'rcelasticsearch start' failed with return code 127 and error message -bash: line 8: rcelasticsearch: command not found.

    Screen Shot 2012-01-18 at 5.03.57 PM.png
  17. Slavik

    Slavik XenForo Moderator Staff Member

    ah ok your running debian then.


    /etc/init.d/elasticsearch restart
  18. cmeinck

    cmeinck Well-Known Member

    Thanks for your patience with me. Received this error:

    /usr/local/elasticsearch-0.18.7/bin$ /etc/init.d/elasticsearch restart
    -bash: line 19: /etc/init.d/elasticsearch: No such file or directory
  19. Slavik

    Slavik XenForo Moderator Staff Member

    Thats strange?

    Ill drop you a PC.
  20. Slavik

    Slavik XenForo Moderator Staff Member

    Ok have sorted this now.

    cmeinck's host had not installed the service wrapper and thus nothing was actually running. They had also done a lousy install (didnt even bother to rename the folders) so I tidied it up and binded the address correctly.

Share This Page