Bug 1374392 - HPA getting "invalid character 'E' looking for beginning of value"
Summary: HPA getting "invalid character 'E' looking for beginning of value"
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Hawkular
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Matt Wringe
QA Contact: Peng Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-08 14:45 UTC by Eric Jones
Modified: 2019-12-16 06:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-31 16:07:26 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Eric Jones 2016-09-08 14:45:53 UTC
Description of problem:
HPA getting "invalid character 'E' looking for beginning of value" but 3.1.1 metrics appears to be running just fine. Metrics was installed normally following the documentation without any fancy custom settings. The rc for the pod attempting to autoscale includes cpu requests.

api/controller logs attached.

Comment 5 Matt Wringe 2016-09-08 16:09:25 UTC
The invalid character 'E' is usually because the HPA is expecting a value to be returned by Heapster, but in this case Heapster is returning a message. Most likely it is returning a message that starts with 'Error'.

Is the metrics components running in the 'openshift-infra' project or under some other namespace?

Only the API proxy is configured to have access to the Heapster api. Can you verify that you can access the Heapster api using the proxy?

Something like this should work as a cluster admin user:

curl -k -H "Authorization: Bearer `oc whoami -t`" -X GET https://localhost:8443/api/v1/proxy/namespaces/openshift-infra/services/https:heapster:/

Note that this is usually unrelated to the metric components. So things like metric graphs in the console can continue to function. 

Did you make any changes to the Metrics deployer's secret (specifically to the changes about which user can access Heapster)?

Is this a new issue (as in did the HPA did used to work before?) or is this the first time the HPA has been used?

Comment 6 Eric Jones 2016-09-08 18:18:30 UTC
I am not 100% certain if all the metrics parts are in the openshift-infra namespace but I believe they are as the customer showed the output of `oc get svc -n openshift-infra heapster -o yaml` and things looked appropriate.

Customer confirmed they are a cluster admin and ran the following command which produced the output:
curl -X GET -H "Authorization: Bearer <token>" http://localhost:8001/api/v1/proxy/namespaces/openshift-infra/services/https:heapster:/api/v1/model/namespaces/<EXAMPLE>/pods/<POD>/metrics/cpu-usage
Error: 'Forbidden'
Trying to reach: 'https://<HOST>:8082/api/v1/model/namespaces/<EXAMPLE>/pods/<POD>/metrics/cpu-usage'

Customer specifically said they deployed basic metrics following the documentation with nothing modified.

This is the first time that the HPA is attempting to be used in this cluster.

Comment 7 Matt Wringe 2016-09-08 18:53:47 UTC
If you cannot access the Heapster via the API proxy then something is wrong with the setup.

Can you please check that the api proxy cert is signed by the system CA.

From the master configuration directory:
`openssl verify -verbose -CAfile ca.crt master.proxy-client.crt`

And can you check that the md5sum of the ca.crt matches the ca.crt that Heapster has? [eg `oc exec ${HEAPSTER_POD_NAME} md5sum /var/run/secrets/kubernetes.io/serviceaccount/ca.crt`

Can you also check that the master.proxy-client.crt has the proper CN name.

`openssl x509 -noout -subject -in master.proxy-client.crt`

Comment 14 Matt Wringe 2016-10-31 16:07:26 UTC
Closing this issue as INSUFFICIENT_DATA. Please re-open if you can provide the requested data or a means or reliably reproducing this issue.


Note You need to log in before you can comment on or make changes to this bug.