Search code examples
ruby-on-railssearchkick

Faraday::ConnectionFailed, Connection refused - connect(2) for "localhost" port 9200


I'm using searchkick gem for searching in my rails app.

It was working fine but suddenly getting this error the next day on searching.

the error


Solution

  • For all those who find this and might be wondering how to restart the elasticsearch plugin:

    /etc/init.d/elasticsearch restart
    

    worked for me.