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]: Can only specify option --bind-host once #2448

Closed
edison12a opened this issue Oct 30, 2024 · 10 comments
Closed

[🐛 Bug]: Can only specify option --bind-host once #2448

edison12a opened this issue Oct 30, 2024 · 10 comments

Comments

@edison12a
Copy link

What happened?

Docker compose:

  selenium-hub:
    image: selenium/hub:4.25.0-20240922
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"
    environment:
      SE_GRID_MAX_SESSION: "15"
      SE_NODE_PORT: "5555"
      GRID_NEW_SESSION_WAIT_TIMEOUT: "30"
      SE_NODE_SESSION_TIMEOUT: "300"
      SE_GRID_SEASONING_REGISTERING_ATTEMPTS: "5"
      SE_GRID_SEASONING_REGISTERING_RETRY_INTERVAL: "5"
      SE_ENABLE_TRACING: "false"
      SE_OPTS: "--host selenium-hub --http-logs true --log-level FINEST --bind-host false "
    platform: linux/amd64  # Specify platform here

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

docker-compose up --force-recreate --remove-orphans --build

Relevant log output

[+] Running 2/2
 ✔ Network bfloat-selenium-pod_default  Created                                                                                                                                                                0.0s 
 ✔ Container selenium-hub               Created                                                                                                                                                                0.0s 
Attaching to selenium-hub
selenium-hub  | 2024-10-30 18:41:12,887 INFO Included extra file "/etc/supervisor/conf.d/selenium-grid-hub.conf" during parsing
selenium-hub  | 2024-10-30 18:41:12,890 INFO RPC interface 'supervisor' initialized
selenium-hub  | 2024-10-30 18:41:12,890 INFO supervisord started with pid 8
selenium-hub  | 2024-10-30 18:41:13,910 INFO spawned: 'selenium-grid-hub' with pid 9
selenium-hub  | Starting Selenium Grid Hub...
selenium-hub  | 2024-10-30 18:41:13,988 INFO success: selenium-grid-hub entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
selenium-hub  | Appending Selenium options: --host selenium-hub --http-logs true --log-level FINEST --bind-host false 
selenium-hub  | Selenium option: --log-level already set in env variable SE_OPTS. Ignore new option: --log-level INFO
selenium-hub  | Selenium option: --http-logs already set in env variable SE_OPTS. Ignore new option: --http-logs false
selenium-hub  | Appending Selenium option: --structured-logs false
selenium-hub  | Appending Selenium option: --reject-unsupported-caps false
selenium-hub  | Appending Selenium option: --tracing false
selenium-hub  | Tracing is disabled
selenium-hub  | Can only specify option --bind-host once.
selenium-hub  | Usage: hub [options]
selenium-hub  |   Options:
selenium-hub  |     --allow-cors
selenium-hub  |       Whether the Selenium server should allow web browser connections from 
selenium-hub  |       any host
selenium-hub  |       Default: false
selenium-hub  |     --bind-bus

selenium-hub  | 2024-10-30 18:41:14,702 INFO exited: selenium-grid-hub (exit status 0; expected)

Operating System

MacOS and Ubuntu

Docker Selenium version (image tag)

hub:4.25.0-20240922

Selenium Grid chart version (chart version)

No response

Copy link

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

@edison12a edison12a changed the title [🐛 Bug]: bind-hos arg not allowed to be modified! [🐛 Bug]: Can only specify option --bind-host once Oct 30, 2024
@VietND96
Copy link
Member

Hi, env var SE_BIND_HOST is represent for --bind-host

@edison12a
Copy link
Author

@VietND96
Thanks for sharing that but it does not solve the error.

The error implies that I have specified "SE_BIND_HOST" before but as you can see, its not part of my env variables.

@VietND96
Copy link
Member

--bind-host ${SE_BIND_HOST} \

Due to --binding-host explicitly set in command to start Hub, so the script checking with SE_OPTS could not detect it, that is reason CLI options raise error.

@edison12a
Copy link
Author

Thanks @VietND96.

Could we make it so that if the user redefines a variable it will overwrite any defaults that the system is trying to set?

The current error message seems to imply that the user is specifying the variable more than one time.

@VietND96
Copy link
Member

VietND96 commented Nov 1, 2024

I just added a change #2451. Will deploy a preview image for your fast trial and feedback
Regarding issue #2447, I am still checking. It seems someone assigns the arbitrary address. However, internal components could not communicate with each other by using that host, the inside container could not reach the DNS

@edison12a
Copy link
Author

Thanks for your attention to this issue @VietND96 . I look forward to testing the preview image.

@VietND96
Copy link
Member

VietND96 commented Nov 1, 2024

It is available, update image tag to nightly, you can get it (e.g selenium/hub:nightly). It is the same for nodes images.

@VietND96
Copy link
Member

VietND96 commented Nov 5, 2024

This is fixed in #2451

@VietND96 VietND96 closed this as completed Nov 5, 2024
Copy link

github-actions bot commented Dec 6, 2024

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

No branches or pull requests

2 participants