Stability Observations
Since we addressed the preparation process required for launching tests (creating a tenant, selecting an application for creating an entitlement, creating a new user, creating capabilities for the user, and generating login credentials), we have been encountering that the endpoints often return a 502 status. Sometimes, it is just a plain 502, but the task gets initiated and is executed (successfully or unsuccessfully - which can be determined using other endpoints, although this does not work for everything).
As our work progresses, we are increasingly observing 502 status codes on our requests (again, the tasks may still be executed and end successfully or unsuccessfully).
Problem:
Starting from Thursday or Friday (20-21 February), a 502 status is consistently being returned.
The endpoints /tenants, /applications, /entitlements, /authn/login, /authn/login-with-expiry are returning a 502 status.
Other endpoints simply do not function without an authorization token (/authn/login, /authn/login-with-expiry), making it challenging to ascertain their current state.
Cause:
Kong was down
Solution:
Get help from devops
Problem
Cannot access UI
{
"errors": [
{
"message": "Failed to obtain a token",
"type": "ServiceException",
"code": "service_error",
"parameters": [
{
"key": "cause",
"value": "[400 Bad Request] during [POST] to [http://keycloak-dojo-headless.dojo.svc.cluster.local:8080/realms/diku/protocol/openid-connect/token] [KeycloakClient#callTokenEndpoint(String,Map,String,String)]: [{\"error\":\"invalid_grant\",\"error_description\":\"Code not valid\"}]"
}
]
}
],
"total_records": 1
}
Cause:
Token is too long becuase of too many tenants in the cluster
Solution:
Clean up env, remove unneeded tenants
Usually, we just waited for a while and made repeated requests for endpoints (now always 502 since 20-21 February)
when /authn/login stopped working I asked for help in eureka-support. I was advised to use /authn/login-with-expiry but it also returns 502
What do we expect? Probably stable env would be the best.