Elastic search cant connect to TCP port


I installed ES but it gives cant connect to tcp port localhost 9200.

RAILS_ENV=production bundle exec rails chewy:deploy

What would be the issue here?


Is the service running?
is ES listening on that port?


The service is running but when running chewy:deploy it says it cant connect to TCP port


Is ES_PORT the correct port? Is ES_HOST the correct host?