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]: selenium/hub, selenium/node-chrome and selenium/node-firefox latest are throwing #2432

Closed
ChrstnAnsl opened this issue Oct 17, 2024 · 6 comments · Fixed by #2541

Comments

@ChrstnAnsl
Copy link

ChrstnAnsl commented Oct 17, 2024

What happened?

When running my docker instance docker-compose -f docker-compose-grid.yml up -d I noticed that the selenium hub is throwing a java error and both node-firefox and node-chrome are being exited

services:
  hub:
    image: selenium/hub:latest
    container_name: hub
    ports:
      - "4444:4444"

  chrome:
    image: selenium/node-chrome:latest
    volumes:
      - /src/app.config:/app/src/app.config
      - /src/appsettings.json:/src/app/appsettings.json
      - /src/TestApplication:/app/src/TestApplication
      - /src/run-test.ps1:/app/src/run-test.ps1
      - /src/run-test-docker.ps1:/app/src/run-test-docker.ps1
    depends_on:
      - hub
    environment:
      - HUB_HOST=hub
      - HUB_PORT=4444
      - NODE_MAX_INSTANCES=3
      - NODE_MAX_SESSION=3

  firefox:
    image: selenium/node-firefox:latest
    volumes:
      - /src/app.config:/app/src/app.config
      - /src/appsettings.json:/src/app/appsettings.json
      - /src/TestApplication:/app/src/TestApplication
      - /src/run-test.ps1:/app/src/run-test.ps1
      - /src/run-test-docker.ps1:/app/src/run-test-docker.ps1
    depends_on:
      - hub
    environment:
      - HUB_HOST=hub
      - HUB_PORT=4444
      - NODE_MAX_INSTANCES=3
      - NODE_MAX_SESSION=3

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

docker-compose -f docker-compose-grid.yml up -d

Relevant log output

firefox-1 exited with code 0
hub-1      | 05:10:26.858 INFO [UnboundZmqEventBus.<init>] - Event bus ready
hub-1      | 05:10:30.873 INFO [Hub.execute] - Started Selenium Hub 4.25.0 (revision 030fcf7918): http://172.19.0.2:4444
hub-1      | 05:11:30.537 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]:4317
hub-1      | java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317
hub-1      |    at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297)                                                                          
hub-1      |    at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
hub-1      |    at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)                                                                         
hub-1      |    at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)                                                                  
hub-1      |    at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)                                                                                    
hub-1      |    at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
hub-1      |    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)                                                                       
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)                                                                          
hub-1      |    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)                                                                          
hub-1      |    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)                                                                               
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
hub-1      |    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)                                                           
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)                                                                          
hub-1      |    at io.opentelemetry.exporter.sender.okhttp.internal.RetryInterceptor.intercept(RetryInterceptor.java:91)
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)                                                                          
hub-1      |    at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)                                                             
hub-1      |    at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)                                                                                      
hub-1      |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
hub-1      |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)                                                                
hub-1      |    at java.base/java.lang.Thread.run(Thread.java:840)                                                                                                          
hub-1      |    Suppressed: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:4317
hub-1      |            ... 21 more                                                                                                                                         
hub-1      |    Caused by: java.net.ConnectException: Connection refused                                                                                                    
hub-1      |            at java.base/sun.nio.ch.Net.pollConnect(Native Method)
hub-1      |            at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)                                                                                            
hub-1      |            at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:547)                                                                    
hub-1      |            at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602)                                                                               
hub-1      |            at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
hub-1      |            at java.base/java.net.Socket.connect(Socket.java:633)                                                                                               
hub-1      |            at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)                                                                                
hub-1      |            at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)                                                                  
hub-1      |            ... 20 more
hub-1      | Caused by: java.net.ConnectException: Connection refused                                                                                                       
hub-1      |    at java.base/sun.nio.ch.Net.pollConnect(Native Method)                                                                                                      
hub-1      |    at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)                                                                                                    
hub-1      |    at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:547)
hub-1      |    at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602)                                                                                       
hub-1      |    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)                                                                                     
hub-1      |    at java.base/java.net.Socket.connect(Socket.java:633)                                                                                                       
hub-1      |    at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
hub-1      |    at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)                                                                          
hub-1      |    ... 20 more                                                                                                                                                 
hub-1      | 05:11:39.055 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]:4317
hub-1      | java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317
hub-1      |    at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297)                                                                          
hub-1      |    at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)                                                                                
hub-1      |    at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)                                                                         
hub-1      |    at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)                                                                  
hub-1      |    at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)                                                                                    
hub-1      |    at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
hub-1      |    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)                                                                       
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)                                                                          
hub-1      |    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)                                                                                
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)                                                                          
hub-1      |    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)                                                                          
hub-1      |    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)                                                           
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)                                                                          
hub-1      |    at io.opentelemetry.exporter.sender.okhttp.internal.RetryInterceptor.intercept(RetryInterceptor.java:91)                                                    
hub-1      |    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
hub-1      |    at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)                                                             
hub-1      |    at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517)                                                                                      
hub-1      |    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)                                                                
hub-1      |    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)                                                                
hub-1      |    at java.base/java.lang.Thread.run(Thread.java:840)
hub-1      |    Suppressed: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:4317                                                                        
hub-1      |            ... 21 more                                                                                                                                         
hub-1      |    Caused by: java.net.ConnectException: Connection refused                                                                                                    
hub-1      |            at java.base/sun.nio.ch.Net.pollConnect(Native Method)                                                                                              
hub-1      |            at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
hub-1      |            at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:547)                                                                    
hub-1      |            at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602)                                                                               
hub-1      |            at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)                                                                             
hub-1      |            at java.base/java.net.Socket.connect(Socket.java:633)                                                                                               
hub-1      |            at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128)
hub-1      |            at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)                                                                  
hub-1      |            ... 20 more                                                                                                                                         
hub-1      | Caused by: java.net.ConnectException: Connection refused                                                                                                       
hub-1      |    at java.ba

