seek4science / seek

For finding, sharing and exchanging Data, Models, Simulations and Processes in Science.
http://www.seek4science.org
BSD 3-Clause "New" or "Revised" License
76 stars 52 forks source link

Exception when deleting a user #123

Open CFGrote opened 4 years ago

CFGrote commented 4 years ago

I get this traceback when attempting to delete a person through the admin panel: Possibly I'm doing sth. wrong but the message is not very informative.

A RSolr::Error::ConnectionRefused occurred in people#destroy:

Connection refused - {:data=>"{\"delete\":[\"Person 5\"]}", :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>} (eval):2:in `post'


Request:


Session:


Environment:


Backtrace:

(eval):2:in post' app/controllers/people_controller.rb:206:indestroy' app/controllers/application_controller.rb:43:in block in with_current_user' app/models/user.rb:252:inwith_current_user' app/controllers/application_controller.rb:42:in `with_current_user'


Data:

stuzart commented 4 years ago

The problem is caused because the solr engine isn't running, and search is set to be enabled. It is caused by an automatic trigger that needs to delete the record from the search index. Wheres for indexing during changes and creation, we can defer the indexing to a background queue and cope with solr not running, it is not so straight forward for deletion - but is something we need to look into more closely.