karmi/tire — Issue #180: Tire in Production Mode gives me "Errno::ECONNREFUSED (Connection refused - connect(2))"
Author: schneider-th
Created: 2011-12-22 15:57:00+00:00
State: open

Hi,

I have an Ubuntu 10.04 VPS running with ElasticSearch on it. The service gives me an PID when startet so I guess that everything is OK.

On the other hand if I run ES with Tire on my local machine in development mode everything works fine too. But after deploying it breaks the models which support searching. This results in objects not getting saved and and the search not being able to perform. Instead my rails log says, when I try to search:

Started GET "/tagebuch?utf8=%E2%9C%93&query=batman" for 212.202.114.178 at 2011-12-22 16:43:07 +0100
Processing by PostsController#index as HTML
Parameters: {"utf8"=>"✓", "query"=>"batman"}
Completed 500 Internal Server Error in 11ms

Errno::ECONNREFUSED (Connection refused - connect(2)):
app/models/post.rb:23:in `search'
app/controllers/posts_controller.rb:12:in `index'

If I want to create a new object it's the same, only with the @object.save line in my controller being shown as source of the error.

As I couldn't find anything I'm wondering if there is any special setup needed so that Tire can communicate with ES.

I'm also running Nginx, if that got anything to do with it.

Thanks in regards.