Error: 404: could not properly parse response JSON: default backend - 404 Error: plugin "push" exited with error
Got back from the weekend, and am now seeing this error on the client side. Turned on debug and there is nothing interesting in the chartmuseum logs.
Can someone please provide me with a direction to get to the bottom of this?
k8s version: 1.11 chartmuseum version: tried both v0.7.1 (worked Friday) and 0.8.1 this morning, both have the same problem.
Any help is greatly appreciated!
@trimbleAdam it is likely that the upload API is disabled, please see this thread: https://stackoverflow.com/a/48731728
Thanks for the quick response! I actually do have that flag set to true.
My formula for deploying this (has worked until today...) has been fetching the chart from stable, and customizing values.yaml as follows:
replicaCount: 1 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 0 image: repository: chartmuseum/chartmuseum tag: v0.8.1 pullPolicy: Always env: open: STORAGE: amazon STORAGE_AMAZON_BUCKET: REDACTED STORAGE_AMAZON_PREFIX: "" STORAGE_AMAZON_REGION: REDACTED CHART_POST_FORM_FIELD_NAME: chart PROV_POST_FORM_FIELD_NAME: prov DEPTH: 0 DEBUG: true LOG_JSON: true DISABLE_STATEFILES: false DISABLE_METRICS: true DISABLE_API: false ALLOW_OVERWRITE: true INDEX_LIMIT: 0 service: servicename: type: ClusterIP externalPort: 8080 nodeSelector: vss/application: jenkins ingress: enabled: true annotations: kubernetes.io/ingress.class: nginx external-dns.alpha.kubernetes.io/target: REDACTED hosts: chartmuseum.REDACTED: - /charts - /index.yaml
edit update: Markdown was making all kinds of funny stuff when I stuffed my values.yaml into the comment, so I've pruned it to remove comments and unused sections. These are still present in the actual yaml, just removed from the comment.
Interestingly, even though I've manually specified this API_ACCESS parameter, the value is not found in the pod ENV:
adaught-us-la:mirror adaught$ kc exec -it chartmuseum-chartmuseum-8655697657-h2jh7 sh
/ $ env
CHARTMUSEUM_CHARTMUSEUM_PORT_8080_TCP_PROTO=tcp
KUBERNETES_SERVICE_PORT=443
KUBERNETES_PORT=tcp://172.20.0.1:443
CHARTMUSEUM_CHARTMUSEUM_PORT=tcp://172.20.14.191:8080
CHARTMUSEUM_CHARTMUSEUM_SERVICE_PORT=8080
HOSTNAME=chartmuseum-chartmuseum-8655697657-h2jh7
SHLVL=1
ALLOW_OVERWRITE=true
HOME=/home/chartmuseum
CHARTMUSEUM_CHARTMUSEUM_PORT_8080_TCP=tcp://172.20.14.191:8080
TERM=xterm
LOG_JSON=true
KUBERNETES_PORT_443_TCP_ADDR=172.20.0.1
CHART_POST_FORM_FIELD_NAME=chart
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT_443_TCP_PROTO=tcp
STORAGE_AMAZON_BUCKET=REDACTED
STORAGE=amazon
CHARTMUSEUM_CHARTMUSEUM_SERVICE_PORT_HTTP=8080
PROV_POST_FORM_FIELD_NAME=prov
KUBERNETES_PORT_443_TCP=tcp://172.20.0.1:443
KUBERNETES_SERVICE_PORT_HTTPS=443
STORAGE_AMAZON_REGION=REDACTED
KUBERNETES_SERVICE_HOST=172.20.0.1
PWD=/
DISABLE_METRICS=true
CHARTMUSEUM_CHARTMUSEUM_PORT_8080_TCP_ADDR=172.20.14.191
CHARTMUSEUM_CHARTMUSEUM_SERVICE_HOST=172.20.14.191
CHARTMUSEUM_CHARTMUSEUM_PORT_8080_TCP_PORT=8080
...and as you pointed out, just fetching http://chartmuseum.my.org.com/api/charts also return 404.
Could this be a helm version issue? I just upgraded to 2.12.3 recently...
Forcibly stuff DISABLE_API into deployment and still not working:
kubectl describe deployment
...
Environment:
ALLOW_OVERWRITE: true
DISABLE_API: false
...
kubectl describe rs
...
Environment:
ALLOW_OVERWRITE: true
DISABLE_API: false
...
kubectl describe po
...
Environment:
ALLOW_OVERWRITE: true
DISABLE_API: false
...
@trimbleAdam is the DNS maybe pointing to the wrong service? Can you try running a curl localhost:8080/api/charts inside the container?
Unfortunately chartmuseum is configured to run as unprivileged "chartmuseum" user, and curl is not installed. Will try to extend the image with a Dockerfile to get curl installed and get back to you.
Thanks, Adam
Okay, after getting a one-off Dockerfile set up and curl added, I can see the expected response from curl localhost:8080/api/charts.
Something about the service+ingress must be badly mangled.
What just worked:
I removed the absolute paths under the ingress.hosts map and left only / and things are working again.
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
external-dns.alpha.kubernetes.io/target: REDACTED
hosts:
chartmuseum.REDACTED:
- /
It is very curious to my as to why this is now this way, but either way thanks for the help!
Adam