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]: Grid status response does not have "se:containerName" set #2506

Open
MJB222398 opened this issue Dec 12, 2024 · 5 comments
Open

Comments

@MJB222398
Copy link

What happened?

I have a Docker Selenium Grid running with a Hub and several nodes. In order to implement a particular feature I need to be able to get the Docker container name (of the node container) from the web driver SessionId. I found that I can make GET request to http://localhost:4444/status to get information on the Grid status. In the response to this request I have:

"slots": [
          {
            "id": {
              "hostId": "86d384d2-2951-4da2-89dd-c3007c6bfe94",
              "id": "23c6d9c6-0536-47df-bf56-9c7dcf25bf08"
            },
            "lastStarted": "2024-12-12T13:26:25.102549259Z",
            "session": null,
            "stereotype": {
              "browserName": "chrome",
              "browserVersion": "127.0",
              "goog:chromeOptions": {
                "binary": "/usr/bin/google-chrome"
              },
              "platformName": "linux",
              "se:containerName": "",
              "se:noVncPort": 7900,
              "se:vncEnabled": true
            }
          }
        ]

So the se:containerName property is not set. I am assuming this is supposed to be the Docker container name that I need.

If I do a docker ps -a I get:

CONTAINER ID   IMAGE                                   COMMAND                  CREATED         STATUS         PORTS                                                           NAMES
b8a55fa5232c   selenium/node-firefox:4.23.0-20240727   "/opt/bin/entry_poin…"   5 minutes ago   Up 5 minutes   0.0.0.0:6902->5900/tcp, [::]:6902->5900/tcp                     firefox-node
0d16e1fdb15b   selenium/video:ffmpeg-7.0.1-20240727    "/opt/bin/entry_poin…"   5 minutes ago   Up 5 minutes   9000/tcp                                                        firefox-video
175f494755d3   selenium/video:ffmpeg-7.0.1-20240727    "/opt/bin/entry_poin…"   5 minutes ago   Up 5 minutes   9000/tcp                                                        edge-video
8d66fe19e894   selenium/node-edge:4.23.0-20240727      "/opt/bin/entry_poin…"   5 minutes ago   Up 5 minutes   0.0.0.0:6901->5900/tcp, [::]:6901->5900/tcp                     edge-node
9bddaf86ce65   selenium/video:ffmpeg-7.0.1-20240727    "/opt/bin/entry_poin…"   5 minutes ago   Up 5 minutes   9000/tcp                                                        chrome-video
577d72f0c4ad   selenium/node-chrome:4.23.0-20240727    "/opt/bin/entry_poin…"   5 minutes ago   Up 5 minutes   0.0.0.0:6900->5900/tcp, [::]:6900->5900/tcp                     chrome-node
677aa69f3f9b   selenium/hub:4.23.0-20240727            "/opt/bin/entry_poin…"   5 minutes ago   Up 5 minutes   0.0.0.0:4442-4444->4442-4444/tcp, :::4442-4444->4442-4444/tcp   selenium-hub

So the container name should be 'chrome-node' as you can see.

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

N/A

Relevant log output

N/A

Operating System

Ubuntu 20.04

Docker Selenium version (image tag)

4.23.0-20240727

Selenium Grid chart version (chart version)

No response

Copy link

@MJB222398, 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

I think you have to upgrade to at least version 4.24+ to have the fix in Grid server - SeleniumHQ/selenium#14323

@MJB222398
Copy link
Author

Argh thanks, I will have to upgrade it seems

@MJB222398 MJB222398 reopened this Dec 17, 2024
@MJB222398
Copy link
Author

@VietND96 OK I upgraded to 4.27 and the issue is still there, appears not to be fixed

@VietND96
Copy link
Member

I will use this ticket to update README and clarify its usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants