0
Problems registering a selenium node on remote host

Solved 1 Answers 1302 Views Selenium
0 1

I was trying to register two nodes - like

I have connected to remote host using Team Viewer : does this allow me to run them?

 

start 1st node on linux:

 

java -jar selenium-server-standalone-2.44.0.jar -role node \

-hub http://localhost:4444/grid/register \

-browser browserName=firefox, platform = LINUX \

-browser browserName=chrome, platform =LINUX

 

Successfully registered (Since this is no my localhost)

 

Start 2nd node on MAC(remote host - in germany)

 

java -jar selenium-server-standalone-2.44.0.jar -role node \

-hub http://<my ip address>:4444/grid/regsiter \

-browser browserName=firefox,platform=MAC \

-browser browserName=chrome,platform=MAC \

-remoteHost <remote ip address>:5556 \

 

I found  remote host ip address by using Teamviewer(ifconfig command - remote host terminal) -

How to register a node on remote host?

Which remote connection software Do I have to use?

like Putty or Chrome Remote Desktop , Team Viewer

 

When I was registering 2nd node on MAC: I am getting this error:

20:36:27.450 INFO - Launching a selenium grid node
20:36:27.509 INFO - Adding browserName=firefox,platform=MAC
20:36:27.509 INFO - Adding browserName=chrome,platform=MAC
20:36:27.832 INFO - Java: Oracle Corporation 24.65-b04
20:36:27.832 INFO - OS: Linux 3.5.0-58-generic amd64
20:36:27.837 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
20:36:27.908 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
20:36:27.935 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
20:36:27.936 INFO - Version Jetty/5.1.x
20:36:27.936 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
20:36:27.937 INFO - Started HttpContext[/selenium-server,/selenium-server]
20:36:27.937 INFO - Started HttpContext[/,/]
20:36:27.942 INFO - Started [email protected]
20:36:27.942 INFO - Started HttpContext[/wd,/wd]
20:36:27.943 WARN - Failed to start: [email protected]:5555
Exception in thread "main" java.net.BindException: Selenium is already running on port 5555. Or some other service is.
    at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:491)
    at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:300)
    at org.openqa.grid.internal.utils.SelfRegisteringRemote.startRemoteServer(SelfRegisteringRemote.java:136)
    at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:115)

 

1 Answer

0
Best answer
0

Hi,

The reason you are getting this problem, because you are running both the node from same machine. So when you start your first node the following port will be used by default

RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub

When you start the second node from same machine using the remoteHost argument, still it will look for same port in the local machine i.e. 5555 and it will give the exception. Check the console log for both the node.

In order to avoid the exception use following command

 java -jar selenium-server-standalone-2.44.0.jar -role node \

-hub http://<my ip address>:4444/grid/regsiter -port 5556 \

-browser browserName=firefox,platform=MAC \

-browser browserName=chrome,platform=MAC \

-remoteHost <remote ip address>:5556 \

But I would recommend you to start the 2nd node from MAC machine not from your machine. You can use putty to connect to remote host but it will give you only command line interface.Use VNC Viewer, if you want to use GUI Interface

answered by
selected by
3Comments
commented by
Hi Rahul,

I getting this error now:  changed error log with :<<Remote Ip>> && <<Hub IP>>

1:34:11.014 INFO - Adding browserName=firefox,platform=MAC
11:34:11.016 INFO - Adding browserName=chrome,platform=MAC


11:35:27.004 WARN - error getting the parameters from the hub. The node may end up with wrong timeouts.Connect to <<Hub  IP>>:80 [/<<Hub IP>>] failed: Operation timed out
11:35:27.028 INFO - Java: Oracle Corporation 23.25-b01
11:35:27.028 INFO - OS: Mac OS X 10.10.2 x86_64
11:35:27.038 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
11:35:27.198 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: MAC
11:35:27.254 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5556/wd/hub
11:35:27.256 INFO - Version Jetty/5.1.x
11:35:27.259 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:35:27.260 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:35:27.261 INFO - Started HttpContext[/,/]
11:35:27.294 INFO - Started [email protected]
11:35:27.295 INFO - Started HttpContext[/wd,/wd]
11:35:27.299 INFO - Started SocketListener on 0.0.0.0:5556
11:35:27.299 INFO - Started [email protected]
11:35:27.346 INFO - using the json request : {"class":"org.openqa.grid.common.RegistrationRequest","configuration":{"register":true,"port":5556,"host":"<<HubIp>>","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","browser":"browserName\u003dfirefox,platform\u003dMAC","maxSession":5,"role":"node","hubHost":"<<Hub IP>>","registerCycle":5000,"hub":"http://<<Hub IP>>","hubPort":-1,"url":"http://<<Remote IP>>:5556","remoteHost":"http://192.168.178.24:5556"},"capabilities":[{"seleniumProtocol":"WebDriver","platform":"MAC","browserName":"firefox"},{"seleniumProtocol":"WebDriver","platform":"MAC","browserName":"chrome"}]}
11:35:27.347 INFO - Starting auto register thread. Will try to register every 5000 ms.
11:35:27.347 INFO - Registering the node to hub :http://<<Remote IP>>:-1/grid/register
11:36:43.151 INFO - couldn't register this node : Error sending the registration request
asked Feb 24, 2015 by anonymous
recategorized Sep 9, 2015 by
Getting a Connection Timed Out Exceptions on Selenium Remote Node
commented by
Try this command

java -jar selenium-server-standalone-2.44.0.jar -role node -port 5557 http://<hub machine ip>:4444/grid/register -hubHost <hub machine ip> -host <remoteHost ip>

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...