Closed elnath78 closed 7 months ago
@elnath78, thank you for creating this issue. We will troubleshoot it as soon as we can.
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!
I am not able to reproduce this on Ubuntu. Can you try it on a different machine or https://gitpod.io/?
@diemol
I am not able to reproduce this on Ubuntu. Can you try it on a different machine or https://gitpod.io/?
Hi Diego, is it possible it is due to DO droplet?
On my DO droplet I see Docker version 26.0.0, build 2ae903e
while on Gitpod Docker version 25.0.3, build 4debf41
I don't know, I haven't tried that.
SE_OPTS
is used to pass options to Selenium (list support options, so -SE_OPTS=-headless
is incorrect
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
Can you try to use docker compose
v2+ also?
@VietND96
-SE_OPTS=-headless
is incorrect
Why it is being ignored in Gitpod but would cause a problem with DO droplet?
Can you try to use
docker compose
v2+ also?
I'm not sure what you mean, I have set Version '3'
in the yml file.
Have you reached out to DO support? They might have better answers.
@diemol
Have you reached out to DO support? They might have better answers.
I opened a ticket in April 6th they are just ignoring it at this point.
Also it puzzle me why it is using version 1.29.2
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
docker --version
Docker version 26.0.0, build 2ae903e
docker compose version
Docker Compose version v2.25.0
I think I found but no idea what is going on:
docker-compose --version
docker-compose version 1.29.2, build unknown
alias docker-compose
-bash: alias: docker-compose: not found
type docker-compose
docker-compose is hashed (/usr/bin/docker-compose)
which docker-compose
/usr/bin/docker-compose
which docker
/usr/bin/docker
Also:
/usr/bin/docker-compose version
docker-compose version 1.29.2, build unknown
docker-py version: 5.0.3
CPython version: 3.11.6
OpenSSL version: OpenSSL 3.0.10 1 Aug 2023
How about if you bring setup by docker compose up -d
instead of docker-compose up -d
?
@VietND96
How about if you bring setup by
docker compose up -d
instead ofdocker-compose up -d
?
I removed docker-compose
and installed again:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Rebooted (it was not finding docker-compose in PATH although it was there) then:
cd /opt/selenium
docker-compose up -d
WARN[0000] /opt/selenium/docker-compose.yml: `version` is obsolete
[+] Running 1/2
⠦ Container 11c067d4dcb9_selenium_selenium_1 Recreated 0.6s
✔ Container selenium-selenium-1 Started
I'm not sure of the warning but it started at least, the yml is the same file with Version '3'
cat docker-compose.yml
---
version: "3"
services:
selenium:
image: selenium/standalone-chrome:4.18.1-20240224
ports:
- 4444:4444
- 7900:7900
shm_size: 2g
environment:
- SE_OPTS=-headless
- JAVA_OPTS=-Dwebdriver.chrome.args=--headless -Dwebdriver.chrome.silentOutput=true
Now it is starting then closes, doesn't remain active on port 4444 awaiting for requests:
docker-compose up
[+] Running 1/0
✔ Container selenium-selenium-1 Created 0.0s
Attaching to selenium-1
selenium-1 | 2024-04-11 12:34:34,506 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
selenium-1 | 2024-04-11 12:34:34,518 INFO RPC interface 'supervisor' initialized
selenium-1 | 2024-04-11 12:34:34,519 CRIT Server 'unix_http_server' running without any HTTP authentication checking
selenium-1 | 2024-04-11 12:34:34,520 INFO supervisord started with pid 7
selenium-1 | 2024-04-11 12:34:35,525 INFO spawned: 'xvfb' with pid 8
selenium-1 | 2024-04-11 12:34:35,530 INFO spawned: 'vnc' with pid 9
selenium-1 | 2024-04-11 12:34:35,544 INFO spawned: 'novnc' with pid 10
selenium-1 | 2024-04-11 12:34:35,573 INFO spawned: 'selenium-standalone' with pid 11
selenium-1 | 2024-04-11 12:34:35,596 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
selenium-1 | 2024-04-11 12:34:35,597 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
selenium-1 | 2024-04-11 12:34:35,598 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
selenium-1 | 2024-04-11 12:34:35,598 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
selenium-1 | Appending Selenium options: -headless
selenium-1 | Appending Selenium options: --heartbeat-period 30
selenium-1 | Appending Selenium options: --reject-unsupported-caps false
selenium-1 | Setting up SE_NODE_GRID_URL...
selenium-1 | Selenium Grid Standalone configuration:
selenium-1 | [network]
selenium-1 | relax-checks = true
selenium-1 |
selenium-1 | [node]
selenium-1 | session-timeout = "300"
selenium-1 | override-max-sessions = false
selenium-1 | detect-drivers = false
selenium-1 | drain-after-session-count = 0
selenium-1 | max-sessions = 1
selenium-1 |
selenium-1 | [[node.driver-configuration]]
selenium-1 | display-name = "chrome"
selenium-1 | stereotype = '{"browserName": "chrome", "browserVersion": "122.0", "platformName": "Linux", "goog:chromeOptions": {"binary": "/usr/bin/google-chrome"}}'
selenium-1 | max-sessions = 1
selenium-1 |
selenium-1 | Starting Selenium Grid Standalone...
selenium-1 | Tracing is disabled
selenium-1 | Was passed main parameter '-headless' but no main parameter was defined in your arg class
selenium-1 | Usage: standalone [options]
selenium-1 | Options:
selenium-1 | --allow-cors
selenium-1 | Whether the Selenium server should allow web browser connections from
selenium-1 | any host
selenium-1 | Default: false
selenium-1 | --bind-host
selenium-1 | Whether the server should bind to the host address/name, or only use it
selenium-1 | to report its reachable url. Helpful in complex network topologies where
selenium-1 | the server cannot report itself with the current IP/hostname but rather
selenium-1 | an external IP or hostname (e.g. inside a Docker container).
selenium-1 | Default: true
selenium-1 | --config
selenium-1 | Config file to read from (may be specified more than once)
selenium-1 | --config-help
selenium-1 | Output detailed information about config options
selenium-1 | Default: false
selenium-1 | --detect-drivers
selenium-1 | Autodetect which drivers are available on the current system, and add
selenium-1 | them to the Node.
selenium-1 | Default: true
selenium-1 | --disable-ui
selenium-1 | Disable the Grid UI
selenium-1 | Default: false
selenium-1 | -d, --distributor
selenium-1 | Url of the distributor.
selenium-1 | --distributor-host
selenium-1 | Host on which the distributor is listening.
selenium-1 | --distributor-implementation
selenium-1 | Full classname of non-default distributor implementation
selenium-1 | Default: org.openqa.selenium.grid.distributor.local.LocalDistributor
selenium-1 | --distributor-port
selenium-1 | Port on which the distributor is listening.
selenium-1 | --docker, -D
selenium-1 | Docker configs which map image name to stereotype capabilities (example:
selenium-1 | -D selenium/standalone-firefox:latest '{"browserName": "firefox"}')
selenium-1 | --docker-assets-path
selenium-1 | Absolute path where assets will be stored
selenium-1 | --docker-devices
selenium-1 | Exposes devices to a container. Each device mapping declaration must
selenium-1 | have at least the path of the device in both host and container
selenium-1 | separated by a colon like in this example:
selenium-1 | /device/path/in/host:/device/path/in/container
selenium-1 | --docker-host
selenium-1 | Host name where the docker daemon is running
selenium-1 | --docker-port
selenium-1 | Port where the docker daemon is running
selenium-1 | --docker-url
selenium-1 | URL for connecting to the docker daemon
selenium-1 | --docker-video-image
selenium-1 | Docker image to be used when video recording is enabled
selenium-1 | Default: selenium/video:latest
selenium-1 | --drain-after-session-count
selenium-1 | Drain and shutdown the Node after X sessions have been executed. Useful
selenium-1 | for environments like Kubernetes. A value higher than zero enables this
selenium-1 | feature.
selenium-1 | Default: 0
selenium-1 | --driver-configuration
selenium-1 | List of configured drivers a Node supports. It is recommended to provide
selenium-1 | this type of configuration through a toml config file to improve
selenium-1 | readability. Command line example: --driver-configuration
selenium-1 | display-name="Firefox Nightly" max-sessions=2
selenium-1 | webdriver-path="/usr/local/bin/geckodriver"
selenium-1 | stereotype="{\"browserName\": \"firefox\", \"browserVersion\": \"86\",
selenium-1 | \"moz:firefoxOptions\": {\"binary":"/Applications/Firefox
selenium-1 | Nightly.app/Contents/MacOS/firefox\"}}"
selenium-1 | --driver-factory
selenium-1 | Mapping of fully qualified class name to a browser configuration that
selenium-1 | this matches against. --driver-factory
selenium-1 | org.openqa.selenium.example.LynxDriverFactory '{"browserName": "lynx"}'
selenium-1 | -I, --driver-implementation
selenium-1 | Drivers that should be checked. If specified, will skip
selenium-1 | autoconfiguration. Example: -I "firefox" -I "chrome"
selenium-1 | Default: []
selenium-1 | --enable-bidi
selenium-1 | Enable BiDi proxying in Grid. A Grid admin can disable BiDi if the
selenium-1 | network does not allow websockets. True by default
selenium-1 | Default: true
selenium-1 | --enable-cdp
selenium-1 | Enable CDP proxying in Grid. A Grid admin can disable CDP if the network
selenium-1 | does not allow websockets. True by default
selenium-1 | Default: true
selenium-1 | --enable-managed-downloads
selenium-1 | When enabled, the Grid node will automatically do the following: 1.
selenium-1 | Creates a temporary directory which will now represent the directory
selenium-1 | into which files downloaded by Chrome/Firefox/Edge browser will be
selenium-1 | under. 2. For every new session, a sub-directory will be created/deleted
selenium-1 | so that all files that were downloaded for a given session are stored
selenium-1 | in.
selenium-1 | --external-url
selenium-1 | External URL where component is generally available. Useful on complex
selenium-1 | network topologies when components are on different networks and proxy
selenium-1 | servers are involved.
selenium-1 | --grid-url
selenium-1 | Public URL of the Grid as a whole (typically the address of the Hub or
selenium-1 | the Router)
selenium-1 | --healthcheck-interval
selenium-1 | How often, in seconds, will the health check run for all Nodes.This
selenium-1 | ensures the server can ping all the Nodes successfully.
selenium-1 | Default: 120
selenium-1 | --heartbeat-period
selenium-1 | How often, in seconds, will the Node send heartbeat events to the
selenium-1 | Distributor to inform it that the Node is up.
selenium-1 | Default: 60
selenium-1 | --host
selenium-1 | Server IP or hostname: usually determined automatically.
selenium-1 | --http-logs
selenium-1 | Enable http logging. Tracing should be enabled to log http logs.
selenium-1 | Default: false
selenium-1 | --https-certificate
selenium-1 | Server certificate for https. Get more detailed information by running
selenium-1 | "java -jar selenium-server.jar info security"
selenium-1 | --https-private-key
selenium-1 | Private key for https. Get more detailed information by running "java
selenium-1 | -jar selenium-server.jar info security"
selenium-1 | --hub
selenium-1 | The address of the Hub in a Hub-and-Node configuration. This can be a
selenium-1 | plain hostname or IP address (`hostname`), in which case the Hub will be
selenium-1 | assumed to be `http://hostname:4444`, the `--grid-url` will be the same,
selenium-1 | `--publish-events` will be `tcp://hostname:4442` and
selenium-1 | `--subscribe-events` will be `tcp://hostname:4443`. If `hostname`
selenium-1 | contains a port number, that will be used for `--grid-url` but the URIs
selenium-1 | for the event bus will remain the same. Any of these default values may
selenium-1 | be overridden but setting the correct flags. If the hostname has a
selenium-1 | protocol (such as `https`) that will be used too.
selenium-1 | --log
selenium-1 | File to write out logs. Ensure the file path is compatible with the
selenium-1 | operating system's file path. Windows path example:
selenium-1 | \\path\to\file\gridlog.log OR C:\path\path\to\file\gridlog.log
selenium-1 | Linux/Unix/MacOS path example: /path/to/file/gridlog.log
selenium-1 | --log-encoding
selenium-1 | Log encoding
selenium-1 | --log-level
selenium-1 | Log level. Default logging level is INFO. Log levels are described here
selenium-1 | https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html
selenium-1 | Default: INFO
selenium-1 | --log-timestamp-format
selenium-1 | Format of the timestamp in log output
selenium-1 | --max-sessions
selenium-1 | Maximum number of concurrent sessions. Default value is the number of
selenium-1 | available processors.
selenium-1 | Default: 1
selenium-1 | --max-threads
selenium-1 | Maximum number of listener threads. Default value is: (available
selenium-1 | processors) * 3.
selenium-1 | Default: 0
selenium-1 | --newsession-threadpool-size
selenium-1 | The Distributor uses a fixed-sized thread pool to create new sessions as
selenium-1 | it consumes new session requests from the queue.This allows configuring
selenium-1 | the size of the thread pool. The default value is no. of available
selenium-1 | processors * 3. Note: If the no. of threads is way greater than the
selenium-1 | available processors it will not always increase the performance. A high
selenium-1 | number of threads causes more context switching which is an expensive
selenium-1 | operation.
selenium-1 | Default: 3
selenium-1 | --no-vnc-port
selenium-1 | If VNC is available, sets the port where the local noVNC stream can be
selenium-1 | obtained
selenium-1 | Default: 7900
selenium-1 | --node-implementation
selenium-1 | Full classname of non-default Node implementation. This is used to
selenium-1 | manage a session's lifecycle.
selenium-1 | Default: org.openqa.selenium.grid.node.local.LocalNodeFactory
selenium-1 | --override-max-sessions
selenium-1 | The # of available processors is the recommended max sessions value (1
selenium-1 | browser session per processor). Setting this flag to true allows the
selenium-1 | recommended max value to be overwritten. Session stability and
selenium-1 | reliability might suffer as the host could run out of resources.
selenium-1 | Default: false
selenium-1 | --password
selenium-1 | Password clients must use to connect to the server. Both this and the
selenium-1 | username need to be set in order to be used.
selenium-1 | --plain-logs
selenium-1 | Use plain log lines
selenium-1 | Default: true
selenium-1 | -p, --port
selenium-1 | Port to listen on. There is no default as this parameter is used by
selenium-1 | different components, for example Router/Hub/Standalone will use 4444
selenium-1 | and Node will use 5555.
selenium-1 | --register-cycle
selenium-1 | How often, in seconds, the Node will try to register itself for the
selenium-1 | first time to the Distributor.
selenium-1 | Default: 10
selenium-1 | --register-period
selenium-1 | How long, in seconds, will the Node try to register to the Distributor
selenium-1 | for the first time. After this period is completed, the Node will not
selenium-1 | attempt to register again.
selenium-1 | Default: 120
selenium-1 | --registration-secret
selenium-1 | Node registration secret
selenium-1 | --reject-unsupported-caps
selenium-1 | Allow the Distributor to reject a request immediately if the Grid does
selenium-1 | not support the requested capability.Rejecting requests immediately is
selenium-1 | suitable for Grid set up that does not spin up Nodes on demand.
selenium-1 | Default: false
selenium-1 | --relax-checks
selenium-1 | Relax checks on origin header and content type of incoming requests, in
selenium-1 | contravention of strict W3C spec compliance.
selenium-1 | Default: false
selenium-1 | --selenium-manager
selenium-1 | When drivers are not available on the current system, use, Selenium
selenium-1 | Manager.
selenium-1 | Default: false
selenium-1 | --service-configuration
selenium-1 | Configuration for the service where calls will be relayed to. It is
selenium-1 | recommended to provide this type of configuration through a toml config
selenium-1 | file to improve readability. Command line example:
selenium-1 | --service-configuration max-sessions=2 stereotype='{"browserName":
selenium-1 | "safari", "platformName": "iOS", "appium:platformVersion": "14.5"}}'
selenium-1 | --service-host
selenium-1 | Host name where the service that supports WebDriver commands is running
selenium-1 | --service-port
selenium-1 | Port where the service that supports WebDriver commands is running
selenium-1 | --service-status-endpoint
selenium-1 | Endpoint to query the WebDriver service status, an HTTP 200 response is
selenium-1 | expected
selenium-1 | --service-url
selenium-1 | URL for connecting to the service that supports WebDriver commands, like
selenium-1 | an Appium server or a cloud service.
selenium-1 | --session-request-timeout
selenium-1 | Timeout in seconds. New incoming session request is added to the queue.
selenium-1 | Requests sitting in the queue for longer than the configured time will
selenium-1 | timeout.
selenium-1 | Default: 300
selenium-1 | --session-request-timeout-period
selenium-1 | In seconds, how often the timeout for new session requests is checked.
selenium-1 | Default: 10
selenium-1 | --session-retry-interval
selenium-1 | Session creation interval in milliseconds. If all slots are busy, new
selenium-1 | session request will be retried after the given interval.
selenium-1 | Default: 15
selenium-1 | --session-timeout
selenium-1 | Let X be the session-timeout in seconds. The Node will automatically
selenium-1 | kill a session that has not had any activity in the last X seconds. This
selenium-1 | will release the slot for other tests.
selenium-1 | Default: 300
selenium-1 | --sq, --sessionqueue
selenium-1 | Address of the session queue server.
selenium-1 | --sessionqueue-batch-size
selenium-1 | Maximum batch size that can consumed from queue based on the available
selenium-1 | slots.
selenium-1 | Default: 3
selenium-1 | --sessionqueue-host
selenium-1 | Host on which the session queue server is listening.
selenium-1 | --sessionqueue-port
selenium-1 | Port on which the session queue server is listening.
selenium-1 | --slot-matcher
selenium-1 | Full classname of non-default slot matcher to use. This is used to
selenium-1 | determine whether a Node can support a particular session.
selenium-1 | Default: org.openqa.selenium.grid.data.DefaultSlotMatcher
selenium-1 | --slot-selector
selenium-1 | Full classname of non-default slot selector. This is used to select a
selenium-1 | slot in a Node once the Node has been matched.
selenium-1 | Default: org.openqa.selenium.grid.distributor.selector.DefaultSlotSelector
selenium-1 | --structured-logs
selenium-1 | Use structured logs
selenium-1 | Default: false
selenium-1 | --sub-path
selenium-1 | A sub-path that should be considered for all user facing routes on the
selenium-1 | Hub/Router/Standalone
selenium-1 | --tracing
selenium-1 | Enable trace collection
selenium-1 | Default: true
selenium-1 | --username
selenium-1 | User name clients must use to connect to the server. Both this and
selenium-1 | password need to be set in order to be used.
selenium-1 | --version
selenium-1 | Displays the version and exits.
selenium-1 | Default: false
selenium-1 | --vnc-env-var
selenium-1 | Environment variable to check in order to determine if a vnc stream is
selenium-1 | available or not.
selenium-1 | Default: SE_START_XVFB
selenium-1 |
selenium-1 | 2024-04-11 12:34:37,335 INFO exited: selenium-standalone (exit status 0; expected)
selenium-1 | 2024-04-11 12:34:37,336 WARN received SIGINT indicating exit request
selenium-1 | 2024-04-11 12:34:37,337 INFO waiting for xvfb, vnc, novnc to die
selenium-1 | 2024-04-11 12:34:37,488 INFO stopped: novnc (terminated by SIGTERM)
selenium-1 | 2024-04-11 12:34:37,490 INFO stopped: vnc (terminated by SIGTERM)
selenium-1 | 2024-04-11 12:34:37,492 INFO stopped: xvfb (terminated by SIGTERM)
selenium-1 exited with code 0
Was passed main parameter '-headless' but no main parameter was defined in your arg class
That is not a valid parameter. Please also read what the exceptions are telling you.
@diemol
Was passed main parameter '-headless' but no main parameter was defined in your arg class
That is not a valid parameter. Please also read what the exceptions are telling you.
This was a fallback because I could not start normally, now that docker-compose
version was updated I can use the original yml file:
---
services:
chrome:
image: selenium/node-chrome:4.18.1-20240224
shm_size: 2gb
ports:
- 4444:4444
- 7900:7900
environment:
- SE_EVENT_BUS_HOST=chrome
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
I'm not sure if this is acceptable, I do not need to run tests on multiple browser and I only run 1 single request at a time, this is starting but I cannot connect externally on port 4444 probably because the hub is missing, however port 4444 is open and I should be able to connect to it from my PC.
You can use the standalone
image. That is good for your use case.
You also need to verify the network permissions in DO.
I will close this issue as you figured out what the problem was.
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.
What happened?
I used to launch docker-selenium with the following command:
docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:4.18.1-20240224
then decided to put this into a .yml file and just launch it withdocker-selenium up -d
but I keep getting the same error:At first I though it was due to having added the
http_proxy
andhttps_proxy
lines, so I removed them. Then I also removed the following two lines to make the yml file as close as possible to the command line I used to launch docker-selenium:My purpoose is to use an
http/s_proxy
for looking up web pages, not for downloading slenium images, but I don't know how to make this distinction, aside from this, I'm not unable to run the same image using yml file, but it looks quite like what I used so far.Command used to start Selenium Grid with Docker (or Kubernetes)
Relevant log output
Operating System
Ubuntu 23.10
Docker Selenium version (image tag)
4.18.1-20240224
Selenium Grid chart version (chart version)
No response