Transaction (Trace) Data Not Appearing in HEAL
Trace data missing though the agent and Collector look healthy.
Transaction (trace) data does not appear in HEAL even though the Java agent is attached to the monitored application and the OpenTelemetry Collector is reported as running and healthy. When the checks below pass every ingest stage, the failure is at the point where the Collector writes into the trace store. This article gives the hop-by-hop checks that isolate the failing stage, a known configuration fault that produces exactly this pattern, and the reason that fault is easy to miss.
The checks below are complementary to Otel Collector Issues, which covers Collector startup port conflicts, enabling the Zipkin receiver, and span droppage arithmetic. Start here when the Collector is up and no spans are being refused, yet nothing reaches the UI.
Symptom#
- No transactions are listed for the application in the HEAL Transactions or Service view.
- The agent JAR and its configuration file are present on the running Java process.
- Nomad reports the
otel-collectorjob as deployed and the allocation as healthy and running. - Collector metrics show spans being accepted, with
otelcol_receiver_refused_spansandotelcol_exporter_send_failed_spansboth at 0.
That combination is the signature of a working ingest path and a failing storage write. Spans are arriving, being queued, and then discarded before they are indexed.
Diagnostic ladder#
Work down the ladder in order and stop at the first check that fails. Each step assumes the step above it passed, so running them out of order will mislead you. Substitute your own values for <COLLECTOR_IP>, <opensearch-host> and <username>, and for the trace-store port, which is deployment specific.
| # | Check | Where to run it | Pass | Fail |
|---|---|---|---|---|
| 1 | Java agent is attached to the application process — ps -ef | grep -i javaagent |
Monitored application host | The process line shows the agent JAR and the agent configuration file | No agent parameters on the process; the application was started without them or was not restarted after they were added |
| 2 | Agent can reach the trace ingest endpoint — nc -zv <INGEST_HOST> <INGEST_PORT> |
Monitored application host | Port reported open. Note this endpoint is often HAProxy or an OpenTelemetry load balancer fronting the Collector, so a pass clears the path to that front door and not necessarily to the Collector itself | Connection refused or timed out — firewall, load balancer, or wrong target in the agent configuration |
| 3 | Collector job and allocation state — nomad job status otel-collector |
Any Nomad client or server | Deployment successful, allocation healthy and running | Allocation pending, failed, or restart-looping — treat as a Collector startup problem, not a data problem |
| 4 | Receiver counters — curl -s http://localhost:8888/metrics | grep -E 'receiver_(accepted|refused)_spans' |
Collector host | Accepted count is non-zero and rising between runs; refused is 0 | Accepted stays at 0 — data is not arriving, go back to steps 1 and 2 |
| 5 | Collector service log | Collector host — the Nomad allocation log directory, or nomad alloc logs -stderr <alloc-id> |
Startup line Everything is ready. Begin running and processing data. and no repeating errors |
Repeating exporter errors, typically Bulk indexer error: flush: dial tcp ...: connect: connection refused |
| 6 | Is the trace store actually listening where the Collector is pointed — ss -lntp |
Collector host first, then the trace-store host | The trace store is listening on the host and port named in the exporter endpoint | Nothing listening on that port on the Collector host, while the trace store is listening on a different host |
| 7 | Trace store answers over HTTPS — curl -sk -o /dev/null -w '%{http_code}\n' https://<opensearch-host>:9250 |
Collector host | An authentication challenge is returned, which confirms the service is healthy and reachable | No response — network path, service down, or TLS failure |
| 8 | Container network mode — podman inspect heal-opentelemetry-collector --format '{{.HostConfig.NetworkMode}}' |
Collector host | Value understood, so you know what a loopback address resolves to | Under host networking, 127.0.0.1 in the Collector configuration resolves to the Collector's own host, not to any other node |
| 9 | Effective exporter endpoint in the generated config.yaml in the Nomad allocation directory |
Collector host | The trace exporter endpoint names the trace-store host | The endpoint is a loopback or otherwise wrong address |
| 10 | Where that value comes from — consul kv get service/otelcollector/exporters/heal_opensearch/trace/endpoints |
Any Consul server | The Consul value matches the intended architecture | The Consul value still holds an installation-time placeholder |
Note: The documented Collector exporter configuration disables certificate verification, so an IP-based endpoint does not normally depend on the trace store's certificate. If your deployment has verification enabled instead, an IP-based endpoint additionally requires that certificate's SAN to cover the IP address.
A known root cause: the exporter endpoint left at 127.0.0.1#
In a distributed deployment the Collector runs on the application server while the trace store runs on the database server. The trace exporter endpoint held in Consul is set to a loopback placeholder at installation time and is expected to be replaced with the real trace-store address during deployment. When that step is missed, the value survives into production.
The Collector container runs with host networking, so 127.0.0.1 resolves to the Collector's own host. No trace store is listening there. Every bulk write attempt is refused, the records are discarded, and nothing reaches storage — so nothing can be displayed in HEAL.
The log line that identifies it
Bulk indexer error: flush: dial tcp 127.0.0.1:9250: connect: connection refused
The same class of fault produces the same symptom whenever the endpoint is wrong for any reason — a decommissioned address, a node that was moved, or a port that was changed on the trace store but not in Consul.
Why the exporter metrics do not show the failure#
This is the part that makes the fault hard to find, and it is worth understanding before you trust any metric-based check.
otelcol_exporter_send_failed_spans stays at 0 for the entire duration of the outage. The HEAL OpenSearch exporter uses an asynchronous bulk indexer: a record is counted as sent at the moment it is handed over to the internal queue, which happens before any write to the trace store is attempted. The subsequent flush failure never increments the failed counter. The receiver counters look clean too, because the receiver genuinely did accept the data.
Important: Exporter metrics must never be used on their own to confirm that trace data has been stored. They confirm only that spans were queued for export. The two authoritative checks are the Collector service log and the record count in the trace store. Whenever a droppage investigation says the pipeline is clean but the UI is still empty, go to the log.
Correcting the exporter endpoint#
Collector configuration for this product is generated from Consul KV. The running config.yaml is rendered by Nomad from a template that reads the Consul values, so the fix is a single Consul key update. Run the command on any host with access to the Consul cluster.
consul kv put service/otelcollector/exporters/heal_opensearch/trace/endpoints \
'[ https://<opensearch-host>:9250 ]'
The Nomad template for the Collector task uses change_mode = "restart", so the Collector detects the changed value, regenerates its configuration and restarts itself. Expect roughly 20 to 30 seconds of Collector downtime. The monitored application is not affected, is not restarted, and no application-side change is needed.
Do not fix this by editing the template. The Collector configuration template under conf-template is not the source of truth. Any value you edit there is overridden by the Consul value at render time, so the change has no effect, and the edited file is lost at the next product upgrade. Always change the Consul key. See HEAL OpenSearch Guide — Consul Keys for the related storage keys.
Verifying the fix#
- Confirm the generated
config.yamlin the Nomad allocation directory now shows the corrected endpoint. - Watch the Collector service log through the restart. It should reach
Everything is ready. Begin running and processing data.with no further connection errors. - Confirm the bulk indexer error has stopped completely, not merely become less frequent.
- Confirm the trace index for the current date exists, its health is green, and it holds records.
- Run the record count twice a few minutes apart and confirm it is increasing, then confirm the transactions are visible in Viewing Transactions in HEAL.
If validation is done on an idle system the span volume will be very low and the UI may still look empty. Generate representative application load before concluding that the fix did not work.
Ongoing validation commands#
Run these on the trace-store host at any time to confirm that transaction data is being stored. Substitute the account password at execution time; do not store it in scripts or handover documents.
Current stored transaction record count
curl -sk -u <username>:<password> \
"https://<opensearch-host>:9250/jaeger-span-*/_count?pretty"
Index status and size
curl -sk -u <username>:<password> \
"https://<opensearch-host>:9250/_cat/indices/jaeger-span-*?v&s=index"
Which services are currently reporting transactions
curl -sk -u <username>:<password> -H "Content-Type: application/json" \
"https://<opensearch-host>:9250/jaeger-span-*/_search?pretty" \
-d '{"size":0,"aggs":{"svc":{"terms":{"field":"process.serviceName","size":50}}}}'
The record count should increase between successive runs. A service missing from the aggregation is reporting nothing and should be investigated as an agent-side problem — see Troubleshoot JIM Issue.
Rollback#
The change is a single key, so rollback is a single command. Write the previous value back and the Collector restarts automatically and reverts to its earlier behaviour. No other action is required.
consul kv put service/otelcollector/exporters/heal_opensearch/trace/endpoints \
'[ <previous-value> ]'
Record the previous value with consul kv get before you make the change, so that rollback does not depend on memory.
Recommendations#
- Audit the remaining keys under
service/otelcollector/against the intended architecture. A placeholder that survived deployment in one key is a strong indication that others were missed as well. - Make every future Collector configuration change through Consul KV. File edits under
conf-templateare overridden at render time and lost on upgrade. - Add the trace-store record count to routine health checks. It is the only check that proves end-to-end storage, and it catches this failure class immediately.
Additional Java instances: Instrumentation applies to one Java process at a time. If another application instance on the same or a different host — for example a separate Apache Tomcat — is also in scope for transaction monitoring, it must be instrumented separately by adding the agent parameters to that instance (normally in setenv.sh or JAVA_OPTS) and restarting it. The required parameters take the form -javaagent:<agent-path>/heal-jim-opentelemetry-javaagent.jar and -Dotel.javaagent.configuration-file=<agent-path>/config/agent-cache.properties. See Installing Java Agent in Apache Tomcat for the full procedure.