How to Fix Envoy Config Dump Error
In this tutorial, you'll learn about How to Fix Envoy Config Dump Error. We cover key concepts, practical examples, and best practices.
Envoy config_dump returns 404 Not Found or an empty response when querying the admin endpoint — the admin interface is not configured or the endpoint path is incorrect.
The Problem
$ curl http://localhost:9901/config_dump
404 Not Found
Step-by-Step Fix
Step 1: Enable the admin interface
# envoy.yaml
admin:
access_log_path: /dev/stdout
address:
socket_address:
address: 0.0.0.0
port_value: 9901
Step 2: Use the correct config dump endpoint
# Full config dump
curl -s http://localhost:9901/config_dump | jq .
# Specific sections
curl -s http://localhost:9901/config_dump?resource=dynamic_listeners
curl -s http://localhost:9901/config_dump?resource=dynamic_clusters
Step 3: Filter the output
# Pretty-print with jq
curl -s http://localhost:9901/config_dump | jq '.configs[0].listeners'
# Save to file
curl -s http://localhost:9901/config_dump > envoy_config_backup.json
Step 4: Check admin endpoint logging
# Watch admin access logs
tail -f /var/log/envoy/admin.log
Prevention Tips
- Restrict admin interface to localhost in production
- Enable admin only on non-public interfaces
- Use TLS for admin endpoint in multi-tenant environments
- Route admin access through a separate auth proxy
Common Mistakes with config dump
- Using
headandtailinstead of pattern matching, causing runtime errors on empty lists - Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
- Using
returnto exit a function early instead of wrapping a pure value in the monad
These mistakes appear frequently in real-world ENVOY code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro