Can we have multiple nodes running on same machine

975 views
Skip to first unread message

Naresh

unread,
Jun 14, 2012, 8:09:30 AM6/14/12
to webd...@googlegroups.com
Hello all,

Can we have multiple nodes running on same machine in parallel and hub runnning on different machine?

Thanks,
Naresh

Krishnan Mahadevan

unread,
Jun 14, 2012, 8:53:32 AM6/14/12
to webd...@googlegroups.com
Yes very much possible. In short the following are some valid combos

  • Hub and Node (1 or more instances ) on the same machine.
  • Hub on Machine A and Node (1 or more instances) on Machine B.
  • Hub on Machine A and Node1 (on Machine A), Node 2 (on MachineB)
  • Hub on Machine A and Node1 (on Machine B), Node 2 (on Machine C)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/QPZx1n7ix28J.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

Naresh

unread,
Jun 14, 2012, 10:24:18 AM6/14/12
to webd...@googlegroups.com
Hello Krishnan,

I am getting following this exception when I tried to start 2 nodes on same macchine.

15:16:31.424 INFO - Started HttpContext[/wd,/wd]
15:16:31.425 WARN - Failed to start: SocketL...@0.0.0.0: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:483)
        at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:283)
        at org.openqa.grid.internal.utils.SelfRegisteringRemote.startRemoteServer(SelfRegisteringRemote.java:136)
        at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:72)

And following are the command I am using to start HUB

java -jar selenium-server-standalone-2.22.0.jar -role hub http://10.10.4.153:5555/grid/register


To start Firefox node:

java -jar selenium-server-standalone-2.22.0.jar -role node -hub http://10.10.4.153:4444/grid/register -maxSession 10 -browser browserName=firefox,maxInstances=10

To start IE Node:

java -Dwebdriver.ie.driver="C:\selenium server\IEDriverServer.exe" -jar selenium-server-standalone-2.22.0.jar -role node -hub http://10.10.4.153:4444/grid/register -maxSession 10 -browser "browserName=internet explorer,platform=WINDOWS",maxInstances=10


In the above example, nodes and HUb are on the same machine. I was getting same exception when I tried having HUB on different machine.

Thanks,
Naresh

On Thursday, June 14, 2012 1:53:32 PM UTC+1, Krishnan wrote:
Yes very much possible. In short the following are some valid combos

  • Hub and Node (1 or more instances ) on the same machine.
  • Hub on Machine A and Node (1 or more instances) on Machine B.
  • Hub on Machine A and Node1 (on Machine A), Node 2 (on MachineB)
  • Hub on Machine A and Node1 (on Machine B), Node 2 (on Machine C)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Jun 14, 2012 at 5:39 PM, Naresh <naresh...@gmail.com> wrote:
Hello all,

Can we have multiple nodes running on same machine in parallel and hub runnning on different machine?

Thanks,
Naresh

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/QPZx1n7ix28J.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.

Krishnan Mahadevan

unread,
Jun 14, 2012, 10:26:24 AM6/14/12
to webd...@googlegroups.com
That is because if you dont specify the port number for spawning the node, by default it runs on 5555.
So the second instance of the node is also trying to run on the same 5555 which explains the error.

Add the "-port" arg as below and retry.


java -jar selenium-server-standalone-2.22.0.jar -role hub http://10.10.4.153:5555/grid/register

To start Firefox node:

java -jar selenium-server-standalone-2.22.0.jar -role node -hub http://10.10.4.153:4444/grid/register -maxSession 10 -browser browserName=firefox,maxInstances=10 -port 5555

To start IE Node:

java -Dwebdriver.ie.driver="C:\selenium server\IEDriverServer.exe" -jar selenium-server-standalone-2.22.0.jar -role node -hub http://10.10.4.153:4444/grid/register -maxSession 10 -browser "browserName=internet explorer,platform=WINDOWS",maxInstances=10 -port 5556

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/hap62Yrf1FMJ.

To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.

Naresh

unread,
Jun 14, 2012, 10:39:39 AM6/14/12
to webd...@googlegroups.com
Hello Krishnan,

Thanks for your reply.

I was under wrong impression that, HUB will be listening only on port 5555.

After the making the changes you mentioned, now I am able to start different nodes on same machine.

Thanks,
Naresh

webtester

unread,
Jun 21, 2012, 9:42:11 AM6/21/12
to webd...@googlegroups.com
Hi,

Can we add the ´-Dwebdriver.ie.driver´ parameter to the node config.json file?

That would be much cleaner!


Thank,
R

Krishnan Mahadevan

unread,
Jun 21, 2012, 9:43:46 AM6/21/12
to webd...@googlegroups.com
-D would always stand for a VM argument. I dont think that this particular parameter is something that is associated with the Grid itself, but with the WebDriver node.

So AFAIK you would only have to provide this as a VM argument and it cannot reside within your JSON configuration file.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/XLevJqh9_ywJ.

To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages