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]: $CONFIG_FILE not working in standalone #2556

Open
girstenbrei opened this issue Jan 3, 2025 · 3 comments
Open

[🐛 Bug]: $CONFIG_FILE not working in standalone #2556

girstenbrei opened this issue Jan 3, 2025 · 3 comments

Comments

@girstenbrei
Copy link

What happened?

The implementation of Standalone/generate_config suggests that the config file location can be set via the $CONFIG_FILE environment variable, which is set in the container by default.

However, Standalone/start-selenium-standalone.sh seems to hard-code the config file in the main start command and when displaying it

This seems (according to the logs below) to lead to the standalone process starting, but no nodes being configured because their config is missing (it has been generated to the new location, but not read).

If this sounds reasonable, I can take a shot at providing a PR, basically copying the config variable check from generate_config. Or, let me know what I'm missing 😁

Thanks for all your hard work!
Christoph

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

docker run -e CONFIG_FILE=/var/run/selconf.toml -e SE_VNC_NO_PASSWORD=true -p 4444:4444 -p 7900:7900 selenium/standalone-chrome:131.0

Relevant log output

09:58:02.200 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
09:58:02.203 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
09:58:02.885 INFO [NodeOptions.getSessionFactories] - Detected 8 available processors
09:58:02.916 INFO [Node.<init>] - Binding additional locator mechanisms: relative
09:58:03.058 INFO [Standalone.execute] - Started Selenium Standalone 4.26.0 (revision 69f9e5e): http://172.25.0.2:4444
09:58:05.545 INFO [LocalDistributor$NewSessionRunnable.checkMatchingSlot] - No nodes support the capabilities in the request: [Capabilities {acceptInsecureCerts: true, browserName: chrome}]
09:58:05.578 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "87cd905022029654f6fca5b2dc051f48","eventTime": 1735898285572541508,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue","http.host": "localhost:4444","http.method": "POST","http.request_content_length": "176","http.scheme": "HTTP","http.status_code": 500,"http.target": "\u002fsession","http.user_agent": "thirtyfour\u002f0.35.0 (rust\u002funknown; linux)"}}

Operating System

Ubuntu 22.04.5 LTS

Docker Selenium version (image tag)

131.0

Selenium Grid chart version (chart version)

No response

@VietND96
Copy link
Member

VietND96 commented Jan 3, 2025

$CONFIG_FILE is an ENV variable defined in NodeBase. I think the idea is to share the same path from NodeBase to all Node variants.
Even we make $CONFIG_FILE changeable, we could not guard directory has right permission for writing.
@diemol, what do you think?

Copy link

github-actions bot commented Jan 3, 2025

@girstenbrei, 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 Jan 3, 2025

Anyhow, we will update the ENV var in other places to ensure it is consistent.

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