|
| 1 | +--- |
| 2 | +navigation_title: Proxy issues |
| 3 | +description: Troubleshooting guide for the EDOT Java SDK, covering proxy issues. |
| 4 | +applies_to: |
| 5 | + stack: |
| 6 | + serverless: |
| 7 | + observability: |
| 8 | + product: |
| 9 | + edot_java: ga |
| 10 | +products: |
| 11 | + - id: cloud-serverless |
| 12 | + - id: observability |
| 13 | + - id: edot-sdk |
| 14 | +--- |
| 15 | + |
| 16 | +# Proxy issues with EDOT Java SDK |
| 17 | + |
| 18 | +If your Java SDK sends telemetry but fails to communicate with the APM server, the issue might be due to missing or misconfigured proxy settings, which are required for outbound HTTP/S communication in some environments. |
| 19 | + |
| 20 | +## Symptoms |
| 21 | + |
| 22 | +These symptoms typically indicate that your Java SDK is experiencing a proxy issue: |
| 23 | + |
| 24 | +* Telemetry data is not received in Elastic APM after instrumenting the app. |
| 25 | +* Logs show errors like `Connection timed out`, `TLS handshake failure`, or other network-related issues when connecting to Elastic APM. |
| 26 | + |
| 27 | +## Resolution |
| 28 | + |
| 29 | +Set standard Java system properties to configure proxy settings. |
| 30 | + |
| 31 | +Configure the following JVM system properties to enable outbound HTTP/HTTPS communication through a proxy: |
| 32 | + |
| 33 | +```bash |
| 34 | +java \ |
| 35 | +-Dhttp.proxyHost=proxy.example.com \ |
| 36 | +-Dhttp.proxyPort=8080 \ |
| 37 | +-Dhttps.proxyHost=proxy.example.com \ |
| 38 | +-Dhttps.proxyPort=8080 \ |
| 39 | +``` |
| 40 | + |
| 41 | +## Best practices |
| 42 | + |
| 43 | +You can test end-to-end connectivity to validate proxy routing. To confirm that your application or collector can reach the endpoint through the proxy, use `curl` with the `--proxy` option: |
| 44 | + |
| 45 | +```bash |
| 46 | +curl --proxy http://proxy.example.com:8080 https://example.elastic.co |
| 47 | +``` |
| 48 | + |
| 49 | +If the proxy is working, you'll get a valid response. If not, common errors include: |
| 50 | + |
| 51 | +* `Connection timed out` |
| 52 | +* `Could not resolve host` |
| 53 | +* `Proxy CONNECT aborted` |
| 54 | + |
| 55 | +## Resources |
| 56 | + |
| 57 | +* [Java networking and proxies](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html) |
| 58 | +* [Java agent configuration - upstream documentation](https://opentelemetry.io/docs/zero-code/java/agent/configuration/) |
0 commit comments