OpenShift 2 REST API calls fail with a 406 error with no data returned
Environment
OpenShift Enterprise 2.2.9
Issue
- Since upgrading to OpenShift 2 REST API calls fail with a HTTP/1.1 406 Not Acceptable error.
- Error in production.log
[ERROR] Reference ID: <ID> - undefined methodref' for nil:NilClass` - The command oo-accept-broker failed with message
FAIL: Did not get expected HTTP 200 response from https://localhost/broker/rest/api
Resolution
Bug#1322543 has been created to address this issue.
A bug has been encountered where OpenShift 2.2.9 REST API calls are not defaulting the server response type to JSON syntax.
As a work around the API call must include one of the following response types in the HTTP header.
-
JSON
Accept: application/json -
XML
Accept: application/xml
Example with curl:
# curl -H "Accept: application/json" https://broker.openshift.com/broker/rest/api -kv
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