Operating System

Windows 11

Docker Selenium version (image tag)

latest

Selenium Grid chart version (chart version)

No response

Copy link

@ChrstnAnsl, 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 17, 2024

Set env var SE_ENABLE_TRACING=false to each component
Details noted in README: https://github.com/SeleniumHQ/docker-selenium?tab=readme-ov-file#tracing-in-grid

@ChrstnAnsl
Copy link
Author

It solves the error in hub but not in node-chrome and node-firefox

chrome

2024-10-17 16:35:11 2024-10-17 08:35:11,249 INFO Included extra file "/etc/supervisor/conf.d/chrome-cleanup.conf" during parsing
2024-10-17 16:35:11 2024-10-17 08:35:11,250 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2024-10-17 16:35:11 2024-10-17 08:35:11,257 INFO RPC interface 'supervisor' initialized
2024-10-17 16:35:11 2024-10-17 08:35:11,258 INFO supervisord started with pid 8
2024-10-17 16:35:12 2024-10-17 08:35:12,273 INFO spawned: 'xvfb' with pid 9
2024-10-17 16:35:12 2024-10-17 08:35:12,275 INFO spawned: 'vnc' with pid 10
2024-10-17 16:35:12 2024-10-17 08:35:12,276 INFO spawned: 'novnc' with pid 11
2024-10-17 16:35:12 2024-10-17 08:35:12,277 INFO spawned: 'selenium-node' with pid 12
2024-10-17 16:35:12 2024-10-17 08:35:12,282 INFO success: selenium-node entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-10-17 16:35:12 SE_EVENT_BUS_HOST not set, exiting!
2024-10-17 16:35:12 2024-10-17 08:35:12,716 WARN exited: selenium-node (exit status 1; not expected)
2024-10-17 16:35:12 2024-10-17 08:35:12,716 WARN received SIGINT indicating exit request
2024-10-17 16:35:12 2024-10-17 08:35:12,716 INFO waiting for xvfb, vnc, novnc to die
2024-10-17 16:35:12 2024-10-17 08:35:12,880 WARN stopped: novnc (terminated by SIGTERM)
2024-10-17 16:35:12 2024-10-17 08:35:12,881 WARN stopped: vnc (terminated by SIGTERM)
2024-10-17 16:35:12 2024-10-17 08:35:12,911 WARN stopped: xvfb (terminated by SIGTERM)

firefox

2024-10-17 16:35:11 2024-10-17 08:35:11,249 INFO Included extra file "/etc/supervisor/conf.d/firefox-cleanup.conf" during parsing
2024-10-17 16:35:11 2024-10-17 08:35:11,249 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2024-10-17 16:35:11 2024-10-17 08:35:11,257 INFO RPC interface 'supervisor' initialized
2024-10-17 16:35:11 2024-10-17 08:35:11,258 INFO supervisord started with pid 8
2024-10-17 16:35:12 2024-10-17 08:35:12,274 INFO spawned: 'xvfb' with pid 9
2024-10-17 16:35:12 2024-10-17 08:35:12,275 INFO spawned: 'vnc' with pid 10
2024-10-17 16:35:12 2024-10-17 08:35:12,276 INFO spawned: 'novnc' with pid 11
2024-10-17 16:35:12 2024-10-17 08:35:12,278 INFO spawned: 'selenium-node' with pid 12
2024-10-17 16:35:12 2024-10-17 08:35:12,283 INFO success: selenium-node entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-10-17 16:35:12 SE_EVENT_BUS_HOST not set, exiting!
2024-10-17 16:35:12 2024-10-17 08:35:12,716 WARN exited: selenium-node (exit status 1; not expected)
2024-10-17 16:35:12 2024-10-17 08:35:12,716 WARN received SIGINT indicating exit request
2024-10-17 16:35:12 2024-10-17 08:35:12,716 INFO waiting for xvfb, vnc, novnc to die
2024-10-17 16:35:12 2024-10-17 08:35:12,880 WARN stopped: novnc (terminated by SIGTERM)
2024-10-17 16:35:12 2024-10-17 08:35:12,881 WARN stopped: vnc (terminated by SIGTERM)
2024-10-17 16:35:12 2024-10-17 08:35:12,911 WARN stopped: xvfb (terminated by SIGTERM)

@VietND96
Copy link
Member

VietND96 commented Oct 17, 2024

2024-10-17 16:35:12 SE_EVENT_BUS_HOST not set, exiting!

The message was very clear on what you are missing. For all configs needed, you can check README. The first view can see the env vars name issue.

@ChrstnAnsl
Copy link
Author

I was able to solved it now. I did a little tweaks on my dockerfile also. Thanks @VietND96.

Closing this now.

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 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants