Project

General

Profile

Actions

Bug #13809

closed

rootUrl / baseUrl broken in discovery document

Added by Joshua Randall almost 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
-
Story points:
-

Description

Something unknown has changed recently which has broken the discovery document baseUrl and rootUrl most of the time.

Interestingly, the first few requests after nginx is restarted come through ok, but then they break by reverting to "http://127.0.0.1:3000/" and appear to stay broken forever.

# systemctl restart nginx && for n in $(seq 1 10); do curl https://arvados-api-eglyx.hgi.sanger.ac.uk/discovery/v1/apis/arvados/v1/rest | grep '^{' | jq '.rootUrl'; done
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  66248      0 --:--:--  0:00:02 --:--:-- 66227
"https://arvados-api-eglyx.hgi.sanger.ac.uk/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1732k      0 --:--:-- --:--:-- --:--:-- 1735k
"https://arvados-api-eglyx.hgi.sanger.ac.uk/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1776k      0 --:--:-- --:--:-- --:--:-- 1785k
"http://127.0.0.1:3000/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1724k      0 --:--:-- --:--:-- --:--:-- 1718k
"http://127.0.0.1:3000/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1746k      0 --:--:-- --:--:-- --:--:-- 1751k
"http://127.0.0.1:3000/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1722k      0 --:--:-- --:--:-- --:--:-- 1734k
"http://127.0.0.1:3000/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1750k      0 --:--:-- --:--:-- --:--:-- 1768k
"http://127.0.0.1:3000/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1807k      0 --:--:-- --:--:-- --:--:-- 1821k
"http://127.0.0.1:3000/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1719k      0 --:--:-- --:--:-- --:--:-- 1734k
"http://127.0.0.1:3000/" 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  182k    0  182k    0     0  1748k      0 --:--:-- --:--:-- --:--:-- 1751k
"http://127.0.0.1:3000/" 

This is with arvados-api-server 1.1.4.20180711173203-8

Setting the `host` option in application.yml does fix the host portion, but the scheme and port remain broken in that case. I have confirmed that if we patch the API server to add `protocol` and `port` configuration options alongside `host` and pass those through in default_url_options in application_controller.rb, that does fix the issue completely for us by allowing hardcoding of the full base/root URL in the configuration.

Actions

Also available in: Atom PDF