Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: ERROR: Failed to export spans. The request could not be executed. Error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4117 #2423

Closed
e-dsouza opened this issue Oct 4, 2024 · 9 comments · Fixed by #2541

Comments

@e-dsouza
Copy link

e-dsouza commented Oct 4, 2024

What happened?

When updated hub, chrome, firefox and edge images to 4.25.0-20240922, the OCP containers has following repeatative error in log, however it doesnt seems to be impacting execution

Command used to start Selenium Grid with Docker (or Kubernetes)

OC deploy - deployed in Openshift

Relevant log output

note this log data is scaped data from image:

14:27:35-153 ERROR (ThrottlingLogger.dolog) Failed to export spans. The request could not be executed. Error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4117

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)
at okhttp3.internal.connection. ExchangeFinder.findConnection (Exchangefinder.kt: 226)
at okhttp3.internal.connection.okhttps.internal.connection.RealConnection.connect(RealConnection.kt:207)

at ukhttp3.internal.connection. Exchangefinder.findfiealthy Connection(Exchangefinder.kt:106) okhttp.internal.connection.Exchangefinder.find(Exchangefinder.kt:74)

at okhttp.internal.connection. RealCall.initExchangeSokhttp(RealCall.kt/255) ckhttp.internal.connection.Connestinterceptor. Intercept (ConnectInterceptor.kt:32)

at okhttp3.internal.http.RealinterceptorChain.proceed (Real InterceptorChain.it:189) okhttp3.internal.cache.CacheInterceptor. intercept (Cache Interceptor.kt:95)

at okhttp3.internal.nttp. RealinterceptorChain.proceed (RealInterceptorChain.kt:100)

at okhttp3.internal.http.BridgeInterceptor. Intercept(BridgeInterceptor.kt:83)

at okhttp.internal.http.RealinterceptorChain.proceed(RealInterceptorChain.kt:100) okhttp3.Internal.http.RetryAndFollowUpInterceptor, intercept(RetryAndFisllodipinterceptor.kt:76)

at okhttp3.internal.http.RealInterceptorChain.proceed (Real InterceptorChain.kt:1059)

okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.kt:109)

io.opentelemetry.exporter sender.okhttp.internal.BetryInterceptor. Intercept (RetryInterceptor.java:91)

okhttp3.internal.connection.RealCall.getResponsewithinterceptorChainsokhttp(RealCall.kt:201)

at ukhttp3.internal.connection.RealCall AsyncCall.run(RealCall.kt:517)

at java.base/java.util.concurrent.ThreadPoolExecutor.runiorker (ThreadPoolExecutor.java:1136) at java.base/jeve.util.concurrent.ThreadPoolExecutor Surker.run(ThreadPoolExecutor.java (635)

at jave.base/java.lang.Thread.run(Thread.

ad.java:40) Suppressed: Jave.net.ConnectException: Failed to connect to localhost/127.0.0.1:4117

21 more

Caused by:

java.net.ConnertException: Connection refused

at jave.base/sun.nio.ch.rt.g pollConnect (Native Method) at java.base/Sun.nio.ch.Net.pollConnection(het.java:672)

at java.hase/sun.nio.ch.laSocketImpl.timedPinishConnect(NiosocketImpl.java:547)

at java.lhase/sun.nio.ch. NiaSocketImpl.connect(NiosocketImpl.java:602) Jave.base/jave.cet. SocksSocketImpl.connect(Sockssoc (SocksSocketing. I-java:

at java.base/java.net.Socket.connect(Socket.java:633) at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)

327)

at okhttp).internal.connection RealConnection.connectSocket(RealConnection.ht:295)

20 more

Caused by: java.net.ConnectExceptioni Connection refused at

jave.hase/sun. sum.nio.ch.Net.pollConnect (Native Method)

at java.base/sum.nio.ch.Net.pollConnectNow(Net.java:672)

at java.hase/sum.nia.ch. NiosocketImpl.timedinishConnect (NloSocketImpl.java:547) at java.base/sum.i.ch. NiasocketImpl.connect(iSocketImpl.java:602)

at

java.hase/java.net.SocksSocketImpl connect(SockaSocketImpl.java:327) at java.hase/java.net.Socket.connect(Socket.java:633)

at http.internal.platform.platform.connectSocket(Platform,kt:128) at akhttp3, Internal.connection, RealConnection.connectSocket(RealConnection.kt:295)

Operating System

Ubuntu

Docker Selenium version (image tag)

4.25.0-20240922

Selenium Grid chart version (chart version)

None

Copy link

github-actions bot commented Oct 4, 2024

@e-dsouza, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@VietND96
Copy link
Member

VietND96 commented Oct 7, 2024

It is looking for a local Otel backend to push trace due to tracing is enabled by default.
To disable it, set SE_ENABLE_TRACING=false

@e-dsouza
Copy link
Author

e-dsouza commented Oct 7, 2024

@VietND96 Thank you for the response. I added SE_ENABLE_TRACING: 'false' to ConfigMap, it did remove the ERROR: Failed to export spans. The request could not be executed. Error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4117, from Chrome, Firefox and Edge nodes however it had no impact on hub container(image: selenium-hub:4.25.0-20240922), I still see the error in log.

@VietND96
Copy link
Member

VietND96 commented Oct 7, 2024

If you are adding to ConfigMap, ensure that all component containers should refer to that CM. Since every component will send its traces data separately.
If you are using Helm chart delivered in this repo, just to set tracing.enabled: false

@e-dsouza
Copy link
Author

e-dsouza commented Oct 7, 2024

okay, the hub yaml didnt have configMap configuration in it. Thank you.

@e-dsouza e-dsouza closed this as completed Oct 7, 2024
@Aniketvaidhya
Copy link

Hello @e-dsouza @VietND96

I am also facing similar issue. In my case I am getting this error:
11:56:51.331 ERROR [ThrottlingLogger.doLog] - Failed to export spans. The request could not be executed. Error message: Failed to connect to localhost/127.0.0.1:4317
java.net.ConnectException: Failed to connect to localhost/127.0.0.1:4317
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)

Since you have mention about the configMap, I guess you are using K8s for running the cluster. But in my case, I am using the ECS fargate which is using the Task Definition for defining the container configuration.

Can you please confirm where exactly in you Config Map you did the modifications. So, that I can update the same changes i n the Task Definition file that I am using!

@VietND96
Copy link
Member

Hi, if not using K8s, you can directly set env var SE_ENABLE_TRACING=false to all components (in docker compose or docker command).
If Task Definition has the concept to share common config across containers, then add a config for env var SE_ENABLE_TRACING to false

@Aniketvaidhya
Copy link

Hello @VietND96
I have added the environment variable SE_ENABLE_TRACING=false in my task definition for both the selenium hub and selenium firefox services.
This has resolved the issue for selenium firefox but I am still getting the same error for selenium hub container.
Thanks for help!

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants