Area: Deployment Issues
Sub-Area: Kubernetes Health Probe Configuration / Helm Chart Upgrade
Applies to: OSS
Issue
You upgrade a self-hosted DataHub deployment to v1.6.0 or later. After that, the datahub-mae-consumer and datahub-mce-consumer pods restart over and over. The pod events show:
Liveness probe failed: HTTP probe failed with statuscode: 404Readiness probe failed: HTTP probe failed with statuscode: 404-
Back-off restarting failed containerevents for the consumer containers
This article covers self-hosted deployments. DataHub Cloud runs these pods for you.
You Might Be Asking
- Why do my MAE and MCE consumer pods keep restarting after the upgrade?
- Why does
/actuator/healthreturn 404 on port 9091 or 9090? - Which port serves the consumer health endpoint now?
- Can I fix this by setting the probe port in my Helm values?
Cause
Starting with v1.6.0, the MAE and MCE consumer images run Spring Boot Actuator on a separate management port. The container start script sets MANAGEMENT_SERVER_PORT to 4319 unless you set it yourself. The Actuator endpoints, including /actuator/health and /actuator/prometheus, then answer only on port 4319. The v1.6.0 breaking changes list this change.
The main consumer ports (9091 for MAE, 9090 for MCE) still run. A probe that calls /actuator/health on 9091 or 9090 reaches a live server that no longer serves that path. The server returns 404, and Kubernetes counts it as a failed probe and restarts the container.
The consumer Helm templates pick the probe port from your monitoring values:
- If
global.datahub.monitoring.enablePrometheusistrueandglobal.datahub.monitoring.metricsModeisjmx_and_actuatororactuator_only, the probes target the container port namedprometheus. That port isglobal.datahub.monitoring.actuatorPrometheusPort, which defaults to 4319. - In every other case, the probes target the container port named
http(9091 for MAE, 9090 for MCE).
Your chart version decides the defaults. From chart 1.0.0 (the first chart for DataHub v1.6.0), the chart sets enablePrometheus: true and metricsMode: jmx_and_actuator, so the probes target port 4319 by default. Chart versions from 0.9.7 up to 1.0.0 default metricsMode to legacy, so the probes target the main port and fail with v1.6.0 or later images. Older chart versions have no probe port switch. On chart 1.0.0 or later, a 404 means your own values override the defaults, usually metricsMode: legacy or enablePrometheus: false.
The templates set the probe path and port themselves. From the livenessProbe and readinessProbe values they read only initialDelaySeconds, periodSeconds, failureThreshold and timeoutSeconds. An httpGet block in your values has no effect. A higher failureThreshold doesn't help either, because a 404 is a wrong port, not a slow start.
Solution
- Check your chart version. The
CHARTcolumn shows it:
helm list -n <namespace>
Chart 1.0.0 or later probes port 4319 by default. Option A needs chart 0.9.7 or later. Option B works with any chart version.
- Confirm the port mismatch. Describe a consumer pod:
kubectl describe pod <mae-consumer-pod> -n <namespace>
The Liveness: and Readiness: lines show the probe target, for example http-get http://:http/actuator/health. http is the main port. prometheus is port 4319.
Then call the health endpoint on both ports from inside the pod (use 9090 for the MCE consumer):
kubectl exec <mae-consumer-pod> -n <namespace> -- curl -s -o /dev/null -w '%{http_code}\n' http://localhost:4319/actuator/health
kubectl exec <mae-consumer-pod> -n <namespace> -- curl -s -o /dev/null -w '%{http_code}\n' http://localhost:9091/actuator/health
A 200 on 4319 and a 404 on 9091 confirms the mismatch.
- Apply one of the two fixes below. Don't combine them.
Option A: point the probes at the management port. Set these values:
global:
datahub:
monitoring:
enablePrometheus: true
metricsMode: jmx_and_actuator
The chart then adds the prometheus container port (4319) and points the consumer probes at it. Use actuator_only instead of jmx_and_actuator if you don't want the JMX metrics. This needs chart 0.9.7 or later. On chart 1.0.0 or later these are already the defaults, so remove any metricsMode: legacy or enablePrometheus: false from your values instead of adding them. After you deploy, run kubectl describe pod again. If the probes still show http, upgrade the chart or use Option B.
Option B: keep Actuator on the main port. Set MANAGEMENT_SERVER_PORT to each consumer's main port:
datahub-mae-consumer:
extraEnvs:
- name: MANAGEMENT_SERVER_PORT
value: "9091"
datahub-mce-consumer:
extraEnvs:
- name: MANAGEMENT_SERVER_PORT
value: "9090"
Actuator then serves /actuator/health on 9091 and 9090, where the probes point. This works because the management port then matches the consumer's main port, so Spring Boot serves Actuator on the main server instead of opening a separate one. Use this only when your probes target http. If they target prometheus, this override leaves nothing listening on 4319 and the probes still fail. It also moves /actuator/prometheus to the main port, so update any scrape config that reads port 4319. See Monitoring DataHub for the management port settings.
Don't set metricsMode to legacy as a fix on its own. Legacy mode points the probes at the main port, which is the failing setup.
- Redeploy:
helm upgrade <release-name> <chart> -f values.yaml -n <namespace>
- Check that the pods stay up and the probes pass:
kubectl get pods -n <namespace> -w
kubectl describe pod <mae-consumer-pod> -n <namespace>
No new Unhealthy or BackOff events should appear in the pod events.