SocketError (getaddrinfo: Name or service not known) - Sunspot/Solr Rails development -


i have had lots of trouble deploying rails 3.0.10 application ubuntu 10.04 server passenger, capistrano, nginx , mysql (and more trouble apache2). after downgrading rake 0.8.7 it's working, sunspot/solr doesn't work in development environment. sunspot_solr server running, , able server's url, , connect via browser. url same in sunspot.yml. have no idea have done can have caused problem. had same problem sunspot earlier (before downgraded rake). started working again. don't know why... have tried 2 versions of sunspot (1.2.1 , 1.3.0). both have been working earlier, not anymore.

this error message i'm getting:

socketerror (getaddrinfo: name or service not known): app/models/resource.rb:128:in `text_search' app/controllers/search_controller.rb:21:in `index'  rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.0ms) rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (161.6ms) rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (168.9ms) 

the controller bit messy include relevant part:

@criterion = params[:criterion] @sort_direction = params[:sort_direction] if @criterion && @sort_direction   session["sort_search"] = @criterion + "|" + @sort_direction  elsif session["sort_search"]   @criterion = session["sort_search"].split("|")[0]   @sort_direction = session["sort_search"].split("|")[1] else   @criterion = "updated_at"   @sort_direction = "desc"  end @search = resource.text_search(session[:search_params] || "", current_user, @criterion, @sort_direction)  @resources = @search.results 

i have not changed in controller since working.

my gemfile:

source 'http://rubygems.org' gem 'rake' gem 'rails', '3.0.10' gem 'jquery-rails', '>= 1.0.12' gem 'sqlite3' gem 'ancestry' gem 'carrierwave' gem 'sunspot_rails', '>= 1.3' #'~> 1.2.1' # gem 'authlogic' gem 'will_paginate' gem 'declarative_authorization' group :production   gem 'mysql' end group :development   gem 'sunspot_solr' end gem 'capistrano' 

my rakefile:

require file.expand_path('../config/application', __file__) require 'rake'  skolearkivet::application.load_tasks 

just wild guess, chance using localhost hostname? try changing localhost 127.0.0.1


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -