Hey, thanks for answering.
I noticed some of the changes, that's why I tried to change elasticsearch.yml
, but didn't noticed that now localhost
should be _local_
, thanks!
So, first I tried to start it with the current configuration and tried to accesss with curl
... and it worked!:
$ sudo service elasticsearch start
$ sudo service elasticsearch status
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
Active: active (running)
$ curl -X GET http://localhost:9200
{
"name" : "Atalon",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.1.0",
"build_hash" : "72cd1f1a3eee09505e036106146dc1949dc5dc87",
"build_timestamp" : "2015-11-18T22:40:03Z",
"build_snapshot" : false,
"lucene_version" : "5.3.1"
},
"tagline" : "You Know, for Search"
}
Yesterday no matter what I did it won't start without the longer command line. But now I'm a different network (wireless now, cable yesterday), can have something related to it?
But, after changing localhost
to _local_
, I got the connection refused again.
Checking with netstat
, I got some interesting results:
tcp6 0 0 ::1:9200 :::* OUÇA -
tcp6 0 0 127.0.0.1:9200 :::* OUÇA -
tcp6 0 0 ::1:9300 :::* OUÇA -
So, I tried to use IPV6 and ...
$ curl -X GET http://[::1]:9200
{
"name" : "Coldblood",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.1.0",
"build_hash" : "72cd1f1a3eee09505e036106146dc1949dc5dc87",
"build_timestamp" : "2015-11-18T22:40:03Z",
"build_snapshot" : false,
"lucene_version" : "5.3.1"
},
"tagline" : "You Know, for Search"
}
And after this, IPV4 worked again! Checking with netstat
again, I got an interesing result on remote address (btw, "ouça" is "listen"):
tcp 0 0 127.0.0.1:58958 127.0.0.1:9200 TIME_WAIT -
tcp6 0 0 ::1:9200 :::* OUÇA -
tcp6 0 0 127.0.0.1:9200 :::* OUÇA -
tcp6 0 0 ::1:9300 :::* OUÇA -
tcp6 0 0 127.0.0.1:9300 :::* OUÇA -
I tried curl -X GET http://localhost:58958
too but got connection refused, but localhost
and 127.0.0.1
works. Then I changed network.host
to _local:ipv4_
and checked again. On netstat
, just IPV6:
tcp6 0 0 127.0.0.1:9200 :::* OUÇA -
tcp6 0 0 127.0.0.1:9300 :::* OUÇA -
But after the first curl
request, seems that the remote address is bound, and it worked again!
tcp 0 0 127.0.0.1:59230 127.0.0.1:9200 TIME_WAIT -
tcp6 0 0 127.0.0.1:9200 :::* OUÇA -
tcp6 0 0 127.0.0.1:9300 :::* OUÇA -
Not really sure what is happening.