Jaeger Agent Not Discovering Collector — Quick Fix
In this tutorial, you'll learn about Jaeger Agent Not Discovering Collector. We cover key concepts, practical examples, and best practices.
The Problem
The Jaeger agent cannot discover or connect to the Jaeger collector. Spans are being dropped or buffered locally. The agent logs show connection failures to the collector endpoint.
Error example:
Agent: failed to connect to collector: dial tcp: lookup jaeger-collector on 8.8.8.8:53: no such host
Agent: couldn't reach any collector — spans will be dropped
Agent: reporter queue full — dropping spans
The Fix
Step 1: Check collector DNS resolution
WRONG — using an incorrect hostname:
# The hostname must resolve to the collector service
RIGHT — verify DNS resolution:
# From the agent host
nslookup jaeger-collector
Output:
Server: 8.8.8.8
Address: 8.8.8.8#53
Name: jaeger-collector.example.com
Address: 192.168.1.100
If DNS fails, check the Kubernetes service name or the JAEGER_AGENT_* environment variables.
Step 2: Configure agent-to-collector connection
WRONG — using an incorrect port:
# The agent sends spans to the collector on specific ports
RIGHT — use the correct configuration:
# Agent sends spans to collector's gRPC port (14250) or Thrift port (14267)
# In a Kubernetes deployment, the agent typically uses:
JAEGER_AGENT_HOST=jaeger-collector
JAEGER_AGENT_PORT=14250
# For Docker deployment
docker run -d \
-e JAEGER_AGENT_HOST=jaeger-collector \
-e JAEGER_AGENT_PORT=14250 \
jaegertracing/jaeger-agent
Use DodaTech's Jaeger Discovery Validator to test agent-to-collector connectivity, DNS resolution, and port accessibility from any deployment context.
Prevention Tips
- Use Kubernetes DNS service names for collector discovery
- Deploy the Jaeger agent as a sidecar for per-pod span processing
- Configure multiple collector endpoints for high availability
- Monitor
jaeger_agent_reporter_batch_sizeandjaeger_agent_reporter_queue_length - Use DodaTech's Jaeger Deployment Suite for automated agent configuration
Common Mistakes with agent discovery
- Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
- Non-exhaustive pattern matches that compile with warnings then crash at runtime
- Misunderstanding that
Stringis[Char]with poor performance for large text operations
These mistakes appear frequently in real-world JAEGER 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
Related: DodaTech's Distributed Tracing Guide covers Jaeger, Tempo, and OpenTelemetry deployment patterns for microservice observability.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro