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

Elasticsearch running - but XF won't reindex

CTXMedia

Formerly CyclingTribe
#1
I've enabled elasticsearch in the Options > Search settings and set stemming in the tools page, but when I click to reindex it tells me it cannot find elasticsearch:

No response returned from Elasticsearch. Is it running?

It is running on the server - any advice on what to look at first?

Thanks,
Shaun :D
 

Brogan

XenForo moderator
Staff member
#2
I don't have it installed so this is just guesswork, but do you have the correct settings in Options -> Search Options: Elasticsearch Server Details ?
 

CTXMedia

Formerly CyclingTribe
#3
I don't have it installed so this is just guesswork, but do you have the correct settings in Options -> Search Options: Elasticsearch Server Details ?
Yeah, I think so.

Does elasticsearch create any "hard" files or directories on the server that I could look out for, to see if it has reached a certain point and then failed?
 

Slavik

XenForo moderator
Staff member
#6
Have you manually entered anything into the settings box or just left them as default?

If you have entered something in, try resetting it to default.
 

Mike

XenForo developer
Staff member
#8
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.
 

CTXMedia

Formerly CyclingTribe
#9
Spot on Mike - it was binding to the wrong address so edited the config file and bound it to 127.0.0.1 and it's now indexing.

I assume 127.0.0.1 is okay?

Thanks,
Shaun :D
 
#10
I've enabled elasticsearch in the Options > Search settings and set stemming in the tools page, but when I click to reindex it tells me it cannot find elasticsearch:

No response returned from Elasticsearch. Is it running?

It is running on the server - any advice on what to look at first?

Thanks,
Shaun :D
I had this too and had to bind the
network.host:
To a specific ip. That solved it for me.
 

Mike

XenForo developer
Staff member
#12
Spot on Mike - it was binding to the wrong address so edited the config file and bound it to 127.0.0.1 and it's now indexing.

I assume 127.0.0.1 is okay?

Thanks,
Shaun :D
Yeah, or if you want to use a central ES server (because you have multiple web servers), your internal IP. But here, we have it bound to 127.0.0.1 without any issues.
 

CTXMedia

Formerly CyclingTribe
#13
Excellent - thanks for the help, and having just tried a search (whilst it is still reindexing) it is coming back lightning fast - so well worth the investment!! (y)
 

Rob

Well-known member
#16
Ok, I have installed elasticsearch and checked to see if it is running.

I am confused by the output of these commands:-
Code:
[xxxx sbin]# /etc/init.d/elasticsearch start
Starting elasticsearch: (null) already running.
failed.
 
 
[xxxx sbin]# /etc/init.d/elasticsearch stop
Stopping elasticsearch: start-stop-daemon: warning: failed to kill 23310: No such process
1 pids were not killed
No process in pidfile `/var/run/elasticsearch.pid' found running; none killed.
failed.
 
 
[xxxx sbin]# /etc/init.d/elasticsearch force-reload
Stopping elasticsearch: start-stop-daemon: warning: failed to kill 23310: No such process
1 pids were not killed
No process in pidfile `/var/run/elasticsearch.pid' found running; none killed.
failed.
Starting elasticsearch: (null) already running.
failed.
Is it running or not? I think i have stuffed up somewhere. Java is installed ok and is V1.7.0_03
I've added the service with chkconfig and it didnt return any errors

Im very confused with the above command outputs.
 

Slavik

XenForo moderator
Staff member
#17
Ok, I have installed elasticsearch and checked to see if it is running.

I am confused by the output of these commands:-
Code:
[xxxx sbin]# /etc/init.d/elasticsearch start
Starting elasticsearch: (null) already running.
failed.
 
 
[xxxx sbin]# /etc/init.d/elasticsearch stop
Stopping elasticsearch: start-stop-daemon: warning: failed to kill 23310: No such process
1 pids were not killed
No process in pidfile `/var/run/elasticsearch.pid' found running; none killed.
failed.
 
 
[xxxx sbin]# /etc/init.d/elasticsearch force-reload
Stopping elasticsearch: start-stop-daemon: warning: failed to kill 23310: No such process
1 pids were not killed
No process in pidfile `/var/run/elasticsearch.pid' found running; none killed.
failed.
Starting elasticsearch: (null) already running.
failed.
Is it running or not? I think i have stuffed up somewhere. Java is installed ok and is V1.7.0_03
I've added the service with chkconfig and it didnt return any errors

Im very confused with the above command outputs.
Type

Code:
curl http://127.0.0.1:9200
And see what it returns.
 

shawn

Well-known member
#19
If it happens again, type "ps -ax | grep elasticsearch"

Then whatever PID comes up, type "kill #####".

Then "service elasticsearch start"