ncbo / virtual_appliance

Bioportal Virtual Appliance
5 stars 7 forks source link

ontoportal appliance attempts to accesses resource_index api despite config setting $RESOURCE_INDEX_DISABLED = true #14

Closed alexskr closed 9 months ago

alexskr commented 4 years ago

$RESOURCE_INDEX_DISABLED is set to true in applaince config; however, we are still seeing access attempts by UI to resource index API

127.0.0.1 - ontoportal_ui [25/Mar/2020:03:50:08 +0000] "GET /resource_index/resources HTTP/1.0" 500 30 0.0121
127.0.0.1 - ontoportal_ui [25/Mar/2020:03:50:08 +0000] "GET /resource_index/annotation_counts HTTP/1.0" 200 96
jvendetti commented 4 years ago

I think this would be straightforward to remedy if we moved forward with removing the Resource Index (I'm referring to the Rails application here, not the REST API). Mark has already given his blessing to retire the code.

Assuming no one objects, I could have a look at stripping it out in a local branch.

alexskr commented 4 years ago

sounds good to me https://github.com/ncbo/bioportal_web_ui/issues/145

alexskr commented 4 years ago

Each time landing page is accessed a stack trace is logged in the API unicorn.stderrr.log. I assume its related to resource_index:

"2020-08-03 18:37:49 - NoMethodError - undefined method `[]' for nil:NilClass:
    /srv/ontoportal/ontologies_api/shared/bundle/ruby/2.6.0/bundler/gems/resource_index-24a7f14a6da4/lib/ncbo_resource_index/resource.rb:116:in `lazy_resources_in_es'
    /srv/ontoportal/ontologies_api/shared/bundle/ruby/2.6.0/bundler/gems/resource_index-24a7f14a6da4/lib/ncbo_resource_index/resource.rb:40:in `all'
    /srv/ontoportal/ontologies_api/shared/bundle/ruby/2.6.0/bundler/gems/resource_index-24a7f14a6da4/lib/ncbo_resource_index/resource.rb:44:in `populated'
    /srv/ontoportal/ontologies_api/releases/20200731193251/controllers/resource_index_controller.rb:32:in `block (2 levels) in <class:ResourceIndexController>'
....
123.123.123.123 - ontoportal_ui [03/Aug/2020:18:37:49 +0000] "GET /resource_index/resources HTTP/1.0" 500 30 0.0110