Selenium Grid 3.4.0 node cannot connect hub

i have selenium-server-standalone-3.4.0.jar installed and run the following command (as hube) on my machine A:

java -jar selenium-server-standalone-3.4.0.jar -role hub

      

successful.

then on my machine B (as node) run the following command:

java -jar selenium-server-standalone-3.4.0.jar -role node -hub http://192.168.1.27:4444/grid/register

      

after creating the logs. As you can see, it is registered first, so it is not registered. How is this possible?

> 11:35:29.561 INFO - Selenium build info: version: '3.4.0', revision: 'unknown'
> 11:35:29.562 INFO - Launching a Selenium Grid node
> 11:35:30.353 WARN - error getting the parameters from the hub. The node may end up with wrong timeouts.com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $
> 2017-07-23 11:35:30.417:INFO::main: Logging initialized @1343ms to org.seleniumhq.jetty9.util.log.StdErrLog
> 11:35:30.568 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
 registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
> 11:35:30.568 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
 registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
> 11:35:30.572 INFO - Driver class not found: com.opera.core.systems.OperaDriver
> 11:35:30.572 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
> 11:35:30.573 INFO - Driver class not found: com.opera.core.systems.OperaDriver
> 11:35:30.575 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
> 11:35:30.585 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 LINUX
> 2017-07-23 11:35:30.729:INFO:osjs.Server:main: jetty-9.4.3.v20170317
> 2017-07-23 11:35:30.828:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@70be0a2b{/,null,AVAILABLE}
> 2017-07-23 11:35:30.899:INFO:osjs.AbstractConnector:main: Started ServerConnector@29176cc1{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
> 2017-07-23 11:35:30.900:INFO:osjs.Server:main: Started @1827ms

> 11:35:30.900 INFO - Selenium Grid node is up and ready to register to the hub

> 11:35:31.017 INFO - Starting auto registration thread. Will try to register every 5000 ms.

> 11:35:31.017 INFO - Registering the node to the hub: http://192.168.1.27:4444/grid/register

> 11:35:31.062 INFO - The node is registered to the hub and ready to use

> 11:35:36.095 INFO - Couldn't register this node: The hub is down or not responding: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $

> 11:35:41.123 INFO - Couldn't register this node: The hub is down or not responding: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $

> 11:35:46.135 INFO - Couldn't register this node: The hub is down or not responding: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $

      

+3


source to share


3 answers


Here is the answer to your question:

Assuming your requirement is to run the default port and default , we need to configure and run them as follows: Selenium Grid Hub

4444

Selenium Grid Node

5555



  • Start the Selenium Grid Hub:

    java -jar selenium-server-standalone-3.4.0.jar -role hub
    
          

  • The following logs confirm that your Selenium Grid Hub is working correctly:

    2017-07-24 15:31:46.139:INFO:osjs.Server:main: Started @2757ms
    15:31:46.140 INFO - Nodes should register to http://192.168.0.107:4444/grid/register/
    15:31:46.140 INFO - Selenium Grid hub is up and running
    
          

  • Accessing the selenium grid console via url:

    http://localhost:4444/grid/console
    
          

  • Run Selenium Mesh Node:

    java -jar selenium-server-standalone-3.4.0.jar -role node -hub http://<IP_GRID_HUB>:4444/grid/register
    
          

    I used localhost

    , so I used:

    java -jar selenium-server-standalone-3.4.0.jar -role node -hub http://localhost:4444/grid/register
    
          

  • The following logs confirm that your Node selenium grid is working correctly:

    15:35:44.939 INFO - Selenium Grid node is up and ready to register to the hub
    15:35:44.958 INFO - Starting auto registration thread. Will try to register every 5000 ms.
    15:35:44.958 INFO - Registering the node to the hub: http://localhost:4444/grid/register
    15:35:45.231 INFO - The node is registered to the hub and ready to use
    
          

  • Accessing the Selenium Grid Console via the Console URL to see the registered Node:

    http://localhost:4444/grid/console
    
          

Let me know if this answers your question.

+1


source


I managed to fix this issue by updating the chrome version to the latest (60) and the chrome rib version to the latest.

It finally started working when I updated the hub side chrome gear version.

When I have some time, I will switch to seleniumGridExtra , which should be versioning automatically.



My work log: 8/3/2017, 10:11:03 am Still trying to run selenium on a hub / node setup. It stopped 17 hours ago.

Updating all files.

Latest chrome firefox and IE drivers.
Latest selenium version
Update chrome
rebooted machine
Updated chromeDriver on the hub..which seems silly.
  Suddenly working fine.
  Lessons learned: 
    Switch to selenium grid extras. They handle the version dependencies.

      

0


source


I'm new to this, but here's what works for me. I run hub and node from the same machine, I start hub and node from window batch file. I start the hub first and make sure to leave the window open, and then I start the mesh. I haven't had a connection problem since I started doing this

0


source







All Articles