Elastic Agent doesn’t start
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Agent can run in OpenTelemetry mode to retrieve traces, metrics, and logs from your infrastructure and applications, and forward them to Elastic Observability. Availability This functionality is generally available and ready for production usage. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless Observability
Generally available
Stack
Generally available
Elastic Agent
Generally available
If your Elastic Agent fails to start, it’s often due to configuration or environment-related issues. This guide walks you through the most common root causes and how to resolve them.
Elastic Agent fails to start or crashes immediately after launch.
Possible causes include:
- Invalid YAML configuration, including syntax errors or unsupported fields
- Port binding conflicts, for example ports 4317 or 4318 already in use
- Missing or misconfigured required components, such as
receiversorexporters - Incorrect permissions or volume mounts in containerized environments
The solution depends on your Elastic Agent's setup:
If you're deploying the Elastic Agent in a standalone configuration, try to:
Validate configuration syntax
Run the following to validate your configuration without starting the Collector:
Shell otelcol validate --config=/path/to/otel-collector-config.yamlThis checks for syntax errors and missing components.
Check logs for stack traces or component errors
Review the Collector logs for error messages indicating configuration problems. Common examples include:
Text error initializing exporter: no endpoint specifiedMost critical issues, such as missing or invalid exporters or receivers, will be logged.
To increase verbosity, run:
Shell ./otelcol --set=service.telemetry.logs.level=debugThis is especially helpful for diagnosing configuration parsing issues or startup errors. For more information on enabling debug logging, refer to Enable debug logging.
Confirm required components are defined
Ensure
service.pipelinesreferences validreceivers,processors, andexporters. The minimal configuration depends on your use case:For logs:
filelogreceiver,resourcedetectionprocessor,elasticsearchexporterFor traces:
otlpreceiver,elastictraceandelasticapmprocessors,elasticsearchexporterFor managed OTLP endpoint: use relevant receivers and export using the
otlpexporter
Refer to Default configuration of the Elastic Agent (Standalone) for full examples for each use case.
Check for port conflicts
By default, Elastic OpenTelemetry uses:
- 4317 for OTLP/gRPC
- 4318 for OTLP/HTTP
Run this to check if a port is in use:
Shell lsof -i :4317If needed, adjust your configuration or free up the port. For network connectivity issues, refer to Connectivity issues.
If you're deploying the Elastic Agent using the Elastic Helm charts, try to:
Double-check your custom
values.yamlor --setoverrides for typos or missing fields.Ensure volume mounts are correctly defined if you're using custom configuration files.
If you're managing the Collector through Fleet, confirm that the policy includes a valid configuration and hasn't been corrupted or partially applied.
Use
kubectl logs <collector-pod>to get Collector logs and diagnose startup failures.Check the status of the pod using:
Shell kubectl describe pod <collector-pod>Common issues include volume mount errors, image pull failures, or misconfigured environment variables.
If the Collector starts but no data appears in Kibana, refer to No data visible in Kibana for additional troubleshooting steps.