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.

Reply

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

Reply

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.

Reply

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
Reply
Join the discussion
Create an account Log in

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

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

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