Troubleshoot the current F5 WAF for NGINX integration
Applies to: Current F5 WAF for NGINX integration, all policy-management methods
This document describes how to troubleshoot problems when using NGINX Ingress Controller with F5 WAF for NGINX. For the legacy F5 WAF for NGINX integration, see Troubleshoot the legacy F5 WAF for NGINX integration.
For general troubleshooting of NGINX Ingress Controller, check the general troubleshooting documentation. For Policy Lifecycle Management (PLM), see Troubleshooting in the PLM installation guide.
The following table lists potential problems with NGINX Ingress Controller when the F5 WAF for NGINX module is turned on. It suggests how to troubleshoot them, using one or more methods from Troubleshooting methods.
| Problem area | Symptom | Troubleshooting method | Common cause |
|---|---|---|---|
| Start | The Ingress Controller fails to start. | Check the logs. | Misconfigured policy bundle. |
| Start | The configuration is not applied. | Check if a policy bundle is compiled using version of the compiler running in NGINX Ingress Controller. | Policy bundle is invalid. |
| Start | The configuration is not applied. | Check that the bundle is in the bundle folder. | Policy bundle is not present in the bundle folder, /etc/app_protect/bundles. |
| Policy or Ingress Resource. | The configuration is not applied. | Check the events of the Policy and Ingress Resource, check the logs, replace the policy bundle. | Policy bundle is invalid. |
| Bundle source. | Bundle not fetched, Warning event on Policy. | Check Policy events and status. Verify the bundle source URL and credentials are correct. | Invalid URL, authentication failure, or bundle not yet compiled on the management plane. |
| Bundle source. | VirtualServer or Ingress returns HTTP 500. | Check Policy status for bundle source errors. | Bundle source is unreachable or the bundle is not yet available. |
| Bundle source. | Policy not updating after bundle recompilation. | Verify enablePolling is true and pollInterval is at least 1m. |
Polling is turned off, or the poll interval is less than the minimum. |
F5 WAF for NGINX logs are part of NGINX Ingress Controller logs when the module is turned on. To check NGINX Ingress Controller logs, follow the steps in Check NGINX Ingress Controller logs of the Troubleshooting guide.
For F5 WAF for NGINX logs, look for messages starting with APP_PROTECT, for example:
2020/07/10 11:13:20 [notice] 17#17: APP_PROTECT { "event": "configuration_load_success", "software_version": "2.52.1", "completed_successfully":true,"attack_signatures_package":{"revision_datetime":"2020-06-18T10:11:32Z","version":"2020.06.18"}}Read the topic Troubleshooting Ingress resources.
When a Policy resource references a bundle that NGINX Ingress Controller can’t find, NGINX Ingress Controller doesn’t apply the Policy. It reports a warning on the VirtualServer, VirtualServerRoute, or Ingress resource that uses the Policy, and a VirtualServer that uses it returns HTTP 500. The warning shows the full path that NGINX Ingress Controller checked:
WAF policy <NAMESPACE>/<POLICY_NAME> references an invalid or non-existing App Protect bundle <BUNDLE_PATH>For a log bundle, the warning says log config bundle instead of App Protect bundle.
-
Check the events of the resource that uses the Policy. For example, for a VirtualServer:
kubectl describe virtualserver <VIRTUALSERVER_NAME> --namespace <NAMESPACE> -
Compare
<BUNDLE_PATH>in the warning with the bundle folder for the current F5 WAF for NGINX integration,/etc/app_protect/bundles/.If the path starts with
/etc/nginx/waf/bundles/, the pod runs the legacy F5 WAF for NGINX integration. To confirm, see Check which integration you run, then follow Troubleshoot the legacy F5 WAF for NGINX integration. -
List the files in the bundle folder:
kubectl exec <POD_NAME> --namespace <NAMESPACE> --container <CONTAINER_NAME> -- ls -la /etc/app_protect/bundlesReplace
<CONTAINER_NAME>withnginx-ingressif you installed with Helm, ornginx-plus-ingressif you installed with manifests. -
If the bundle isn’t in the list, copy it to
/etc/app_protect/bundles/with the file name that the Policy resource references. For an example, see Install F5 WAF for NGINX with Helm and local bundles.
When you set NGINX Ingress Controller to use debug mode, the setting also applies to the F5 WAF for NGINX module. See Running NGINX in the Debug Mode for instructions.
A Cache policy with cacheBackgroundUpdate uses NGINX subrequests. These subrequests may not work as expected when F5 WAF for NGINX applies to the same route.
Other policies that use subrequests, such as ExternalAuth, JWT with jwksURI, and OIDC, don’t have this issue. NGINX Ingress Controller turns off F5 WAF for NGINX in the internal locations that serve their subrequests.