You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using the Spring Boot Zero-Code Implementation and following the documentation closely, I cannot seem to get the implementation to work without seeing this error message.
From what it seems, even after setting the endpoint and protocol values for what my team needs (http/protobuf), we always receive the error saying, "Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317". This is incorrect for two reasons. One, because I have set the endpoint using the application.yml and two, because I have set the protocol using the application.yml.
2025-01-09 15:24:39.910ERROR --- i.o.exporter.internal.grpc.GrpcExporter : Failed to export metrics. The request could not be executed. Error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317
java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.10.0.jar:na]
at io.opentelemetry.exporter.sender.okhttp.internal.RetryInterceptor.intercept(RetryInterceptor.java:91) ~[opentelemetry-exporter-sender-okhttp-1.44.1.jar:1.44.1]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517) ~[okhttp-4.10.0.jar:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Suppressed: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:4317
... 21 common frames omitted
Caused by: java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:751)
at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
... 20 common frames omitted
Caused by: java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592) ~[na:na]
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:751) ~[na:na]
at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128) ~[okhttp-4.10.0.jar:na]
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295) ~[okhttp-4.10.0.jar:na]
... 20 common frames omitted
Steps to reproduce
Follow OpenTelemetry documentation for Zero-Code Implementation under the Spring Boot Starter section.
What did you expect to see?
Integration and all telemetry data to show up in my Collector with no errors in the logs
What did you see instead?
All telemetry except a log of an error was shown repeatedly
What version and what artifacts are you using?
Artifacts: opentelemetry-instrumentation-bom, opentelemetry-spring-boot-starter
Version: 2.11.0
How did you reference these artifacts?
pom.xml Maven
Environment
Compiler: openjdk 21.0.4 2024-07-16 LTS
OS: RedHat Linux
Runtime: Corretto-21.0.4.7.1 (build 21.0.4+7-LTS)
OS RedHat Linux
The text was updated successfully, but these errors were encountered:
I was able to mitigate the issue by instead using environment variables rather than the spring application.yml. I don't count this as a non-issue though since the documentation clearly states that I should be able to use either.
I found that the spring boot starter implementation was not reading ANY of my configurations in the application.yml!
@jeffNedley a minimal sample application that reproduces the issue could help.
Perhaps the issue is that there are 2 OpenTelemetry instances. One that is configured by the spring starter and another one that uses the default configuration?
Describe the bug
Using the Spring Boot Zero-Code Implementation and following the documentation closely, I cannot seem to get the implementation to work without seeing this error message.
From what it seems, even after setting the endpoint and protocol values for what my team needs (http/protobuf), we always receive the error saying, "Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317". This is incorrect for two reasons. One, because I have set the endpoint using the application.yml and two, because I have set the protocol using the application.yml.
Here is our config (application.yml) below:
Here is our dependency config (pom.xml):
Error that comes up constantly:
Steps to reproduce
Follow OpenTelemetry documentation for Zero-Code Implementation under the Spring Boot Starter section.
What did you expect to see?
Integration and all telemetry data to show up in my Collector with no errors in the logs
What did you see instead?
All telemetry except a log of an error was shown repeatedly
What version and what artifacts are you using?
Artifacts: opentelemetry-instrumentation-bom, opentelemetry-spring-boot-starter
Version: 2.11.0
How did you reference these artifacts?
pom.xml Maven
Environment
Compiler: openjdk 21.0.4 2024-07-16 LTS
OS: RedHat Linux
Runtime: Corretto-21.0.4.7.1 (build 21.0.4+7-LTS)
OS RedHat Linux
The text was updated successfully, but these errors were encountered: