Connectivity issues with EDOT
Serverless EDOT Collector
Connectivity problems occur when the EDOT SDKs or the EDOT Collector can't reach Elastic. Even with correct proxy settings, network restrictions such as blocked ports or firewalls can prevent data from flowing.
You might see one or more of the following error messages:
- connection refused
- network unreachable
- i/o timeout
- tls: handshake failure
These errors might appear either in application logs (from the SDK) or in the Collector logs.
Example (Collector):
2024-09-15T12:44:30Z error exporterhelper/queued_retry.go:149 Exporting failed. Rejecting data. Error: context deadline exceeded
		
	Example (Python SDK):
opentelemetry.sdk ERROR OTLPSpanExporter - Failed to export spans: [Errno 111] Connection refused
		
	Connectivity errors usually trace back to one of the following issues:
- Firewall or port blocking - Outbound traffic may be blocked by corporate firewalls or network policies. - Check that the required protocol and port combination is allowed: - OTLP/HTTP: TCP 4318
- OTLP/gRPC: TCP 4317
- Elasticsearch (over HTTPS): 443
- Elasticsearch: 9200
 - Also confirm whether your environment uses IPv4 or IPv6, as routing and firewall rules may differ. 
- Endpoint errors - The endpoint is unreachable or not listening on the specified port: - connection refused: endpoint not listening
- network unreachable: VPN, routing, or DNS failure
- timeout: traffic dropped by firewall, proxy, or load balancer
 
- Proxy misconfiguration - Proxy environment variables ( - HTTP_PROXY,- HTTPS_PROXY) might be set correctly but the proxy itself lacks access to Elastic or restricts ports. Refer to Proxy settings for more information.
Errors can look similar whether they come from an SDK or the Collector. Identifying the source helps you isolate the problem.
Note: Some SDKs support setting a proxy directly (for example, using HTTPS_PROXY). Refer to Proxy settings for EDOT SDKs for details.
Application logs report failures when the SDK cannot send data to the Collector or directly to Elastic. These often appear as connection refused or timeout messages. If seen, verify that the Collector endpoint is reachable.
For guidance on enabling logs in your SDK, see Enable SDK debug logging.
Example (Java SDK):
io.opentelemetry.exporter.otlp.internal.grpc.OkHttpGrpcExporter - Failed to export spans. Error: UNAVAILABLE: io exception
		
	Collector logs show export failures when it cannot forward data to Elastic. Look for messages like cannot send spans or failed to connect to <endpoint>. If present, confirm the Collector’s exporters configuration and network access.
Before you dig into SDK or Collector configuration, confirm that your environment can reach the Elastic endpoint.
The examples below use command syntax from Linux and macOS. On Windows or when testing IPv6, the equivalent tooling or syntax may differ (for example, Test-NetConnection in PowerShell).
- 
				Verify DNS resolutionMake sure the hostname for your Elastic endpoint resolves correctly: nslookup <your-endpoint>
- 
				Test network reachabilityping <your-endpoint>
- 
				Check open portsTest whether the required OTLP ports are open (default 443for HTTPS):nc -vz <your-endpoint> 443
- 
				Verify TLS/SSLCheck that TLS certificates can be validated: openssl s_client -connect <your-endpoint>:443
If any of these steps fail, the issue is likely caused by network infrastructure rather than your SDK or Collector configuration.
If basic checks and configuration look correct but issues persist, collect more details before escalating:
- Review proxy settings. For more information, refer to Proxy settings. 
- If ports are confirmed open but errors persist, enable debug logging in the SDK or in the Collector for more detail. 
- Contact your network administrator with test results if you suspect firewall restrictions.