Multiple Node setup | Selenium Forum
M
Posted on 10/08/2016
Not able to set multiple nodes. Only one node is setup successfully. Getting below error.

23:49:01.464 INFO - Selenium build info: version: '3.0.0-beta2', revision: '2aa21c1'
23:49:01.467 INFO - Launching a Selenium Grid node
2016-08-10 23:49:01.866:INFO::main: Logging initialized @605ms
23:49:01.895 INFO - Driver class not found: com.opera.core.systems.OperaDriver
23:49:01.897 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
23:49:01.904 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform WIN10
2016-08-10 23:49:01.937:INFO:osjs.Server:main: jetty-9.2.15.v20160210
2016-08-10 23:49:01.954:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@222114ba{/,null,AVAILABLE}
2016-08-10 23:49:01.960:WARN:osjuc.AbstractLifeCycle:main: FAILED ServerConnector@11a9e7c8{HTTP/1.1}{0.0.0.0:5555}: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.seleniumhq.jetty9.server.ServerConnector.open(ServerConnector.java:321)
at org.seleniumhq.jetty9.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.seleniumhq.jetty9.server.ServerConnector.doStart(ServerConnector.java:236)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.seleniumhq.jetty9.server.Server.doStart(Server.java:366)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.java:126)
at org.openqa.grid.internal.utils.SelfRegisteringRemote.startRemoteServer(SelfRegisteringRemote.java:99)
at org.openqa.grid.selenium.GridLauncherV3$3.launch(GridLauncherV3.java:245)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:85)
2016-08-10 23:49:01.990:WARN:osjuc.AbstractLifeCycle:main: FAILED org.seleniumhq.jetty9.server.Server@3901d134: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.seleniumhq.jetty9.server.ServerConnector.open(ServerConnector.java:321)
at org.seleniumhq.jetty9.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.seleniumhq.jetty9.server.ServerConnector.doStart(ServerConnector.java:236)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.seleniumhq.jetty9.server.Server.doStart(Server.java:366)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.java:126)
at org.openqa.grid.internal.utils.SelfRegisteringRemote.startRemoteServer(SelfRegisteringRemote.java:99)
at org.openqa.grid.selenium.GridLauncherV3$3.launch(GridLauncherV3.java:245)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:85)
Usage: <main class> [options]
Options:
-avoidProxy
DO NOT USE. Hack to allow selenium 3.0 server run in SauceLabs
-browser
<String> : comma separated Capability values. Example: -browser
browserName=firefox,platform=linux -browser browserName=chrome,platform=linux
Default: []
-browserTimeout
<Integer> in seconds : number of seconds a browser session is allowed to
hang (0 means indefinite) 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. Default is 0
-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> : NOT RECOMMENDED--may be deprecated to encourage proper servlet
customization. Comma separated key=value pairs for custom grid extensions. example:
-custom myParamA=Value1,myParamB=Value2
Default: {}
-debug
<Boolean> : enables LogLevel.FINE. Default is false (if omitted)
Default: false
-downPollingLimit
<Integer> : node is marked as "down" if the node hasn't responded after
the number of checks specified in [downPollingLimit]. Default is 2
-host
<String> IP or hostname : usually determined automatically. Most commonly
useful in exotic network configurations (e.g. network with VPN)
-hub
<String> (e.g. 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
Default: http://localhost:4444/grid/register
-hubHost
<String> IP or hostname : the host address of the hub we're attempting to
register with. If "role" is set to [hub], this option will be ignored. Default is
localhost
-hubPort
<Integer> : the port of the hub we're attempting to register with. If
"role" is set to [hub], this option will be ignored. Default to 4444
-id
<String> : unique identifier for the node. Not required--by default, grid
will use the url of the remoteHost
-log
<String> filename : the filename to use for logging. If omitted, will log
to STDOUT
-logLongForm
<Boolean> : if specified, all log statements (including to log file from
"log" parameter) will include the Thread ID
Default: false
-maxSession
<Integer> max number of tests that can run at the same time on the node,
irrespective of the browser used
Default: 1
-nodeConfig
<String> filename : JSON configuration file for the node. Overrides
default values
Default: node1.json
-nodePolling
<Integer> in ms : specifies how often the hub will poll to see if the
node is still responding
-nodeStatusCheckTimeout
<Integer> in ms : connection/socket timeout, used for node "nodePolling"
check
Default: 5000
-port
<Integer> : the port number the server will use. Defaults to [4444]. When
"role" is a set to [node], default is [5555]
Default: 5555
-proxy
<String> : the class used to represent the node proxy. Default is
[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 is disabled
-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
-role
<String> options are [hub], [node], or [standalone] : Default is
[standalone]
Default: node
-servlet, -servlets
<String> : list of extra servlets this hub will display. Allows to
present custom view of the hub for monitoring and management purposes. 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
-timeout, -sessionTimeout
<Integer> in seconds : Specifies the timeout before the hub 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 is 1800 (30 minutes)
Default: 1800
-unregisterIfStillDownAfter
<Integer> in ms : if the node remains down for more than
[unregisterIfStillDownAfter] ms, it will step attempting to re-register from the hub. Default is 6000
(1 minute)

java.lang.RuntimeException: java.net.BindException: Address already in use: bind
at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.java:128)
at org.openqa.grid.internal.utils.SelfRegisteringRemote.startRemoteServer(SelfRegisteringRemote.java:99)
at org.openqa.grid.selenium.GridLauncherV3$3.launch(GridLauncherV3.java:245)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:85)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.seleniumhq.jetty9.server.ServerConnector.open(ServerConnector.java:321)
at org.seleniumhq.jetty9.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.seleniumhq.jetty9.server.ServerConnector.doStart(ServerConnector.java:236)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.seleniumhq.jetty9.server.Server.doStart(Server.java:366)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.java:126)
... 3 more

M
Replied on 11/08/2016

[quote:3tjkw3ks]java.net.BindException: Address already in use: bind
[/quote:3tjkw3ks]

try using some other address.