ncbo / ontologies_linked_data

Models and serializers for ontologies and related artifacts backed by 4store
Other
18 stars 8 forks source link

PURL server login fails if PURL servers are behind Cloudflare #119

Open jvendetti opened 3 years ago

jvendetti commented 3 years ago

This problem was discovered in our staging environment. The staging PURL server was put behind Cloudflare. After doing so, attempts to create ontologies and submissions at stage.bioontology.org started failing with 500 errors. Tracked the underlying exception down in the unicorn.std.err file on ncbostage-rest2.stanford.edu:

2021-06-23 13:43:02 - NoMethodError - undefined method `split' for nil:NilClass:
    /srv/ncbo/ontologies_api/shared/bundle/ruby/2.6.0/bundler/gems/ontologies_linked_data-71a5ca8f7574/lib/ontologies_linked_data/purl/purl_client.rb:17:in `purl_server_login'
    /srv/ncbo/ontologies_api/shared/bundle/ruby/2.6.0/bundler/gems/ontologies_linked_data-71a5ca8f7574/lib/ontologies_linked_data/purl/purl_client.rb:27:in `create_purl'
    /srv/ncbo/ontologies_api/shared/bundle/ruby/2.6.0/bundler/gems/ontologies_linked_data-71a5ca8f7574/lib/ontologies_linked_data/models/ontology.rb:409:in `save'
    /srv/ncbo/ontologies_api/releases/20210619061350/controllers/ontologies_controller.rb:148:in `create_ontology'
    /srv/ncbo/ontologies_api/releases/20210619061350/controllers/ontologies_controller.rb:49:in `block (2 levels) in <class:OntologiesController>'
jvendetti commented 3 years ago

This change to the infrastructure was reverted, i.e., the staging PURL server is no longer behind Cloudflare. New ontology and submission creation is working again in staging. The desire is to address this issue at some point in the future.

alexskr commented 1 year ago

relates to #169