Bug #13692

[arvados-cwl-runner] Improve error message when environment variables missing

Added by Tom Morris over 3 years ago. Updated about 3 years ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
(Total: 0.00 h)
Story points:
Release relationship:


I got this:

2018-06-27 16:34:34 arvados.cwl-runner ERROR: 'ARVADOS_API_TOKEN'

as the complete and only error message when I attempted to run arvados-cwl-runner without ARVADOS_API_TOKEN set. We need better error messages.

Similarly, this needs to say what endpoint it's attempting to connect to that it can't verify the cert for:

2018-06-27 16:45:09 arvados.cwl-runner ERROR: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)


Task #13727: Catch Arvados exceptionsResolvedPeter Amstutz

Task #13728: Review 13692-acr-errorResolvedPeter Amstutz

Associated revisions

Revision c584cb69
Added by Peter Amstutz over 3 years ago

Merge branch '13692-acr-error' closes #13692

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>


#1 Updated by Tom Clegg over 3 years ago

Just a thought -- in this situation is it possible to raise an exception in the Python SDK that is both machine-readable (recognizable exception class) and human-readable ("you need to set your API_HOST and TOKEN vars or using a settings file")? It'd be nice to handle this such that humans get useful feedback even from applications that haven't wrapped the error with their own advice.

#2 Updated by Peter Amstutz over 3 years ago

  • Assigned To set to Peter Amstutz

#3 Updated by Peter Amstutz over 3 years ago

13692-acr-error @ 3a7481703542b0c95d5a23cb45b0d2e7c3ac4c9e


Improves error messages emitted by the Python SDK, and adds an extra API call early in a-c-r initialization so that errors get reported early.

Example errors:

$ arvados-cwl-runner   --api=containers --submit-runner-ram=3333 --create-workflow submit_wf.cwl ../submit_test_job.json 
2018-07-05 17:03:40 arvados.cwl-runner ERROR: ARVADOS_API_TOKEN not set.
Please set in /home/peter/.config/arvados/settings.conf or export environment variable.
$ arvados-cwl-runner   --api=containers --submit-runner-ram=3333 --create-workflow submit_wf.cwl ../submit_test_job.json 
2018-07-05 17:01:48 arvados.cwl-runner ERROR: Could not connect to
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
Possible causes: remote SSL/TLS certificate expired, or was issued by an untrusted certificate authority.

#4 Updated by Lucas Di Pentima over 3 years ago

This LGTM, please merge.

#5 Updated by Peter Amstutz over 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 50 to 100

#6 Updated by Tom Morris about 3 years ago

  • Release set to 13

Also available in: Atom PDF