Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when deleting a user #123

Open
CFGrote opened this issue Dec 11, 2019 · 1 comment
Open

Exception when deleting a user #123

CFGrote opened this issue Dec 11, 2019 · 1 comment

Comments

@CFGrote
Copy link

CFGrote commented Dec 11, 2019

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:

  • URL : https://seek2.evolbio.mpg.de/people/5
  • HTTP Method: DELETE
  • IP address : XXX.XXX.XXX.XXX
  • Parameters : {"_method"=>"delete", "authenticity_token"=>"KdKxyATQZh7s8F10kMr21maWg/GmSgE5Z6l3RHTejSCiNu73PHVwvXCi8keCivEZp6BGygD/B3eJuy+HTvILwQ==", "controller"=>"people", "action"=>"destroy", "id"=>"5"}
  • Timestamp : 2019-12-11 10:50:41 UTC
  • Server : seek2
  • Rails root : /srv/rails/seek
  • Process: 20193

Session:

  • session id: [FILTERED]
  • data: {"_csrf_token"=>"i+RfPzilFqOcUq8zEkAHz8E2xTumtQZO7hJYwzoshuE=", "user_id"=>1}

Environment:

  • CONTENT_LENGTH : 132
  • CONTENT_TYPE : application/x-www-form-urlencoded
  • HTTPS : on
  • HTTP_ACCEPT : text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
  • HTTP_ACCEPT_ENCODING : gzip, deflate, br
  • HTTP_ACCEPT_LANGUAGE : en-US,en;q=0.5
  • HTTP_COOKIE : _seek_session=0bfc5c7f585e7c6cada8924f8010b9db
  • HTTP_HOST : seek2.evolbio.mpg.de
  • HTTP_REFERER : https://seek2.evolbio.mpg.de/people/5
  • HTTP_UPGRADE_INSECURE_REQUESTS : 1
  • HTTP_USER_AGENT : Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
  • HTTP_VERSION : HTTP/1.1
  • ORIGINAL_FULLPATH : /people/5
  • ORIGINAL_SCRIPT_NAME :
  • PASSENGER_CONNECT_PASSWORD : [FILTERED]
  • PATH_INFO : /people/5
  • QUERY_STRING :
  • REMOTE_ADDR : XXX.XXX.XXX.XXX
  • REMOTE_PORT : 38592
  • REQUEST_METHOD : DELETE
  • REQUEST_URI : /people/5
  • ROUTES_47090685382820_SCRIPT_NAME :
  • SCRIPT_NAME :
  • SERVER_NAME : seek2.evolbio.mpg.de
  • SERVER_PORT : 443
  • SERVER_PROTOCOL : HTTP/1.1
  • SERVER_SOFTWARE : Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 Phusion_Passenger/6.0.4
  • SSL_TLS_SNI : seek2.evolbio.mpg.de
  • action_controller.instance : #PeopleController:0x000055a8575bd588
  • action_dispatch.authenticated_encrypted_cookie_salt : authenticated encrypted cookie
  • action_dispatch.backtrace_cleaner : #Rails::BacktraceCleaner:0x000055a84efb5a80
  • action_dispatch.content_security_policy :
  • action_dispatch.content_security_policy_nonce_generator:
  • action_dispatch.content_security_policy_report_only : false
  • action_dispatch.cookies_digest :
  • action_dispatch.cookies_rotations : #ActiveSupport::Messages::RotationConfiguration:0x000055a84dd15308
  • action_dispatch.cookies_serializer : json
  • action_dispatch.encrypted_cookie_cipher :
  • action_dispatch.encrypted_cookie_salt : encrypted cookie
  • action_dispatch.encrypted_signed_cookie_salt : signed encrypted cookie
  • action_dispatch.http_auth_salt : http authentication
  • action_dispatch.key_generator : #ActiveSupport::CachingKeyGenerator:0x000055a85418b058
  • action_dispatch.logger : #ActiveSupport::Logger:0x000055a852db9778
  • action_dispatch.parameter_filter : [:password, "rack.request.form_vars"]
  • action_dispatch.redirect_filter : []
  • action_dispatch.remote_ip : XXX.XXX.XXX.XXX
  • action_dispatch.request.content_type : application/x-www-form-urlencoded
  • action_dispatch.request.formats : [#<Mime::Type:0x000055a84d9cb080 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=-4588311254812961647>]
  • action_dispatch.request.parameters : {"_method"=>"delete", "authenticity_token"=>"KdKxyATQZh7s8F10kMr21maWg/GmSgE5Z6l3RHTejSCiNu73PHVwvXCi8keCivEZp6BGygD/B3eJuy+HTvILwQ==", "controller"=>"people", "action"=>"destroy", "id"=>"5"}
  • action_dispatch.request.path_parameters : {:controller=>"people", :action=>"destroy", :id=>"5"}
  • action_dispatch.request.query_parameters : {}
  • action_dispatch.request.request_parameters : {"_method"=>"delete", "authenticity_token"=>"KdKxyATQZh7s8F10kMr21maWg/GmSgE5Z6l3RHTejSCiNu73PHVwvXCi8keCivEZp6BGygD/B3eJuy+HTvILwQ=="}
  • action_dispatch.request_id : b093fdf7-4f62-4f25-bb6e-7fd380fdcc38
  • action_dispatch.routes : #ActionDispatch::Routing::RouteSet:0x000055a84f262148
  • action_dispatch.secret_key_base : 95a5270ff6a06d1f758eca51379409ca3fb77c09912ecb1713d7adb7875737c70426525062aa9691225c6c47bfa5e5563be4dfc5a8b46e8e8090bf03eae3bf0e
  • action_dispatch.secret_token :
  • action_dispatch.show_detailed_exceptions : false
  • action_dispatch.show_exceptions : true
  • action_dispatch.signed_cookie_digest :
  • action_dispatch.signed_cookie_salt : signed cookie
  • action_dispatch.use_authenticated_cookie_encryption : false
  • rack.errors : #IO:0x000055a84c7b97e8
  • rack.hijack : #<Proc:0x000055a857056040@/home/www-data/.rvm/gems/ruby-2.4.9/gems/passenger-6.0.4/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:84 (lambda)>
  • rack.hijack? : true
  • rack.input : #PhusionPassenger::Utils::TeeInput:0x000055a857056630
  • rack.methodoverride.original_method : POST
  • rack.multiprocess : true
  • rack.multithread : false
  • rack.request.cookie_hash : {"_seek_session"=>"0bfc5c7f585e7c6cada8924f8010b9db"}
  • rack.request.cookie_string : _seek_session=0bfc5c7f585e7c6cada8924f8010b9db
  • rack.request.form_hash : {"_method"=>"delete", "authenticity_token"=>"KdKxyATQZh7s8F10kMr21maWg/GmSgE5Z6l3RHTejSCiNu73PHVwvXCi8keCivEZp6BGygD/B3eJuy+HTvILwQ=="}
  • rack.request.form_input : #PhusionPassenger::Utils::TeeInput:0x000055a857056630
  • rack.request.form_vars : [FILTERED]
  • rack.request.query_hash : {}
  • rack.request.query_string :
  • rack.run_once : false
  • rack.session : #ActionDispatch::Request::Session:0x000055a857b61840
  • rack.session.options : #ActionDispatch::Request::Session::Options:0x000055a857b61778
  • rack.session.record : #ActiveRecord::SessionStore::Session:0x000055a8578fef58
  • rack.tempfiles : []
  • rack.url_scheme : https
  • rack.version : [1, 2]

Backtrace:

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


Data:

  • data: {:user=>
    {:id=>1,
    :login=>"seek2admin",
    :created_at=>Fri, 29 Nov 2019 07:33:39 UTC +00:00},
    :person=>
    {:id=>1,
    :name=>"admin seek2",
    :email=>"seek2@evolbio.mpg.de",
    :created_at=>Fri, 29 Nov 2019 07:34:37 UTC +00:00},
    :site_host=>"https://seek2.evolbio.mpg.de"}
@stuzart
Copy link
Member

stuzart commented Dec 11, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants