Where can I find a schema or documentation for the Se 2 grid hub configuration json? - selenium

I have a Se 2 grid hub running. Where can I find documentation for the effects and schema of the -hubConfig parameter? Currently my grid hub shows: "updated with grid2 config : No hub config file specified. To specify one, use -hubConfig XXX.json where XXX.json is a hub config file". I can use the hub without this configured.
I have found examples in blogs and issues, but no clear documentation.
blogs: http://opensourcetester.co.uk/2011/07/06/selenium-grid-2/
issues: http://code.google.com/p/selenium/issues/detail?id=2399

I've found a good starting point is looking at examples in the Selenium Grid 2 code base.
Here is a sample hub file (assume we name the json file hub.json):
Use: java -jar selenium-server-standalone-2.6.0.jar -role hub -hubConfig hub.json
{
"host": null,
"port": 4444,
"newSessionWaitTimeout": -1,
"servlets" : [],
"prioritizer": null,
"capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
"throwOnCapabilityNotPresent": true,
"nodePolling": 5000,
"cleanUpCycle": 5000,
"timeout": 300000,
"maxSession": 5
}
here is a sample node file (assume the file is named rc.json):
Use: java -jar selenium-server-standalone-2.6.0.jar -role rc -nodeConfig rc.json
{
"capabilities":
[
{
"browserName": "firefox",
"maxInstances": 5
},
{
"browserName": "chrome",
"maxInstances": 5
},
{
"browserName": "internet explorer",
"maxInstances": 1
}
],
"configuration":
{
"nodeTimeout":120,
"port":5555,
"hubPort":4444,
"hubHost":"localhost",
"nodePolling":2000,
"registerCycle":10000,
"register":true,
"cleanUpCycle":2000,
"timeout":30000,
"maxSession":5,
}
}
You can create use the similar format for role "wd" if it's required to have a different configuration.

The javadocs and various source code files are helpful to a certain extent but the wiki is not very helpful and the various configuration examples seem inconsistent until you dig into the code. For example, DefaultHub.json specifies "timeout" : 300000 which leads one to assume timeout is in ms but if you look at command-line examples you'll see that timeout is specified in seconds. If you look at the code you'll see that, indeed, the JSON configuration scheme does take timeout (and all other time values) in ms but all other configuration schemes take the timeout (and some other time values) in seconds.
The most readable and concise documentation I've found for the hub and node options is in an old copy of GridParameters.properties (which no longer seems to exist), but keep in mind that all time values in a JSON configuration file are in ms:
role = <hub|node> (default is no grid, just run an RC/webdriver server). When launching a node, the parameters will be forwarded to the server on the node, so you can use something like -role node -trustAllSSLCertificates. In that case, the SeleniumServer will be launch with the trustallSSLCertificates option.
# hub config
host = (hub & node) <IP | hostname> : usually not needed and determined automatically. For exotic network configuration, network with VPN, specifying the host might be necessary.
port = (hub & node) <xxxx> : the port the remote/hub will listen on. Default to 4444.
throwOnCapabilityNotPresent = (hub) <true | false> default to true. If true, the hub will reject test requests right away if no proxy is currently registered that can host that capability.Set it to false to have the request queued until a node supporting the capability is added to the grid.
newSessionWaitTimeout = (hub) <XXXX>. Default to no timeout ( -1 ) the time in ms after which a new test waiting for a node to become available will time out.When that happens, the test will throw an exception before starting a browser.
capabilityMatcher = (hub) a class implementing the CapabilityMatcher interface. Defaults to org.openqa.grid.internal.utils.DefaultCapabilityMatcher. Specify the logic the hub will follow to define if a request can be assigned to a node.Change this class if you want to have the matching process use regular expression instead of exact match for the version of the browser for instance. All the nodes of a grid instance will use the same matcher, defined by the registry.
prioritizer = (hub) a class implementing the Prioritizer interface. Default to null ( no priority = FIFO ).Specify a custom prioritizer if you need the grid to process the tests from the CI, or the IE tests first for instance.
servlets = (hub & node) <com.mycompany.MyServlet,com.mycompany.MyServlet2> to register a new servlet on the hub/node. The servlet will accessible under the path /grid/admin/MyServlet /grid/admin/MyServlet2
grid1Yml = (hub) a YML file following grid1 format.
hubConfig = (hub) a JSON file following grid2 format that defines the hub properties.
nodeConfig = (node) a JSON file following grid2 format that defines the node properties.
# config that will be inherited by the proxy and used for the node management.
cleanupCycle = (node) <XXXX> in ms. How often a proxy will check for timed out thread.
timeout = (node) <XXXX> the timeout in seconds before the hub automatically ends a test that hasn't had any activity in the last X seconds. The browser will be released for another test to use. This typically takes care of the client crashes.
browserTimeout= (hub/node) The timeout in seconds a browser can hang
hub = (node) <http://localhost:4444/grid/register> : the url that will be used to post the registration request. This option takes precedence over -hubHost and -hubPort options.
hubHost = (node) <IP | hostname> : the host address of a hub the registration request should be sent to. Default to localhost. Option -hub takes precedence over this option.
hubPort = (node) <xxxx> : the port listened by a hub the registration request should be sent to. Default to 4444. Option -hub takes precedence over this option.
proxy = (node) the class that will be used to represent the node. By default org.openqa.grid.selenium.proxy.DefaultRemoteProxy.
maxSession = (node) max number of tests that can run at the same time on the node, independently of the browser used.
registerCycle = (node) how often in ms the node will try to register itself again.Allow to restart the hub without having to restart the nodes.
nodePolling = (node) in ms. Interval between alive checks of node how often the hub checks if the node is still alive.
unregisterIfStillDownAfter = (node) in ms. If the node remains down for more than unregisterIfStillDownAfter millisec, it will disappear from the hub.Default is 1min.
downPollingLimit = (node) node is marked as down after downPollingLimit alive checks.
nodeStatusCheckTimeout = (node) in ms. Connection and socket timeout which is used for node alive check.

The wiki docs are sparse, but there are lots of helpful comments in the source. GridHubConfiguration.java is where you should start. Here's a sample:
/**
* how often in ms each proxy will detect that a session has timed out. All new proxy registering
* will have that value if they don't specifically mention the parameter.
*/
private int cleanupCycle;
/**
* how long a new session request can stay in the queue without being assigned before being
* rejected. -1 = forever.
*/
private int newSessionWaitTimeout;
I was looking for what the timeout config meant, found here:
/**
* how many ms can a session be idle before being considered timed out. Working together with
* cleanup cycle. Worst case scenario, a session can be idle for timeout + cleanup cycle before the
* timeout is detected.
*/
public static final JsonKey CLIENT_TIMEOUT = JsonKey.key("timeout");

Related

Testcontainers RabbitMq with SSL/TLS fails to wait for a container to start

I have a test using RabbitMq in Testcontainers. The test is working using HTTP
#Container private static final RabbitMQContainer RABBITMQ_CONTAINER =
new RabbitMQContainer()
.withLogConsumer(new Slf4jLogConsumer(LOG))
.withStartupTimeout(Duration.of(5, ChronoUnit.MINUTES))
.waitingFor(Wait.forHttp("/api/vhosts")
.forPort(15672)
.withBasicCredentials("guest", "guest"));
and fails when I switch to HTTPS
#Container private static final RabbitMQContainer RABBITMQ_CONTAINER =
new RabbitMQContainer()
.withLogConsumer(new Slf4jLogConsumer(LOG))
.withStartupTimeout(Duration.of(5, ChronoUnit.MINUTES))
.waitingFor(Wait.forHttp("/api/vhosts")
.usingTls()
.forPort(15671)
.withBasicCredentials("guest", "guest"))
.withSSL(forClasspathResource("/certs/server_key.pem", 0644),
forClasspathResource("/certs/server_certificate.pem", 0644),
forClasspathResource("/certs/ca_certificate.pem", 0644),
VERIFY_NONE,
false);
In logs I see that container can not start:
...
18:53:21.274 [main] INFO - /brave_swirles: Waiting for 60 seconds for URL: https://localhost:50062/api/vhosts (where port 50062 maps to container port 15671)
...
18:54:21.302 [main] ERROR - Could not start container
org.testcontainers.containers.ContainerLaunchException: Timed out waiting for URL to be accessible (https://localhost:50062/api/vhosts should return HTTP 200)
What do I miss? I'd want at least Testcontainers' waiting strategy works.
Using RabbitMQContainer with custom SSL certificates makes it hard to also use HttpWaitStrategy. In this case, you probably need to configure the whole JVM to trust those SSL certificates.
Alternatively, just continue to use the default wait strategy (which will be a LogMessageWaitStrategy).
For further examples, just look at the RabbitMQContainer tests in Testcontainers itself:
https://github.com/testcontainers/testcontainers-java/blob/c3f53b3a63e6b0bc800a7f0fbce91ce95a8986b3/modules/rabbitmq/src/test/java/org/testcontainers/containers/RabbitMQContainerTest.java#L237-L264

DefaultRemoteProxy unknown version,Failed to connect error

I am running a hub and a node locally (A), and a node from another pc(B). This is how i run scripts locally (A) http://prntscr.com/pghnwk , and this is how i run the script in B computer http://prntscr.com/pghox4 . The code in node scripts are the same , only browsers differ. But, when i'm accessing localhost:4443/grid/console , I get this http://prntscr.com/pghr87
Please specify the host IP/Name using -host option while registering from pc(B). While running node from the virtual machine, the advertised IP address seems wrong (May be IP address of host machine of VM). Please check that IP address.
For help on the node role
java -jar selenium-server-standalone-3.3.1.jar -role node -help
Usage: <main class> [options]
Options:
--version, -version
Displays the version and exits.
Default: false
-browserTimeout
<Integer> in seconds : number of seconds a browser session is allowed to
hang while a WebDriver command is running (example: driver.get(url)). If the
timeout is reached while a WebDriver command is still processing, the session
will quit. Minimum value is 60. An unspecified, zero, or negative value means
wait indefinitely.
Default: 0
-capabilities, -browser
<String> : comma separated Capability values. Example: -capabilities
browserName=firefox,platform=linux -capabilities browserName=chrome,platform=linux
Default: [Capabilities [{seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=internet explorer, maxInstances=1}]]
-cleanUpCycle
<Integer> in ms : specifies how often the hub will poll running proxies
for timed-out (i.e. hung) threads. Must also specify "timeout" option
-custom
<String> : comma separated key=value pairs for custom grid extensions.
NOT RECOMMENDED -- may be deprecated in a future revision. Example: -custom
myParamA=Value1,myParamB=Value2
Default: {}
-debug
<Boolean> : enables LogLevel.FINE.
Default: false
-downPollingLimit
<Integer> : node is marked as "down" if the node hasn't responded after
the number of checks specified in [downPollingLimit].
Default: 2
-host
<String> IP or hostname : usually determined automatically. Most commonly
useful in exotic network configurations (e.g. network with VPN)
-hub
<String> : the url that will be used to post the registration request.
This option takes precedence over -hubHost and -hubPort options.
Default: http://localhost:4444
-hubHost
<String> IP or hostname : the host address of the hub we're attempting to
register with. If -hub is specified the -hubHost is determined from it.
-hubPort
<Integer> : the port of the hub we're attempting to register with. If
-hub is specified the -hubPort is determined from it.
-id
<String> : optional unique identifier for the node. Defaults to the url
of the remoteHost, when not specified.
-jettyThreads, -jettyMaxThreads
<Integer> : max number of threads for Jetty. An unspecified, zero, or
negative value means the Jetty default value (200) will be used.
-log
<String> filename : the filename to use for logging. If omitted, will log
to STDOUT
-maxSession
<Integer> max number of tests that can run at the same time on the node,
irrespective of the browser used
Default: 5
-nodeConfig
<String> filename : JSON configuration file for the node. Overrides
default values
-nodePolling
<Integer> in ms : specifies how often the hub will poll to see if the
node is still responding.
Default: 5000
-nodeStatusCheckTimeout
<Integer> in ms : connection/socket timeout, used for node "nodePolling"
check.
Default: 5000
-port
<Integer> : the port number the server will use.
Default: 5555
-proxy
<String> : the class used to represent the node proxy. Default is
[org.openqa.grid.selenium.proxy.DefaultRemoteProxy].
Default: org.openqa.grid.selenium.proxy.DefaultRemoteProxy
-register
if specified, node will attempt to re-register itself automatically with
its known grid hub if the hub becomes unavailable.
Default: true
-registerCycle
<Integer> in ms : specifies how often the node will try to register
itself again. Allows administrator to restart the hub without restarting (or
risk orphaning) registered nodes. Must be specified with the "-register"
option.
Default: 5000
-role
<String> options are [hub], [node], or [standalone].
Default: node
-servlet, -servlets
<String> : list of extra servlets the grid (hub or node) will make
available. Specify multiple on the command line: -servlet tld.company.ServletA
-servlet tld.company.ServletB. The servlet must exist in the path:
/grid/admin/ServletA /grid/admin/ServletB
Default: []
-timeout, -sessionTimeout
<Integer> in seconds : Specifies the timeout before the server
automatically kills a session that hasn't had any activity in the last X seconds. The
test slot will then be released for another test to use. This is typically
used to take care of client crashes. For grid hub/node roles, cleanUpCycle
must also be set.
Default: 1800
-unregisterIfStillDownAfter
<Integer> in ms : if the node remains down for more than
[unregisterIfStillDownAfter] ms, it will stop attempting to re-register from the hub.
Default: 60000
-withoutServlet, -withoutServlets
<String> : list of default (hub or node) servlets to disable. Advanced
use cases only. Not all default servlets can be disabled. Specify multiple on
the command line: -withoutServlet tld.company.ServletA -withoutServlet
tld.company.ServletB
Default: []

Selenium Grid WebDriver returning 504 Gateway Time-out while waiting for grid to scale

Currently I have a Selenium Grid running on AWS Fargate that autoscales based on desired sessions on the hub. I have a service that runs the hub task and a service for the node tasks. I currently use a one session per node approach because of the necessary resources required, and the fact that overall execution speed is not the primary goal of this test suite. I also always keep at least one node running.
The actual autoscaling will work; the hub sees it needs more nodes and scales the node service up to the needed scale. The hub will hold the session until a node is available and correctly place it there when it is.
The tests work perfectly if I'm just running one at a time, but the problem I'm running into is that when I try to run a group in parallel and need the grid to scale up, I get a 504 Gateway Time-out after 30 seconds of calling the WebDriver. I've tried to change every setting possible to bump this timeout but to no avail.
My hub config looks like
browserTimeout : 0
debug : false
jettyMaxThreads : -1
host : XXXXXXXXX
port : 4444
role : hub
timeout : 180000
cleanUpCycle : 5000
maxSession : 5
hubConfig : /opt/selenium/config.json
capabilityMatcher : org.openqa.grid.internal.utils.DefaultCapabilityMatcher
newSessionWaitTimeout : -1
throwOnCapabilityNotPresent : true
registry : org.openqa.grid.internal.DefaultGridRegistry
The node config looks like
browserTimeout: 0
debug: false
jettyMaxThreads: -1
host: XXXXXXXXX
port: 5555
role: node
timeout: 1800
cleanUpCycle: 5000
maxSession: 1
capabilities: Capabilities {applicationName: , browserName: chrome, maxInstances: 1, platform: LINUX, platformName: LINUX, seleniumProtocol: WebDriver, server:CONFIG_UUID: ..., version: 66.0.3359.170}
downPollingLimit: 2
hub: http://XXXXXXXXX:4444/grid/register
id: http://XXXXXXXXX:5555
nodePolling: 5000
nodeStatusCheckTimeout: 5000
proxy: org.openqa.grid.selenium.proxy.DefaultRemoteProxy
register: true
registerCycle: 5000
remoteHost: http://XXXXXXXXX:5555
unregisterIfStillDownAfter: 10000
I'm calling my selenium tests via Jruby for some certain business reasons and the basic configuration looks like
co = Java::OrgOpenqaSeleniumChrome::ChromeOptions.new
co.add_arguments(["--disable-extensions"].to_java(:string))
co.add_arguments(["no-sandbox"].to_java(:string))
co.add_arguments("--headless")
chrome_prefs = {}
chrome_prefs["profile.default_content_settings.popups"] = 0.to_s
chrome_prefs["safebrowsing.enabled"] = "true"
co.set_experimental_option("prefs", chrome_prefs)
cap = Java::OrgOpenqaSeleniumRemote::DesiredCapabilities.chrome
cap.set_capability("Capability", co)
$grid_url = ENV['GRID_URL']
$driver = Java::OrgOpenqaSeleniumRemote::RemoteWebDriver.new(Java::JavaNet::URL.new($grid_url), cap)
# Get timeout after the RemoteWebDriver.new call
Does anyone have any idea how to change the timeout here?
This had absolutely nothing to do with the Selenium setup, so if anyone else happens to run into this specifically when using Fargate or ECS in general and you're running the Hub behind a load balancer...
If you happened to base your CloudFormation off of the AWS Fargate examples they have on their Github, really make sure you change what they had idle_timeout.timeout_seconds for the Load Balancer set to.

Modify Hikari properties at runtime

Where can I find information about Hikari properties that can be modified at runtime?
I tried to modify connectionTimeout. I can do it and it will be modified in the HikariDataSource without an exception (checked by setting and then getting the property) but it takes no effect.
If I initially do:
HikariConfig config = new HikariConfig();
config.setConnectionTimeout(12000);
HikariDataSource pool = new HikariDataSource(config);
and later on I do
config.setConnectionTimeout(5000);
Hikari tries to get a new connection for 12 seconds instead of 5 seconds.
Or is there a way to change the value with effect?
Are there other properties with the same behaviour?
You can do this through the MX bean, but you don't need to use JMX
public void updateTimeout(final long connectionTimeoutMs, final HikariDataSource ds) {
var poolBean = ds.getHikariPoolMXBean();
var configBean = ds.getHikariConfigMXBean();
poolBean.suspendPool(); // Block new connections being leased
configBean.setConnectionTimeout(connectionTimeoutMs);
poolBean.softEvictConnections(); // Close unused cnxns & mark open ones for disposal
poolBean.resumePool(); // Re-enable connections
}
Bear in mind you will need to enable pool suspension in your initial config
var config = new HikariConfig();
...
config.setAllowPoolSuspension(true);
You can't dynamically update the property values by resetting them on the config object - the config object is ultimately read once when instantiating the Hikari Pool (have a look at the source code in PoolBase.java to see how this works.
You can however do what you want and update the connection timeout value at runtime via JMX. How to do this is explained in the hikari documentation here
If your JVM has JMX enabled (I recommend for every prod), you could:
SSH-tunnel JMX port to your local machine
Connect to the VM in a JMX client like JConsole
Operate pool MBean as needed
Note: JMX port must never be public to the internet, be sure that firewall protects you.
SSH Tunnel command example:
ssh -i ${key_path} -N -L 9000:localhost:9000 -L 9001:localhost:9001 ${user}#${address}

Properties for Selenium Grid Hub/Node Config

I'm going through a process of upgrading my Selenium Hub/Nodes to version 3.3.
Everything works fine, but I want to make sure I have optimal configuration... problem is I can't find a complete list of Hub/Node properties anywhere.
I've looked through:
https://seleniumhq.github.io/docs/grid.html
http://www.seleniumhq.org/docs/07_selenium_grid.jsp
https://github.com/SeleniumHQ/selenium/wiki/Grid2
https://github.com/SeleniumHQ/selenium/blob/master/java/server/src/org/openqa/grid/common/defaults/DefaultNodeWebDriver.json
https://github.com/SeleniumHQ/selenium/blob/master/java/server/src/org/openqa/grid/common/defaults/DefaultHub.json
These docs only list some of the properties through example configs, but none of them seem like a complete list and more importantly none of them actually state what these properties do. Where is the documentation for a complete list of configuration properties for Selenium Hub/Nodes?
This documentation is available via the Selenium standalone uber jar itself.
java -jar selenium-server-standalone-3.3.1.jar -help
Usage: <main class> [options]
Options:
--version, -version
Displays the version and exits.
Default: false
-browserTimeout
<Integer> in seconds : number of seconds a browser session is allowed to
hang while a WebDriver command is running (example: driver.get(url)). If the
timeout is reached while a WebDriver command is still processing, the session
will quit. Minimum value is 60. An unspecified, zero, or negative value means
wait indefinitely.
Default: 0
-debug
<Boolean> : enables LogLevel.FINE.
Default: false
-jettyThreads, -jettyMaxThreads
<Integer> : max number of threads for Jetty. An unspecified, zero, or
negative value means the Jetty default value (200) will be used.
-log
<String> filename : the filename to use for logging. If omitted, will log
to STDOUT
-port
<Integer> : the port number the server will use.
Default: 4444
-role
<String> options are [hub], [node], or [standalone].
Default: standalone
-timeout, -sessionTimeout
<Integer> in seconds : Specifies the timeout before the server
automatically kills a session that hasn't had any activity in the last X seconds. The
test slot will then be released for another test to use. This is typically
used to take care of client crashes. For grid hub/node roles, cleanUpCycle
must also be set.
Default: 1800
For help on the hub role
java -jar selenium-server-standalone-3.3.1.jar -role hub -help
Usage: <main class> [options]
Options:
--version, -version
Displays the version and exits.
Default: false
-browserTimeout
<Integer> in seconds : number of seconds a browser session is allowed to
hang while a WebDriver command is running (example: driver.get(url)). If the
timeout is reached while a WebDriver command is still processing, the session
will quit. Minimum value is 60. An unspecified, zero, or negative value means
wait indefinitely.
Default: 0
-matcher, -capabilityMatcher
<String> class name : a class implementing the CapabilityMatcher
interface. Specifies the logic the hub will follow to define whether a request can
be assigned to a node. For example, if you want to have the matching process
use regular expressions instead of exact match when specifying browser
version. ALL nodes of a grid ecosystem would then use the same capabilityMatcher,
as defined here.
Default: org.openqa.grid.internal.utils.DefaultCapabilityMatcher#64a294a6
-cleanUpCycle
<Integer> in ms : specifies how often the hub will poll running proxies
for timed-out (i.e. hung) threads. Must also specify "timeout" option
Default: 5000
-custom
<String> : comma separated key=value pairs for custom grid extensions.
NOT RECOMMENDED -- may be deprecated in a future revision. Example: -custom
myParamA=Value1,myParamB=Value2
Default: {}
-debug
<Boolean> : enables LogLevel.FINE.
Default: false
-host
<String> IP or hostname : usually determined automatically. Most commonly
useful in exotic network configurations (e.g. network with VPN)
-hubConfig
<String> filename: a JSON file (following grid2 format), which defines
the hub properties
-jettyThreads, -jettyMaxThreads
<Integer> : max number of threads for Jetty. An unspecified, zero, or
negative value means the Jetty default value (200) will be used.
-log
<String> filename : the filename to use for logging. If omitted, will log
to STDOUT
-maxSession
<Integer> max number of tests that can run at the same time on the node,
irrespective of the browser used
-newSessionWaitTimeout
<Integer> in ms : The time after which a new test waiting for a node to
become available will time out. When that happens, the test will throw an
exception before attempting to start a browser. An unspecified, zero, or negative
value means wait indefinitely.
Default: -1
-port
<Integer> : the port number the server will use.
Default: 4444
-prioritizer
<String> class name : a class implementing the Prioritizer interface.
Specify a custom Prioritizer if you want to sort the order in which new session
requests are processed when there is a queue. Default to null ( no priority = FIFO
)
-role
<String> options are [hub], [node], or [standalone].
Default: hub
-servlet, -servlets
<String> : list of extra servlets the grid (hub or node) will make
available. Specify multiple on the command line: -servlet tld.company.ServletA
-servlet tld.company.ServletB. The servlet must exist in the path:
/grid/admin/ServletA /grid/admin/ServletB
Default: []
-timeout, -sessionTimeout
<Integer> in seconds : Specifies the timeout before the server
automatically kills a session that hasn't had any activity in the last X seconds. The
test slot will then be released for another test to use. This is typically
used to take care of client crashes. For grid hub/node roles, cleanUpCycle
must also be set.
Default: 1800
-throwOnCapabilityNotPresent
<Boolean> true or false : If true, the hub will reject all test requests
if no compatible proxy is currently registered. If set to false, the request
will queue until a node supporting the capability is registered with the grid.
Default: true
-withoutServlet, -withoutServlets
<String> : list of default (hub or node) servlets to disable. Advanced
use cases only. Not all default servlets can be disabled. Specify multiple on
the command line: -withoutServlet tld.company.ServletA -withoutServlet
tld.company.ServletB
Default: []
For help on the node role
java -jar selenium-server-standalone-3.3.1.jar -role node -help
Usage: <main class> [options]
Options:
--version, -version
Displays the version and exits.
Default: false
-browserTimeout
<Integer> in seconds : number of seconds a browser session is allowed to
hang while a WebDriver command is running (example: driver.get(url)). If the
timeout is reached while a WebDriver command is still processing, the session
will quit. Minimum value is 60. An unspecified, zero, or negative value means
wait indefinitely.
Default: 0
-capabilities, -browser
<String> : comma separated Capability values. Example: -capabilities
browserName=firefox,platform=linux -capabilities browserName=chrome,platform=linux
Default: [Capabilities [{seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=internet explorer, maxInstances=1}]]
-cleanUpCycle
<Integer> in ms : specifies how often the hub will poll running proxies
for timed-out (i.e. hung) threads. Must also specify "timeout" option
-custom
<String> : comma separated key=value pairs for custom grid extensions.
NOT RECOMMENDED -- may be deprecated in a future revision. Example: -custom
myParamA=Value1,myParamB=Value2
Default: {}
-debug
<Boolean> : enables LogLevel.FINE.
Default: false
-downPollingLimit
<Integer> : node is marked as "down" if the node hasn't responded after
the number of checks specified in [downPollingLimit].
Default: 2
-host
<String> IP or hostname : usually determined automatically. Most commonly
useful in exotic network configurations (e.g. network with VPN)
-hub
<String> : the url that will be used to post the registration request.
This option takes precedence over -hubHost and -hubPort options.
Default: http://localhost:4444
-hubHost
<String> IP or hostname : the host address of the hub we're attempting to
register with. If -hub is specified the -hubHost is determined from it.
-hubPort
<Integer> : the port of the hub we're attempting to register with. If
-hub is specified the -hubPort is determined from it.
-id
<String> : optional unique identifier for the node. Defaults to the url
of the remoteHost, when not specified.
-jettyThreads, -jettyMaxThreads
<Integer> : max number of threads for Jetty. An unspecified, zero, or
negative value means the Jetty default value (200) will be used.
-log
<String> filename : the filename to use for logging. If omitted, will log
to STDOUT
-maxSession
<Integer> max number of tests that can run at the same time on the node,
irrespective of the browser used
Default: 5
-nodeConfig
<String> filename : JSON configuration file for the node. Overrides
default values
-nodePolling
<Integer> in ms : specifies how often the hub will poll to see if the
node is still responding.
Default: 5000
-nodeStatusCheckTimeout
<Integer> in ms : connection/socket timeout, used for node "nodePolling"
check.
Default: 5000
-port
<Integer> : the port number the server will use.
Default: 5555
-proxy
<String> : the class used to represent the node proxy. Default is
[org.openqa.grid.selenium.proxy.DefaultRemoteProxy].
Default: org.openqa.grid.selenium.proxy.DefaultRemoteProxy
-register
if specified, node will attempt to re-register itself automatically with
its known grid hub if the hub becomes unavailable.
Default: true
-registerCycle
<Integer> in ms : specifies how often the node will try to register
itself again. Allows administrator to restart the hub without restarting (or
risk orphaning) registered nodes. Must be specified with the "-register"
option.
Default: 5000
-role
<String> options are [hub], [node], or [standalone].
Default: node
-servlet, -servlets
<String> : list of extra servlets the grid (hub or node) will make
available. Specify multiple on the command line: -servlet tld.company.ServletA
-servlet tld.company.ServletB. The servlet must exist in the path:
/grid/admin/ServletA /grid/admin/ServletB
Default: []
-timeout, -sessionTimeout
<Integer> in seconds : Specifies the timeout before the server
automatically kills a session that hasn't had any activity in the last X seconds. The
test slot will then be released for another test to use. This is typically
used to take care of client crashes. For grid hub/node roles, cleanUpCycle
must also be set.
Default: 1800
-unregisterIfStillDownAfter
<Integer> in ms : if the node remains down for more than
[unregisterIfStillDownAfter] ms, it will stop attempting to re-register from the hub.
Default: 60000
-withoutServlet, -withoutServlets
<String> : list of default (hub or node) servlets to disable. Advanced
use cases only. Not all default servlets can be disabled. Specify multiple on
the command line: -withoutServlet tld.company.ServletA -withoutServlet
tld.company.ServletB
Default: []