All threads / ElasticSearch connection refused

Ask A Question

Notifications

You’re not receiving notifications from this thread.

ElasticSearch connection refused

Mason Donley asked in Gems / Libraries

I am going through the ElasticSearch with searchkick video and I have installed ElasticSearch on my ubuntu box as well as installed searckick and added searckick to my model. Everytime I try to reindex my model I get "Faraday::ConnectionFailed: Failed to open TCP connection to localhost:9200 (Connection refused - connect(2) for "localhost" port 9200)". All the settings are default on my ElasticSearch installation, I have also started and restarted ElasticSearch.

Do proper indexing of Models which you are including in search.
# Student.elasticsearch.create_index!
**** # Student.import
like this

Mason, I know this was over a year ago you posted about it, but just curious if you ever fixed this. Or more importantly if you remember how you fixed it.

Running into the same issue on my end.

In my instance the issue was with localhost not being represented in my hosts file.

I adeed the following to it and was able to get past this.

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,629+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.