Elasticsearch curl failed to connect to port 9200 conncetion refused

i install elasticsearch.6.2.3 by apt-get
i didn't change elasticsearch.yml
os:ubuntu 16
run elasticsearch by systemctl start elasticsearch.service

when i input the command 'systemctl status elasticsearch.service'
i shows that elasticsearch is alive
but when i try to crul ,i get
curl :(7) failed to connect to localhost port 9200 :conncetion refused

What do the Elasticsearch logs show?

command: systemctl status elasticsearch.service
elasticsearch.service - LSB:Starts elasticsearch
Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled)
Active: active (exited) since Thu 2018-03-29 10:47:49 CST; 2h 14min ago
Docs: man:systemd-sysv-generator(8)
Process: 924 ExecStop=/etc/init.d/elasticsearch stop (code=exited, status=0/SUCCESS)
Process: 963 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0/SUCCESS)

Mar 29 10:47:49 zqy systemd[1]: Starting LSB:Starts elasticsearch
Mar 29 10:27:49 zqy systemd[1]: started LSB:Starts elasticsearch

i check /var/log/elasticsearh there's nothing in it

then i input the command :ps -aux|grep elasticsearch , i got nothing which means that elasticsearch didn't start actually
i guess something must be wrong in network connection ,may be run out of time
what do u think ? any idea about configuration?

What about the OS log, there should be something stating what is wrong.

i found the reason
because before i install elasticsearch by apt-get ,i did't do apt update ,so i install the old version ,now i reinstall it and everything seems ok .
thanks for ur help

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