Unable to connect http://127.0.0.1:9200

Hi ,

unable to connect http://127.0.0.1:9200 and got the below error

curl -XGET http://127.0.0.1:9200
curl: (7) Failed to connect to 127.0.0.1 port 9200: Connection refused

Is ES running?

If not you need to provide more info because it's very hard to help with what you have provided.

Yes elastic search is running

curl -XGET http://127.0.0.1:9200
curl: (7) Failed to connect to 127.0.0.1 port 9200: Connection refused
service elasticsearch status
elasticsearch (pid 5215) is running...

What are elasticsearch logs please.

Please find the logs data below.

[2017-06-28 08:23:36,320][INFO ][gateway ] [Armor] recovered [5] indices into cluster_state
[2017-06-28 08:23:37,252][INFO ][cluster.routing.allocation] [Armor] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[firs][2], [firs][0], [firs][2], [.kibana][0], [firs][3], [firs][0]] ...]).
[2017-06-28 08:46:37,894][INFO ][node ] [Armor] stopping ...
[2017-06-28 08:46:37,975][INFO ][node ] [Armor] stopped
[2017-06-28 08:46:37,975][INFO ][node ] [Armor] closing ...
[2017-06-28 08:46:37,978][INFO ][node ] [Armor] closed
[2017-06-28 08:46:39,614][INFO ][node ] [Topaz] version[2.4.4], pid[5215], build[fcbb46d/2017-01-03T11:33:16Z]
[2017-06-28 08:46:39,614][INFO ][node ] [Topaz] initializing ...
[2017-06-28 08:46:40,056][INFO ][plugins ] [Topaz] modules [reindex, lang-expression, lang-groovy], plugins , sites
[2017-06-28 08:46:40,073][INFO ][env ] [Topaz] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [22.4gb], net total_space [24.4gb], spins? [no], types [ext4]
[2017-06-28 08:46:40,073][INFO ][env ] [Topaz] heap size [1007.3mb], compressed ordinary object pointers [true]
[2017-06-28 08:46:41,653][INFO ][node ] [Topaz] initialized
[2017-06-28 08:46:41,653][INFO ][node ] [Topaz] starting ...
[2017-06-28 08:46:41,767][INFO ][transport ] [Topaz] publish_address {10.3.1.99:9300}, bound_addresses {10.3.1.99:9300}
[2017-06-28 08:46:41,777][INFO ][discovery ] [Topaz] poc/hoBUBaNuQJm_0BLYEQGZ2w
[2017-06-28 08:46:44,849][INFO ][cluster.service ] [Topaz] new_master {Topaz}{hoBUBaNuQJm_0BLYEQGZ2w}{10.3.1.99}{10.3.1.99:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2017-06-28 08:46:44,920][INFO ][http ] [Topaz] publish_address {10.3.1.99:9200}, bound_addresses {10.3.1.99:9200}
[2017-06-28 08:46:44,920][INFO ][node ] [Topaz] started
[2017-06-28 08:46:45,016][INFO ][gateway ] [Topaz] recovered [5] indices into cluster_state
[2017-06-28 08:46:45,867][INFO ][cluster.routing.allocation] [Topaz] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana][0], [firs][2]] ...]).

i have another elasticsearch log which contains june 19th data

[2017-06-19 09:16:40,385][INFO ][node ] [Jigsaw] version[2.4.4], pid[29742], build[fcbb46d/2017-01-03T11:33:16Z]
[2017-06-19 09:16:40,386][INFO ][node ] [Jigsaw] initializing ...
[2017-06-19 09:16:40,837][INFO ][plugins ] [Jigsaw] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2017-06-19 09:16:40,854][INFO ][env ] [Jigsaw] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [22.6gb], net total_space [24.4gb], spins? [no], types [ext4]
[2017-06-19 09:16:40,854][INFO ][env ] [Jigsaw] heap size [1007.3mb], compressed ordinary object pointers [true]
[2017-06-19 09:16:42,309][INFO ][node ] [Jigsaw] initialized
[2017-06-19 09:16:42,309][INFO ][node ] [Jigsaw] starting ...
[2017-06-19 09:16:42,439][INFO ][transport ] [Jigsaw] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300}
[2017-06-19 09:16:42,444][INFO ][discovery ] [Jigsaw] elasticsearch/-6asST35T3qEPH2TiNqxyw
[2017-06-19 09:16:45,513][INFO ][cluster.service ] [Jigsaw] new_master {Jigsaw}{-6asST35T3qEPH2TiNqxyw}{127.0.0.1}{127.0.0.1:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2017-06-19 09:16:45,596][INFO ][gateway ] [Jigsaw] recovered [0] indices into cluster_state
[2017-06-19 09:16:45,599][INFO ][http ] [Jigsaw] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}
[2017-06-19 09:16:45,600][INFO ][node ] [Jigsaw] started
[2017-06-19 11:49:02,558][INFO ][node ] [Jigsaw] stopping ...
[2017-06-19 11:49:02,566][INFO ][node ] [Jigsaw] stopped
[2017-06-19 11:49:02,566][INFO ][node ] [Jigsaw] closing ...
[2017-06-19 11:49:02,569][INFO ][node ] [Jigsaw] closed

Try that address instead.. you have probably not configured the Elasticsearch.yml to listen on loopback/localhost.

I can get the update but when i pass the excel data in logstash and after running the below command and its strucking not able to pass the values.

I thought Elasticsearch is not running properly could you please guide

[root@ip-10-3-1-152 logstash]# /opt/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf
Settings: Default pipeline workers: 2
Pipeline main started

curl -XGET http://10.3.1.99:9200
{
"name" : "Topaz",
"cluster_name" : "poc",
"cluster_uuid" : "SIBEUCg1RT-1k5TSeUd9yQ",
"version" : {
"number" : "2.4.4",
"build_hash" : "fcbb46dfd45562a9cf00c604b30849a6dec6b017",
"build_timestamp" : "2017-01-03T11:33:16Z",
"build_snapshot" : false,
"lucene_version" : "5.5.2"
},
"tagline" : "You Know, for Search"
}

https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html

For listening on all IPv6/IPv4 addresses:
network.bind_host: "0"
network.bind_host: "::"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.