Skip to content

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

@girstenbrei

Description

@girstenbrei

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions