Sunspot solr search gem integration to gitlab ci - ruby-on-rails

I'm developing rails application and use sunspot gem for searching.
gem 'sunspot_solr'
I've configured it on my computer and it works great. Also I integrate my application to gitlab ci. Before I have configured search it has been build success. And now I add solr service to gitlab-ci.yml file, use start and reindex.
.gitlab-ci.yml
services:
- postgres
- solr
...
rake_test:
script:
- bundle exec sunspot-solr start -p 8983
- bundle exec rake db:create
- bundle exec rake db:test:prepare
- bundle exec rake db:migrate
- bundle exec rake sunspot:solr:reindex
config/sunspot.yml
production:
solr:
hostname: <%= ENV['SOLR_HOST'] || 'localhost' %>
port: <%= ENV['SOLR_PORT'] || '8983' %>
log_level: WARNING
path: <%= ENV['SOLR_PATH'] || '/var/solr' %>
# read_timeout: 2
# open_timeout: 0.5
development:
solr:
hostname: localhost
port: 8983
log_level: INFO
test:
solr:
hostname: localhost
port: 8983
log_level: WARNING
Log from gitlab build:
bundle exec sunspot-solr start -p 8983
bundle exec rake sunspot:solr:reindex
Skipping progress bar: for progress reporting, add gem 'progress_bar' to your Gemfile
rake aborted!
RSolr::Error::ConnectionRefused: Connection refused - {:data=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Product</query></delete>", :headers=>{"Content-Type"=>"text/xml"}, :method=>:post, :params=>{:wt=>:ruby}, :query=>"wt=ruby", :path=>"update", :uri=>#<URI::HTTP http://localhost:8983/solr/update?wt=ruby>, :open_timeout=>nil, :read_timeout=>nil, :retry_503=>nil, :retry_after_limit=>nil}
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/connection.rb:19:in `rescue in execute'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/connection.rb:14:in `execute'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/patches/db/rsolr.rb:4:in `execute_with_profiling'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:181:in `execute'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:175:in `send_and_receive'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications.rb:164:in `block in instrument'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications.rb:164:in `instrument'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:84:in `update'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:148:in `delete_by_query'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/indexer.rb:68:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `block in remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `each'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot.rb:502:in `remove_all'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer.rb:364:in `block in remove_all_with_trace_SolrClient_Sunspot_delete'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer_helpers.rb:82:in `trace_execution_scoped'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer.rb:362:in `remove_all_with_trace_SolrClient_Sunspot_delete'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/searchable.rb:190:in `solr_remove_all_from_index'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/searchable.rb:209:in `solr_reindex'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:60:in `block (4 levels) in <top (required)>'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/class_set.rb:16:in `each'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/class_set.rb:16:in `each'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:59:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:71:in `with_session'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/bundle:22:in `load'
/usr/local/bundle/bin/bundle:22:in `<main>'
Errno::ECONNREFUSED: Failed to open TCP connection to localhost:8983 (Connection refused - connect(2) for "localhost" port 8983)
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/net.rb:27:in `block (2 levels) in request_with_newrelic_trace'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent.rb:428:in `disable_all_tracing'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/net.rb:26:in `block in request_with_newrelic_trace'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/cross_app_tracing.rb:48:in `tl_trace_http_request'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/net.rb:23:in `request_with_newrelic_trace'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/patches/net_patches.rb:7:in `block in request_with_mini_profiler'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/mini_profiler/profiling_methods.rb:37:in `step'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/patches/net_patches.rb:6:in `request_with_mini_profiler'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/connection.rb:15:in `execute'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/patches/db/rsolr.rb:4:in `execute_with_profiling'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:181:in `execute'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:175:in `send_and_receive'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications.rb:164:in `block in instrument'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications.rb:164:in `instrument'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:84:in `update'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:148:in `delete_by_query'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/indexer.rb:68:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `block in remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `each'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot.rb:502:in `remove_all'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer.rb:364:in `block in remove_all_with_trace_SolrClient_Sunspot_delete'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer_helpers.rb:82:in `trace_execution_scoped'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer.rb:362:in `remove_all_with_trace_SolrClient_Sunspot_delete'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/searchable.rb:190:in `solr_remove_all_from_index'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/searchable.rb:209:in `solr_reindex'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:60:in `block (4 levels) in <top (required)>'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/class_set.rb:16:in `each'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/class_set.rb:16:in `each'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:59:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:71:in `with_session'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/bundle:22:in `load'
/usr/local/bundle/bin/bundle:22:in `<main>'
Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 8983
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/net.rb:27:in `block (2 levels) in request_with_newrelic_trace'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent.rb:428:in `disable_all_tracing'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/net.rb:26:in `block in request_with_newrelic_trace'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/cross_app_tracing.rb:48:in `tl_trace_http_request'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/instrumentation/net.rb:23:in `request_with_newrelic_trace'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/patches/net_patches.rb:7:in `block in request_with_mini_profiler'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/mini_profiler/profiling_methods.rb:37:in `step'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/patches/net_patches.rb:6:in `request_with_mini_profiler'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/connection.rb:15:in `execute'
/usr/local/bundle/gems/rack-mini-profiler-0.10.1/lib/patches/db/rsolr.rb:4:in `execute_with_profiling'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:181:in `execute'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:175:in `send_and_receive'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications.rb:164:in `block in instrument'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/bundle/gems/activesupport-4.2.7/lib/active_support/notifications.rb:164:in `instrument'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:84:in `update'
/usr/local/bundle/gems/rsolr-1.1.1/lib/rsolr/client.rb:148:in `delete_by_query'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/indexer.rb:68:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `block in remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `each'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session.rb:197:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot.rb:502:in `remove_all'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer.rb:364:in `block in remove_all_with_trace_SolrClient_Sunspot_delete'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer_helpers.rb:82:in `trace_execution_scoped'
/usr/local/bundle/gems/newrelic_rpm-3.16.0.318/lib/new_relic/agent/method_tracer.rb:362:in `remove_all_with_trace_SolrClient_Sunspot_delete'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/searchable.rb:190:in `solr_remove_all_from_index'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/searchable.rb:209:in `solr_reindex'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:60:in `block (4 levels) in <top (required)>'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/class_set.rb:16:in `each'
/usr/local/bundle/gems/sunspot-2.2.5/lib/sunspot/class_set.rb:16:in `each'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:59:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:71:in `with_session'
/usr/local/bundle/gems/sunspot_rails-2.2.5/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/bundle:22:in `load'
/usr/local/bundle/bin/bundle:22:in `<main>'
Tasks: TOP => sunspot:solr:reindex => sunspot:reindex
(See full trace by running task with --trace)
make: *** [solr_start] Error 1
Makefile:30: recipe for target 'solr_start' failed
ERROR: Build failed: exit code 1
As you can see, it starts good. But on indexing stage it could not connect.
I've also tried ps aux command
after starting solr:
ps aux | grep solr
root 15048 0.0 0.5 95024 22168 ? R 15:26 0:00 /usr/local/bundle/bin/sunspot-solr
root 15051 0.0 0.0 20128 2816 ? Ss 15:26 0:00 bash ./solr start -f -p 8983 -s /usr/local/bundle/gems/sunspot_solr-2.2.5/solr/solr
root 15056 0.0 0.0 11132 1000 ? S 15:26 0:00 grep solr
and after migrating db:
ps aux | grep solr
root 15066 0.0 0.0 11132 988 ? S 15:27 0:00 grep solr

In my case, I ended up extending StubSessionProxy
https://github.com/jaigouk/stub_solr
here is my rake file
https://github.com/jaigouk/stub_solr/blob/master/Rakefile#L21

Related

Rails application on production not able to connect to Solr server

I'm trying to configure solr on my rails production server.
It is working fine on the local machine.
Below is the config in sunspot.yml
production:
solr:
solr_home: solr
hostname: localhost
port: 8983
log_level: WARNING
path: /solr/default
staging:
solr:
hostname: localhost
port: 8983
log_level: WARNING
path: /solr/staging
# read_timeout: 2
# open_timeout: 0.5
development:
solr:
solr_home: solr
hostname: localhost
port: 8982
log_level: INFO
path: /solr/development
test:
solr:
hostname: localhost
port: 8982
log_level: WARNING
path: /solr/test
I've tried the following already:
How to configure Solr standalone in Production server with Rails application using sunspot gem?
Below are the logs on running sunspot:solr:reindex
warning: parser/current is loading parser/ruby26, which recognizes
warning: 2.6.6-compliant syntax, but you are running 2.6.4.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
rake aborted!
RSolr::Error::ConnectionRefused: Connection refused - {:data=>"{\"delete\":{\"query\":\"type:Post\"}}", :headers=>{"Content-Type"=>"application/json"}, :method=>:post, :params=>{:wt=>:json}, :query=>"wt=json", :path=>"update", :uri=>#<URI::HTTP http://localhost:8983/solr/default/update?wt=json>}
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:204:in `rescue in execute'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:196:in `execute'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:191:in `send_and_receive'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `block in instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:94:in `update'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:157:in `delete_by_query'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/indexer.rb:68:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `block in remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot.rb:502:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:196:in `solr_remove_all_from_index'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:215:in `solr_reindex'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:60:in `block (4 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/class_set.rb:16:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/class_set.rb:16:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:59:in `block (3 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:71:in `with_session'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.6.4/bin/bundle:23:in `load'
/home/deploy/.rbenv/versions/2.6.4/bin/bundle:23:in `<main>'
Caused by:
Faraday::ConnectionFailed: Failed to open TCP connection to localhost:8983 (Connection refused - connect(2) for "localhost" port 8983)
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:152:in `request_via_request_method'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:137:in `request_with_wrapped_block'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:128:in `perform_request'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:70:in `block in call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter.rb:61:in `connection'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:68:in `call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/response.rb:11:in `call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/rack_builder.rb:154:in `build_response'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/connection.rb:492:in `run_request'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/connection.rb:279:in `post'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:197:in `execute'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:191:in `send_and_receive'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `block in instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:94:in `update'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:157:in `delete_by_query'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/indexer.rb:68:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `block in remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot.rb:502:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:196:in `solr_remove_all_from_index'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:215:in `solr_reindex'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:60:in `block (4 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/class_set.rb:16:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/class_set.rb:16:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:59:in `block (3 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:71:in `with_session'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.6.4/bin/bundle:23:in `load'
/home/deploy/.rbenv/versions/2.6.4/bin/bundle:23:in `<main>'
Caused by:
Errno::ECONNREFUSED: Failed to open TCP connection to localhost:8983 (Connection refused - connect(2) for "localhost" port 8983)
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:152:in `request_via_request_method'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:137:in `request_with_wrapped_block'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:128:in `perform_request'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:70:in `block in call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter.rb:61:in `connection'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:68:in `call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/response.rb:11:in `call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/rack_builder.rb:154:in `build_response'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/connection.rb:492:in `run_request'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/connection.rb:279:in `post'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:197:in `execute'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:191:in `send_and_receive'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `block in instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:94:in `update'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:157:in `delete_by_query'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/indexer.rb:68:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `block in remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot.rb:502:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:196:in `solr_remove_all_from_index'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:215:in `solr_reindex'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:60:in `block (4 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/class_set.rb:16:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/class_set.rb:16:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:59:in `block (3 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:71:in `with_session'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.6.4/bin/bundle:23:in `load'
/home/deploy/.rbenv/versions/2.6.4/bin/bundle:23:in `<main>'
Caused by:
Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 8983
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:152:in `request_via_request_method'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:137:in `request_with_wrapped_block'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:128:in `perform_request'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:70:in `block in call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter.rb:61:in `connection'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/adapter/net_http.rb:68:in `call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/response.rb:11:in `call'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/rack_builder.rb:154:in `build_response'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/connection.rb:492:in `run_request'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/faraday-1.1.0/lib/faraday/connection.rb:279:in `post'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:197:in `execute'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:191:in `send_and_receive'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `block in instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:94:in `update'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:157:in `delete_by_query'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/indexer.rb:68:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `block in remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session.rb:197:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot.rb:502:in `remove_all'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:196:in `solr_remove_all_from_index'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:215:in `solr_reindex'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:60:in `block (4 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/class_set.rb:16:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/class_set.rb:16:in `each'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:59:in `block (3 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:71:in `with_session'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <main>'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.6.4/bin/bundle:23:in `load'
/home/deploy/.rbenv/versions/2.6.4/bin/bundle:23:in `<main>'
Tasks: TOP => sunspot:solr:reindex => sunspot:reindex
(See full trace by running task with --trace)
Below is the error trace from production.log
D, [2021-04-06T11:43:12.418764 #8824] DEBUG -- : [c743e1e1-8111-4277-a4af-295e03bd111f] SOLR Request (84.2ms) [ path=select parameters={fq: ["type:Post", "type_texts:Post", nil], start: 0, rows: 25, q: "*:*"} ]
I, [2021-04-06T11:43:12.419319 #8824] INFO -- : [c743e1e1-8111-4277-a4af-295e03bd111f] Completed 500 Internal Server Error in 120ms (ActiveRecord: 2.1ms | Allocations: 26128)
F, [2021-04-06T11:43:12.419933 #8824] FATAL -- : [c743e1e1-8111-4277-a4af-295e03bd111f]
[c743e1e1-8111-4277-a4af-295e03bd111f] RSolr::Error::Http (RSolr::Error::Http - 404 Not Found
Error: Not Found
URI: http://localhost:8983/solr/default/select?wt=json
Request Headers: {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"}
Request Data: "fq=type%3APost&fq=type_texts%3APost&&start=0&rows=25&q=*%3A*"
Backtrace: /home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:206:in `rescue in execute'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:196:in `execute'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/rsolr-2.3.0/lib/rsolr/client.rb:191:in `send_and_receive'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `block in instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/notifications.rb:180:in `instrument'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot-2.5.0/lib/sunspot/search/abstract_search.rb:49:in `execute'
/home/deploy/ont-production/shared/bundle/ruby/2.6.0/gems/sunspot_rails-2.5.0/lib/sunspot/rails/searchable.rb:395:in `solr_execute_search'):
[c743e1e1-8111-4277-a4af-295e03bd111f]
[c743e1e1-8111-4277-a4af-295e03bd111f] (eval):2:in `post'
[c743e1e1-8111-4277-a4af-295e03bd111f] app/controllers/posts_controller.rb:35:in `search'
Any help would be appreciated!!

Cuttlefish SMTP process crashes at mail send test

I am launching Cuttlefish (https://cuttlefish.io/) SMTP process like this:
bundle exec rake cuttlefish:smtp RAILS_ENV=production
But when I try to send the test mail thru Cuttlefish's web, this process crashes with this last message:
Redis::CannotConnectError: Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED)
What am I missing? Cuttlefish is connected to a MySQL DB, and this seems to be OK. Also, I have Postfix on the same machine, which has also been tested OK. How to make this SMTP process work?
Here is the full crash stack:
I'm listening for emails via SMTP on 0.0.0.0 port 2525
I'm in the production environment
rake aborted!
Redis::CannotConnectError: Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED)
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:320:in `rescue in establish_connection'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:311:in `establish_connection'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:91:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:90:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:337:in `ensure_connected'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:204:in `block in process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:286:in `logging'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:203:in `process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:174:in `call_pipelined'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:146:in `block in call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:144:in `call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2147:in `block in multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `block in synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2139:in `multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:180:in `block in raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/connection_pool-2.1.0/lib/connection_pool.rb:58:in `with'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:179:in `raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:68:in `push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:85:in `client_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:40:in `perform_async'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_smtp_server.rb:117:in `receive_message'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:539:in `process_data_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:196:in `receive_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/linetext2.rb:64:in `receive_data'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run_machine'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_control.rb:22:in `smtp_start'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/tasks/cuttlefish.rake:6:in `block (2 levels) in <top (required)>'
/soft/wordpress/home/tupromail/.gem/ruby/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
Errno::ECONNREFUSED: Connection refused - connect(2) for 127.0.0.1:6379
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:129:in `rescue in connect_addrinfo'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:121:in `connect_addrinfo'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:162:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `each'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `each_with_index'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:211:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:316:in `establish_connection'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:91:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:90:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:337:in `ensure_connected'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:204:in `block in process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:286:in `logging'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:203:in `process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:174:in `call_pipelined'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:146:in `block in call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:144:in `call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2147:in `block in multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `block in synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2139:in `multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:180:in `block in raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/connection_pool-2.1.0/lib/connection_pool.rb:58:in `with'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:179:in `raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:68:in `push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:85:in `client_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:40:in `perform_async'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_smtp_server.rb:117:in `receive_message'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:539:in `process_data_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:196:in `receive_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/linetext2.rb:64:in `receive_data'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run_machine'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_control.rb:22:in `smtp_start'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/tasks/cuttlefish.rake:6:in `block (2 levels) in <top (required)>'
/soft/wordpress/home/tupromail/.gem/ruby/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
IO::EINPROGRESSWaitWritable: Operation now in progress - connect(2) would block
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:122:in `connect_addrinfo'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:162:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `each'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `each_with_index'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:160:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/connection/ruby.rb:211:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:316:in `establish_connection'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:91:in `block in connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:90:in `connect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:337:in `ensure_connected'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:204:in `block in process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:286:in `logging'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:203:in `process'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:174:in `call_pipelined'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:146:in `block in call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:273:in `with_reconnect'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis/client.rb:144:in `call_pipeline'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2147:in `block in multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `block in synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:37:in `synchronize'
/soft/wordpress/home/tupromail/.gem/ruby/gems/redis-3.2.0/lib/redis.rb:2139:in `multi'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:180:in `block in raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/connection_pool-2.1.0/lib/connection_pool.rb:58:in `with'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:179:in `raw_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/client.rb:68:in `push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:85:in `client_push'
/soft/wordpress/home/tupromail/.gem/ruby/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb:40:in `perform_async'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_smtp_server.rb:117:in `receive_message'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:539:in `process_data_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/smtpserver.rb:196:in `receive_line'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/em/protocols/linetext2.rb:64:in `receive_data'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run_machine'
/soft/wordpress/home/tupromail/.gem/ruby/gems/eventmachine-1.0.4/lib/eventmachine.rb:187:in `run'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/cuttlefish_control.rb:22:in `smtp_start'
/soft/wordpress/home/tupromail/cuttlefish-master/lib/tasks/cuttlefish.rake:6:in `block (2 levels) in <top (required)>'
/soft/wordpress/home/tupromail/.gem/ruby/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => cuttlefish:smtp
Your app is failing due to redis connection, check if you are using redis in some module and install redis or else remove redis dependency
I solved the problem by launching Redis server:
redis-server&

Capistrano deploy error while deploying to Ubuntu server

I was following this blog, to set up my rails server, and after I ran this command, I am getting the following error
cap production deploy:initial --trace
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host 104.197.138.17: connection closed by remote host
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Net::SSH::Disconnect: connection closed by remote host
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:50:in `rescue in block (2 levels) in negotiate!'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:46:in `block (2 levels) in negotiate!'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:45:in `loop'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:45:in `block in negotiate!'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:43:in `loop'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:43:in `negotiate!'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:32:in `initialize'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `new'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `block in initialize'
/home/vagrant/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/timeout.rb:75:in `timeout'
/home/vagrant/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/timeout.rb:126:in `timeout'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `initialize'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `new'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `start'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:50:in `call'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:50:in `create_new_entry'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:22:in `checkout'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:187:in `with_ssh'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:137:in `block in _execute'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:62:in `test'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:21:in `block (3 levels) in <top (required)>'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
EOFError: end of file reached
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:47:in `readpartial'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:47:in `block (2 levels) in negotiate!'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:45:in `loop'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:45:in `block in negotiate!'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:43:in `loop'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:43:in `negotiate!'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/server_version.rb:32:in `initialize'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `new'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `block in initialize'
/home/vagrant/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/timeout.rb:75:in `timeout'
/home/vagrant/.rvm/rubies/ruby-2.1.7/lib/ruby/2.1.0/timeout.rb:126:in `timeout'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `initialize'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `new'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/net-ssh-2.9.2/lib/net/ssh.rb:207:in `start'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:50:in `call'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:50:in `create_new_entry'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/connection_pool.rb:22:in `checkout'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:187:in `with_ssh'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:137:in `block in _execute'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:62:in `test'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:21:in `block (3 levels) in <top (required)>'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/home/vagrant/.rvm/gems/ruby-2.1.7/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => rvm:hook
So in my deploy.rb file which is generated by Capistrano, I commented out
this line. And it started to work.
set :ssh_options,{ forward_agent: true, user: fetch(:user), keys: %w(~/.ssh/id_rsa.pub) }
It appears Capistrano can't connect to the server and is timing out, the most likely culprit is that it's not reading the SSH key correctly. The easiest way to test it would be to try creating an ssh config file:
nano ~/.ssh/config
Add:
Host 104.197.138.17
HostName 104.197.138.17
IdentityFile ~/.ssh/id_rsa
Try:
ssh deploy#104.197.138.17
Make sure it connects. (I'm assuming 104.197.138.17 is the IP of your server...)
If that works, try cap production deploy:check again.
--
What's happening here is the ssh config will feed the extra parameters to any SSH call to that Host (in this case the IP). You could change the Host to 'mysite.com' if you wanted and then you would run ssh deploy#mysite.com if you wanted to create some separation. Digital Ocean has tutorial about it.

Heroku Bonsai with gem 'bonsai-elasticsearch-rails' still looking for port 9200

I followed Heroku's instructions on setting up Bonsai Elasticsearch:
https://devcenter.heroku.com/articles/bonsai
with all of these in my Gemfile:
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
gem 'bonsai-elasticsearch-rails'
However when I still get the following connection error when I run:
heroku run bundle exec rake environment elasticsearch:import:model CLASS='class' FORCE=true --trace
- - returns - -
rake aborted!
Faraday::ConnectionFailed: Connection refused - connect(2) for "localhost" port 9200
Elasticsearch works locally, I can't get it to work on Heroku.
My model is:
class Property < ActiveRecord::Base
# Search
Elasticsearch::Model.client = Elasticsearch::Client.new log: true
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
end
Property.import
I have a rake file:
lib/tasks/elasticsearch.rake
require 'elasticsearch/rails/tasks/import'
I am using Devise too but I don't think it is impacting this. On Rails 4.1, Ruby 2.1.2.
Any suggestions?
** edit **
I took out the bonsai-elasticsearch-rails gem and added:
config/initializers/bonsai.rb
Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['BONSAI_URL']
Still running into the same error with it looking for port 9200
heroku run bundle exec rake environment elasticsearch:import:model CLASS='Property' FORCE=true --trace
Running `bundle exec rake environment elasticsearch:import:model CLASS=Property FORCE=true --trace` attached to terminal... up, run.8668
** Invoke environment (first_time)
** Execute environment
** Invoke elasticsearch:import:model (first_time)
** Execute elasticsearch:import:model
(1.5ms) SELECT COUNT(*) FROM "properties"
2014-10-07 22:39:25 +0000: [Faraday::ConnectionFailed] Connection refused - connect(2) for "localhost" port 9200 {:host=>"localhost", :port=>"9200", :protocol=>"http"}
[!!!] Error when deleting the index: Faraday::ConnectionFailed
Connection refused - connect(2) for "localhost" port 9200
2014-10-07 22:39:25 +0000: [Faraday::ConnectionFailed] Connection refused - connect(2) for "localhost" port 9200 {:host=>"localhost", :port=>"9200", :protocol=>"http"}
2014-10-07 22:39:25 +0000: [Faraday::ConnectionFailed] Connection refused - connect(2) for "localhost" port 9200 {:host=>"localhost", :port=>"9200", :protocol=>"http"}
[!!!] Error when creating the index: Faraday::ConnectionFailed
Connection refused - connect(2) for "localhost" port 9200
Property Load (1.8ms) SELECT "properties".* FROM "properties" ORDER BY "properties"."id" ASC LIMIT 1000
2014-10-07 22:39:25 +0000: [Faraday::ConnectionFailed] Connection refused - connect(2) for "localhost" port 9200 {:host=>"localhost", :port=>"9200", :protocol=>"http"}
rake aborted!
Faraday::ConnectionFailed: Connection refused - connect(2) for "localhost" port 9200
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:879:in `initialize'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:879:in `open'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:879:in `block in connect'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb:76:in `timeout'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:878:in `connect'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:852:in `start'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:1369:in `request'
/app/vendor/bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:80:in `perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:39:in `call'
/app/vendor/bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response'
/app/vendor/bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/transport/http/faraday.rb:21:in `block in perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/transport/base.rb:187:in `call'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/transport/base.rb:187:in `perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/transport/http/faraday.rb:20:in `perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/client.rb:104:in `perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-api-1.0.5/lib/elasticsearch/api/actions/bulk.rb:81:in `bulk'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/importing.rb:120:in `block in import'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/adapters/active_record.rb:96:in `block in __find_in_batches'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.4/lib/active_record/relation/batches.rb:125:in `find_in_batches'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.4/lib/active_record/querying.rb:9:in `find_in_batches'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/proxy.rb:80:in `method_missing'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/adapters/active_record.rb:95:in `__find_in_batches'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/importing.rb:119:in `import'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-rails-0.1.6/lib/elasticsearch/rails/tasks/import.rb:63:in `block (3 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load'
/app/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<main>'
Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 9200
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:879:in `initialize'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:879:in `open'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:879:in `block in connect'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb:76:in `timeout'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:878:in `connect'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:852:in `start'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/net/http.rb:1369:in `request'
/app/vendor/bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:80:in `perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:39:in `call'
/app/vendor/bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response'
/app/vendor/bundle/ruby/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/transport/http/faraday.rb:21:in `block in perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/transport/base.rb:187:in `call'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/transport/base.rb:187:in `perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/transport/http/faraday.rb:20:in `perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-transport-1.0.5/lib/elasticsearch/transport/client.rb:104:in `perform_request'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-api-1.0.5/lib/elasticsearch/api/actions/bulk.rb:81:in `bulk'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/importing.rb:120:in `block in import'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/adapters/active_record.rb:96:in `block in __find_in_batches'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.4/lib/active_record/relation/batches.rb:125:in `find_in_batches'
/app/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.4/lib/active_record/querying.rb:9:in `find_in_batches'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/proxy.rb:80:in `method_missing'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/adapters/active_record.rb:95:in `__find_in_batches'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-model-0.1.6/lib/elasticsearch/model/importing.rb:119:in `import'
/app/vendor/bundle/ruby/2.1.0/gems/elasticsearch-rails-0.1.6/lib/elasticsearch/rails/tasks/import.rb:63:in `block (3 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:150:in `invoke_task'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/app/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load'
/app/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<main>'
Tasks: TOP => elasticsearch:import:model
** edit 2 **
Same error using:
elasticsearch-model 0.1.4 or 0.1.6
elasticsearch-rails 0.1.4 or 0.1.6
Found out this line in my model was overwriting other settings:
Elasticsearch::Model.client = Elasticsearch::Client.new log: true
This error goes away if I set it to this:
Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['BONSAI_URL'], log: true
Thanks to Nick and Rob for helping me out. Now on to the next error...
**update 12-29-2014
I ran into the same error running this from a new install, fixed it with typing
$ elasticsearch
in the console to start elasticsearch. Hope this helps someone else.
I did:
/etc/init.d/elasticsearch restart
and it solved this for me.

rake sunspot:reindex rake aborted! RSolr::Error::Http - 404 Not Found

I can no longer reindex and cannot resolve this issue.
Spend several hours digging the web for this issue. ** *regarding production environment * development goes ok. :( How would one fix this?
rake sunspot:reindex
rake aborted!
RSolr::Error::Http - 404 Not Found
Error: Not Found
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Match</query></delete>"
Backtrace:
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:268:in `adapt_response'
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:175:in `execute'
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:161:in `send_and_receive'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/srv/books/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'
/srv/books/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/srv/books/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:67:in `update'
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:131:in `delete_by_query'/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:268:in `adapt_response'
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:175:in `execute'
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:161:in `send_and_receive'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/srv/books/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'
/srv/books/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/srv/books/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:67:in `update'
/srv/books/shared/bundle/ruby/2.0.0/gems/rsolr-1.0.9/lib/rsolr/client.rb:131:in `delete_by_query'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/indexer.rb:57:in `remove_all'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/session.rb:181:in `block in remove_all'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/session.rb:181:in `each'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/session.rb:181:in `remove_all'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot.rb:464:in `remove_all'
/srv/books/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.8.168/lib/new_relic/agent/method_tracer.rb:508:in `block in remove_all_with_trace_SolrClient_Sunspot_delete'
/srv/books/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.8.168/lib/new_relic/agent/method_tracer.rb:259:in `trace_execution_scoped'
/srv/books/shared/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.8.168/lib/new_relic/agent/method_tracer.rb:503:in `remove_all_with_trace_SolrClient_Sunspot_delete'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/searchable.rb:183:in `solr_remove_all_from_index'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/searchable.rb:202:in `solr_reindex'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/tasks.rb:57:in `block (4 levels) in <top (required)>'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/class_set.rb:16:in `each'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot/lib/sunspot/class_set.rb:16:in `each'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/tasks.rb:56:in `block (3 levels) in <top (required)>'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/tasks.rb:68:in `with_session'
/srv/books/shared/bundle/ruby/2.0.0/bundler/gems/sunspot-4e6c7870e3aa/sunspot_rails/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p247#books/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p247#books/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => sunspot:reindex
(See full trace by running task with --trace)
These are the terminal commands you should follow to solve your problems:
ps aux | grep solr to get solr process ID
sudo kill <ID>, <ID> is the ID you found from 1
rm -r <path/to/solr>, remove the solr directory inside your project to remove all of previous indexes
RAILS_ENV=production bundle exec rake sunspot:solr:start
Change the path to /solr/default inside config/sunspot.yml
RAILS_ENV=production bundle exec rake sunspot:solr:reindex
Bam! Problems solved! I hope.
upgrading to tomcat6 fixed the issue
after i Set sunspot.yml path to /solr/collection1
and copying the scheme.xml from sunspot to the /opt/solr/collection1/conf/scheme.xml

Resources