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]: Cannot connect Nodes to Selenium Hub using Https protocol; #14447

Closed
alex270795 opened this issue Aug 28, 2024 · 3 comments
Closed
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.

Comments

@alex270795
Copy link

What happened?

Hi!
I'm trying to configure Selenium Hub and Nodes using Https protocols.
When Node is trying to connect to Hub , he is in state : INFO [NodeServer$1.lambda$start$1] - Sending registration event...
I want to mention, what configuring using only HTTP protocol for both services are working for me.
Please see below my docker-compose.yml file and logs output.

BR,
Alexandru.

How can we reproduce the issue?

services:
  selenium-hub:
    image: selenium/hub:latest
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"  # HTTP 
      - "4445:4445"  # HTTPS 
    networks:
      - selenium-grid
    environment:
      - SE_OPTS=--port 4445 --https-private-key /opt/selenium/private/selenium-hub.key --https-certificate /opt/selenium/certs/selenium-hub.crt 
    volumes:
      - ./certs/selenium-hub.key:/opt/selenium/private/selenium-hub.key:ro
      - ./certs/selenium-hub.crt:/opt/selenium/certs/selenium-hub.crt:ro
     
    
  chrome-node-1:
    image: selenium/node-chrome:latest
    shm_size: '2gb'
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_NODE_GRID_URL=https://selenium-hub:4445/wd/hub 
      - SE_OPTS=--port 5555 --https-private-key /opt/selenium/private/node1.key --https-certificate /opt/selenium/certs/node1.crt --log-level all
      
    volumes:
      - ./certs/node1.key:/opt/selenium/private/node1.key:ro
      - ./certs/node1.crt:/opt/selenium/certs/node1.crt:ro
            
    depends_on:
      - selenium-hub
    networks:
      - selenium-grid
    expose:
      - "5555"

Relevant log output

logs for hub:
2024-08-28 11:44:32 08:44:32.651 INFO [Node.<init>] - Binding additional locator mechanisms: relative
2024-08-28 11:44:35 08:44:35.650 WARN [ThrottlingLogger.doLog] - Failed to export spans. Server responded with gRPC status code 2. Error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317
2024-08-28 11:45:02 08:45:02.652 INFO [Node.<init>] - Binding additional locator mechanisms: relative
2024-08-28 11:45:05 08:45:05.659 WARN [ThrottlingLogger.doLog] - Failed to export spans. Server responded with gRPC status code 2. Error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317
2024-08-28 11:45:32 08:45:32.650 INFO [Node.<init>] - Binding additional locator mechanisms: relative
2024-08-28 11:45:35 08:45:35.669 WARN [ThrottlingLogger.doLog] - Failed to export spans. Server responded with gRPC status code 2. Error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317
2024-08-28 11:46:02 08:46:02.649 INFO [Node.<init>] - Binding additional locator mechanisms: relative
2024-08-28 11:46:05 08:46:05.678 WARN [ThrottlingLogger.doLog] - Failed to export spans. Server responded with gRPC status code 2. Error message: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:4317


logs for node:
2024-08-28 11:43:53 08:43:53.787 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
2024-08-28 11:43:53 08:43:53.799 DEBUG [LoggingHandler.channelRead] - [id: 0x1e0b5f4a, L:/[0:0:0:0:0:0:0:0]:5555] READ: [id: 0x5bb018f4, L:/172.19.0.3:5555 - R:/172.19.0.2:54064]
2024-08-28 11:43:53 08:43:53.800 DEBUG [LoggingHandler.channelReadComplete] - [id: 0x1e0b5f4a, L:/[0:0:0:0:0:0:0:0]:5555] READ COMPLETE
2024-08-28 11:43:53 08:43:53.831 DEBUG [RequestConverter.channelInactive] - Channel became inactive.
2024-08-28 11:44:02 08:44:02.659 DEBUG [LoggingHandler.channelRead] - [id: 0x1e0b5f4a, L:/[0:0:0:0:0:0:0:0]:5555] READ: [id: 0xd01033ac, L:/172.19.0.3:5555 - R:/172.19.0.2:42360]
2024-08-28 11:44:02 08:44:02.660 DEBUG [LoggingHandler.channelReadComplete] - [id: 0x1e0b5f4a, L:/[0:0:0:0:0:0:0:0]:5555] READ COMPLETE
2024-08-28 11:44:02 08:44:02.690 DEBUG [RequestConverter.channelInactive] - Channel became inactive.

Operating System

Docker

Selenium version

What are the browser(s) and version(s) where you see this issue?

latest

What are the browser driver(s) and version(s) where you see this issue?

latest

Are you using Selenium Grid?

4.23.1

Copy link

@alex270795, 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!

@diemol
Copy link
Member

diemol commented Aug 28, 2024

Check https://github.com/SeleniumHQ/docker-selenium?tab=readme-ov-file#secure-connection. If you still have issues, please create an issue in the docker-selenium repository.

@diemol diemol added I-question Applied to questions. Issues should be closed and send the user to community resources. and removed I-defect needs-triaging labels Aug 28, 2024
Copy link

💬 Please ask questions at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.
Projects
None yet
Development

No branches or pull requests

2 participants