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

Elasticsearch Server Details?

cmeinck

Well-known member
#1
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 127.0.0.1:9200

Elasticsearch Index Name is blank.

Thoughts? Suggestions?
 

Slavik

XenForo moderator
Staff member
#2
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.
 

cmeinck

Well-known member
#3
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?"
 

Mike

XenForo developer
Staff member
#4
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
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 127.0.0.1:9200

Elasticsearch Index Name is blank.

Thoughts? Suggestions?
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 0.0.0.0 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

network.host: 127.0.0.1
 

Deebs

Well-known member
#6
You definitely need a port specified. The default is 9200.

If you have shell access to your server enter the following:
netstat -an | grep -i listen | grep 9200
If should return some information if it is running and listening on the port specified, in this case 9200.
 

cmeinck

Well-known member
#7
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.
 

giorgino

Well-known member
#8
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.
It's ok something like this?
Code:
# netstat -an | grep -i listen | grep 9200
tcp        0      0 :::9200                    :::*                        LISTEN
 

cmeinck

Well-known member
#10
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.
In layman's terms how would I go about this? I do have shell access via terminal, so can run commands if provided.
 

Slavik

XenForo moderator
Staff member
#11
I'll add it into the guide shortly.

For now run

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

And post back the results.
 

Slavik

XenForo moderator
Staff member
#13
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

Code:
# network.host: 192.168.0.1
to
Code:
network.host: 192.168.0.1
Go to line 211 and change
Code:
# http.port: 9200
to
Code:
http.port: 9200
Save and exit.
Open up terminal (Ctrl+T in WinSCP) and type
Code:
rcelasticsearch start
Once it has restarted type
Code:
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 192.168.0.1 and 9200 respectively.
 

cmeinck

Well-known member
#15
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.
 

cmeinck

Well-known member
#16
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
 

Slavik

XenForo moderator
Staff member
#17
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.

View attachment 23782
ah ok your running debian then.

use

Code:
/etc/init.d/elasticsearch restart
instead
 

cmeinck

Well-known member
#18
Thanks for your patience with me. Received this error:

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