Rails application on production not able to connect to Solr server

276 views Asked by At

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!!

0

There are 0 answers