Configuration of Grid using Json file | Selenium Forum
M
Posted on 23/03/2016
hi Ashish

I have made json files, however for some reason when I start the hub Node is automatically registered.

I have checked all files but could not find any problems.

Thanks for you help

Here are the commands and the json files

java -Dwebdriver.chrome.driver=C:\Software\chromedriver.exe -Dwebdriver.ie.driver=C:\Software\IEDriverServer.exe -jar
selenium-server-standalone-2.53.0.jar -role hub -hubConfig hub.json

java -Dwebdriver.chrome.driver=C:\Software\chromedriver.exe -Dwebdriver.ie.driver=C:\Software\IEDriverServer.exe -jar
selenium-server-standalone-2.53.0.jar -role webdriver -nodeConfig node1.json

java -Dwebdriver.chrome.driver=C:\Software\chromedriver.exe -Dwebdriver.ie.driver=C:\Software\IEDriverServer.exe -jar
selenium-server-standalone-2.53.0.jar -role webdriver -nodeConfig node2.json

________________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
}
____________________________node1.json___________________
{
"capabilities":
[
{
"browserName":"firefox",
"maxInstances":2
},
{
"browserName":"chrome",
"maxInstances":1
}

],
"configuration":
{
"nodeTimeout":120,
"port":5555,

"hubPort":4444,
"hubHost":"localhost",

"nodePolling":2000,

"registerCycle":10000,
"register":true,
"cleanUpCycle":2000,
"timeout":30000,
"maxSession":5
}
}
_______________________________node2.json_________________________

{
"capabilities":
[

{
"browserName": "chrome",
"maxInstances": 1
},
{
"browserName": "firefox",
"maxInstances": 1
}

],
"configuration":
{
"nodeTimeout":120,
"port":5556,

"hubPort":4444,
"hubHost":"localhost",

"nodePolling":2000,

"registerCycle":10000,
"register":true,
"cleanUpCycle":2000,
"timeout":30000,
"maxSession":5
}
}

M
Replied on 28/03/2016

hi Ashish

Can we please check the error in the json configuration file.

Regards


M
Replied on 29/03/2016

i don't see any problem.


M
Replied on 29/03/2016

Is this running fine on your PC without giving you any problems?

Please execute the file on your PC, with the supplied Json files.

I am still facing the problem that when I start hub on a command prompt, it automatically registers a node in the same command prompt.

Thanks for your help and support


M
Replied on 29/03/2016

i'm not able to understand the problem?


M
Replied on 29/03/2016

[quote:3k06ig5q]I am still facing the problem that when I start hub on a command prompt, it automatically registers a node in the same command prompt.[/quote:3k06ig5q]

how? send some more screen shot.