Debugging a 404 (Not Found) error on Istio can be frustrating. Hopefully this will give you a place to start tracking down where things may be going wrong.
There can be only one Gateway definition that uses a wildcard "*" hosts value. If you've deployed anything else that includes a wildcard Gateway, client calls will fail with a 404 status.
Example:
$ istioctl get gateways GATEWAY NAME HOSTS NAMESPACE AGE bookinfo-gateway * default 20s httpbin-gateway * default 3s
If so, you'll need to delete or change one of the conflicting gateways.
Istio is like an onion (or, perhaps, an Ogre), it has layers. A systematic way to debug a 404 is to work outward from the target.
Verify you can access the workload from the sidecar:
kubectl exec $WORKLOAD_POD -c istio-proxy -- curl localhost:80/headers
Set your service address and get the IP address of the workload pod.
SERVICE=httpbin.default.svc.cluster.local:80 POD_IP=$(kubectl get pod $WORKLOAD_POD -o jsonpath='{.status.podIP}')
Access the workload through the sidecar:
kubectl exec $WORKLOAD_POD -c istio-proxy -- curl -v http://$SERVICE/headers --resolve "$SERVICE:$POD_IP"
Or, if Istio mTLS is enabled:
kubectl exec $WORKLOAD_POD -c istio-proxy -- curl -v https://$SERVICE/headers --resolve "$SERVICE:$POD_IP" --key /etc/certs/key.pem --cert /etc/certs/cert-chain.pem --cacert /etc/certs/root-cert.pem --insecure
Access the service from the gateway:
kubectl -n istio-system exec $GATEWAY_POD -- curl -v http://$SERVICE/header
Or, if Istio mTLS is enabled:
kubectl -n istio-system exec $GATEWAY_POD -- curl -v https://$SERVICE/headers --key /etc/certs/key.pem --cert /etc/certs/cert-chain.pem --cacert /etc/certs/root-cert.pem --insecure
If you aren't seeing analytics in the Analytics UI, consider these possible causes:
If API key validation is not working properly, consider these possible causes:
Direct proxy
Check the ext-authz
configuration.
ext-authz
configuration.Invalid requests are being checked and allowed
For information on how to address these issues, refer to the following Envoy documentation topic: External Authorization, and refer to information about the failure_mode_allow
property. This property allows you to change the filter's behavior on errors.
The probable cause is that the Envoy JWT filter is not configured.
The product must be bound to the same environment as your Remote Service.
Check the Apigee remote service targets section. Remember, the service name must be a fully qualified host name. If it's an Istio service, the name will be something like helloworld.default.svc.cluster.local
code> - which represents the helloworld
service in the default
namespace.
Remember, a path like /
or /**
will match any path. You may also use '*' or '**' wildcards for matching.
The API Product must be bound to a Developer App to check its keys.
x-api-key header
Example:
curl http://localhost/hello -H "x-api-key: wwTcvmHvQ7Dui2qwj43GlKJAOwmo"
Ensure the Credentials from the App you're using are approved for your API Product.
debug level
Use -l debug
option on the command line.
Check the logs for a line that looks something like this:
Resolve api: helloworld.default.svc.cluster.local, path: /hello, scopes: [] Selected: [helloworld] Eliminated: [helloworld2 doesn't match path: /hello]
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-24 UTC.