Skip to content

Commit 19761a5

Browse files
authored
Read the docs page on debugging CromIAM/Cromwell deployments (#571)
Read the docs page on debugging CromIAM/Cromwell deployments
1 parent 5ffe04c commit 19761a5

File tree

4 files changed

+97
-1
lines changed

4 files changed

+97
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Note that a “task” in dsub nomenclature corresponds to a Job Manager API’s
101101

102102
- Link your preferred backend docker compose file as `docker-compose.yml`:
103103

104-
- Cromwell (local): `ln -sf cromwell-local-compose.yml docker-compose.yml`
104+
- Cromwell (local): `ln -sf cromwell-instance-compose.yml docker-compose.yml`
105105
- Cromwell (CaaS): `ln -sf cromwell-caas-compose.yml docker-compose.yml`
106106
- Follow [servers/cromwell](servers/cromwell/README.md#Development) for Cromwell server setup then return here to continue.
107107

docs/Debugging/401_Unauthorized.png

60.6 KB
Loading

docs/Debugging/CromIAMDeployments.md

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Debugging Cromwell / CromIAM Deployments
2+
3+
## Shim requires oauth but UI doesn't log you in
4+
5+
#### Symptoms
6+
7+
The UI is making unauthenticated requests to the shim layer, but the shim is
8+
rejecting them as unauthorized.
9+
10+
In the UI, Job Manager prompts you to log in but cannot proceed past this page:
11+
12+
---
13+
14+
![401: Unauthorized](401_Unauthorized.png)
15+
16+
---
17+
18+
19+
In the javascript console you see messages like: `ERROR Error: Uncaught (in promise): Object: {"status":401,"title":"Unauthorized","message":"User not authorized to access this resource."}`
20+
21+
#### Cause
22+
23+
You've set up the Cromwell shim's `docker-compose.yml` to include the following:
24+
25+
```yaml
26+
services:
27+
cromwell:
28+
environment:
29+
- USE_CAAS=True
30+
```
31+
32+
Or, perhaps you've set the environment variable `USE_CAAS=True` manually.
33+
34+
**But**: you haven't told the UI to log users in.
35+
36+
#### Resolution
37+
38+
Add an `authentication` section to the end of the Cromwell shim's `capabilities.conf`. When the UI
39+
reads this, it then knows how to direct users to the oauth login.
40+
41+
```json
42+
{
43+
...,
44+
45+
"authentication": {
46+
"isRequired": true,
47+
"scopes": [
48+
"openid",
49+
"email",
50+
"profile"
51+
]
52+
}
53+
}
54+
```
55+
56+
## Unable to connect to Cromwell URL
57+
58+
#### Symptoms
59+
60+
The UI asks me to log in but when I do, I just get redirected back to the
61+
same`Authenticate` page.
62+
63+
In the Cromwell Shim logs, I see a long stack trace starting with:
64+
65+
```
66+
cromwell_1 | ERROR:flask.app:Exception on /api/v1/jobs/query [POST]
67+
cromwell_1 | Traceback (most recent call last):
68+
cromwell_1 | File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2292, in wsgi_app
69+
cromwell_1 | response = self.full_dispatch_request()
70+
```
71+
72+
Followed by an error message like this (with your Cromwell URL replacing `https://some/host`):
73+
74+
```
75+
ConnectionError: HTTPConnectionPool(host='https://some/host', port=8000): Max retries exceeded with url: /api/workflows/v1/query (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f32d1908510>: Failed to establish a new connection: [Errno 111] Connection refused',))
76+
```
77+
78+
#### Cause
79+
80+
The Cromwell Shim is unable to make a connection to the CromIAM service.
81+
82+
#### Resolution
83+
84+
There are a few things to check here:
85+
86+
- Is the URL correct?
87+
- If not - change the `CROMWELL_URL` environment variable - either manually on the command line or in `docker-compose.yaml`
88+
- Don't forget to format it appropriately, eg `export CROMWELL_URL=https://<<hostname>>/api/workflows/v1`
89+
- Is the network link between shim and CromIAM available?
90+
- If not, resolve the issue before restarting Job Manager
91+
- Is the CromIAM service actually running?
92+
- If not, resolve the issue before restarting Job Manager
93+
94+

mkdocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ pages:
99
- Welcome: index.md
1010
- Getting Started:
1111
- Quick Start Script: GettingStarted/QuickStart.md
12+
- Debugging Deployments:
13+
- Debugging Cromwell/CromIAM: Debugging/CromIAMDeployments.md
1214

1315
theme: readthedocs
1416

0 commit comments

Comments
 (0)