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

Rebuild Search: "No response returned from Elasticsearch. Is it running?"

Marcus

Well-known member
#1
I always get the "No response returned from Elasticsearch. Is it running?" messagen when I rebuild my search index. I have installed Elasticsearch from the sticked RHEL installation guide of this forum.

[root@server ~]# rcelasticsearch restart
Stopping ElasticSearch...
Stopped ElasticSearch.
Starting ElasticSearch...
Waiting for ElasticSearch......
running: PID:1855
[root@server ~]#
Is there another way to test if elasticsearch is working?
 

Mike

XenForo developer
Staff member
#2
Try running this via the command line and seeing if it responds:
Code:
curl http://127.0.0.1:9200
If not, then either the service isn't running or it's bound to a different IP. Check the network.host (IIRC) value in the config.
 

Marcus

Well-known member
#3
I get this
[root@server ~]# curl http://127.0.0.1:9200
{
"ok" : true,
"name" : "Dark Beast",
"version" : {
"number" : "0.18.7",
"snapshot_build" : false
},
"tagline" : "You Know, for Search",
"cover" : "DON'T PANIC",
"quote" : {
"book" : "Life, the Universe and Everything",
"chapter" : "Chapter 2",
"text1" : "\"I have detected,\" he said, \"disturbances in the wash.\" [...]",
"text2" : "\"The wash?\" said Arthur.",
"text3" : "\"The space-time wash,\" said Ford. [...]",
"text4" : "Arthur nodded, and then cleared his throat. \"Are we talking about,\" he asked cautiously, \"some sort of Vogon laundromat, or what are we talking about?\"",
"text5" : "\"Eddies,\" said Ford, \"in the space-time continuum.\"",
"text6" : "\"Ah,\" nodded Arthur, \"is he? Is he?\" He pushed his hands into the pocket of his dressing gown and looked knowledgeably into the distance.",
"text7" : "\"What?\" said Ford.",
"text8" : "\"Er, who,\" said Arthur, \"is Eddy, then, exactly, then?\""
}
}[root@server ~]#
 

Mike

XenForo developer
Staff member
#4
Well, that looks like it's running there. Check the network configuration in ES though. You may want to explicitly bind to 127.0.0.1 anyway.
 

Marcus

Well-known member
#5
I set configuration in this section as follow and the search index can be rebuild now:
############################## Network And HTTP ###############################

# 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. (the range means that if the port is busy, it will automatically
# try the next port).

# Set the bind address specifically (IPv4 or IPv6):
#
# network.bind_host: 192.168.0.1

# Set the address other nodes will use to communicate with this node. If not
# set, it is automatically derived. It must point to an actual IP address.
#
# network.publish_host: 192.168.0.1

# Set both 'bind_host' and 'publish_host':
#
network.host: 127.0.0.1

# Set a custom port for the node to node communication (9300 by default):
#
# transport.tcp.port: 9300

# Enable compression for all communication between nodes (disabled by default):
#
# transport.tcp.compress: true

# Set a custom port to listen for HTTP traffic:
#
http.port: 9200

# Set a custom allowed content length:
#
# http.max_content_length: 100mb

# Disable HTTP completely:
#
# http.enabled: false
In addition I asked my server management to open port 9200 (before I started this thread), I am unsure if this was necessary.
 

Hoffi

Well-known member
#6
I hab this at the first try to reindex. Restartet the Elastisearch service and trye again. Then it works. Have you tried that?
 

Marcus

Well-known member
#7
I used the restart ... command but it did not work. With my the changes in the configuration file (post #5) and after restarting it, everything works.