Node is not accessible from hub in selenium grid - selenium

I just started the hub on my local machine using the following command.
java -jar selenium-server-standalone-3.12.0.jar -role hub
it started successfully, then I have tried to connect a node to another machine using the following command.
java -Dwebdriver.chrome.driver=d:\sel\new\chromedriver.exe -jar selenium-server-standalone-3.12.0.jar -role node -port 5566 -hub http://"HUbip":4444/grid/register
it has shown me The node is registered to the hub and ready to use in the console.
but when I opened Http://"HUbip":4444/grid/console it has shown the IP and 5 chrome browser, 5 Firefox, 1 internet explorer logos. But at the top of that, the text has shown like "DefaultRemoteProxy unknown version, Failed to connect to Ip of the node".
so when I have tried to run the test I am getting an error like "Could not start a new session. Possible causes are the invalid address of the remote server or browser start-up failure.
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:03.216Z'".
I have already switched off both machine's firewall. and tried to telnet from the node to hub, it was a success.
I am unable to rectify the issue. someone, please suggest a solution.

Add in Selenium Grid Extras which can help you with the management of Selenium Grid like :
Restart the node/hub
Clear session
Recommends the defaults for the ports
You'll need to run the setup on the hub and node:
java -jar SeleniumGridExtras-*.*.*-SNAPSHOT-jar-with-dependencies.jar
Note: You're not using the standard port for the node 5555.

Related

selenium grid: can't connect to hub and node

I encounter some problems to set up a selenium grid. Yet I tried to refer to the instructions of several tutorials.
I placed the selenium server in a particular folder. I open 2 terminals from this folder.
In one I enter the following command
java -jar selenium-server-4.1.1.jar -role hub
I get the following answer:
In the second one:
java -jar selenium-server-4.1.jar -role node -hub http://localhost:4444
I get the following answer:
my configuration:
Lenovo terra
Linux Ubuntu 20.04
usual chrome browser
selenium server 4.1.1
I saw the same thing on several tutorials. What am I missing?
I finally solve the problem, the correct command is:
java -jar selenium-server-<your version>.jar standalone

Unable to connect Selenium 3.12.0 Grid Node to the Grid Hub

I have my hub running on my Windows 10 machine, which is also the VirtualBox host. I am running an OS X High Sierra VirtualBox as the node.
When I try to register the node with this command:
java -Dwebdriver.firefox.driver=/Users/jlott/Desktop/geckodriver -jar /etc/selenium-server-standalone-3.12.0.jar -role node -hub http://10.195.0.159:4444/grid/register
I get the following error:
node error
Thank you in advance for any help.
While working with Selenium Client 3.x, GeckoDriver 0.20.1 and Firefox Quantum v60.0.2 to start the Selenium Grid Node you need to use the following commans:
java -Dwebdriver.gecko.driver=<absolute_path>/geckodriver -jar /etc/selenium-server-standalone-3.12.0.jar -role node -hub http://10.195.0.159:4444/grid/register
Ok, I figured out what was preventing the connection. I needed to add a firewall exception for the tcp port I am using in the Windows Firewall settings. Once I added this, the node connected successfully.

Selenium remotewebdriver stuck before launching browser

I'm trying to launch Firefox remotely on a windows machine from UNIX box using remotewebdriver I am also starting the selenium node remotely using ssh(It starts fine) using Cygwin and OpenSSH.
(I've installed firefox in the path c:\cygwin64\home\Administrator\firefox)
I am launching the grid node using:
java -jar selenium-server-standalone-2.53.0.jar -role node -hub http://HUB_IP:4444/grid/register -port 5566 -Dwebdriver.gecko.driver=geckodriver.exe -Dwebdriver.firefox.bin="firefox/firefox.exe"
However, the execution gets stcuk at:
1486534648695 mozprofile::profile INFO Using profile path C:\cygwin64\tmp\rust_mozprofile.lpsQghom5pxe
1486534648699 geckodriver::marionette INFO Starting browser C:\cygwin64\home\Administrator\firefox\firefox.exe
1486534648719 geckodriver::marionette INFO Connecting to Marionette on localhost:57059
1486534650177 Marionette INFO Listening on port 57059
I can see the firefox process starts but browser does not launch and gets stuck.(Tried the same for chrome, getting the same issue)
After waiting for a long time, node throws exception:,
A coding exception was thrown and uncaught in a Task.
Full message: TypeError: NetworkError when attempting to fetch resource.
Full stack:
EDIT:
I cannot launch Firefox/Chrome from Cygwin when I manually go to the installation path and give the command firefox.exe. This gets stuck as well but a process is started. This occurs only when I use a remote connection. Though, using Cygwin locally launches the browsers.
Is there a way to enable this?

Grid hub and node - Unable to register the node in different machine

I am trying to install Selenium Grid - hub in one machine(windows 10) and node(windows 8.1 physical device) in different machine. I am able to successfully register the hub, but stuck in node registering. I used java -jar C:\selenium-server-standalone-3.0.0.jar -role node -hub http://192.168.56.1:4444/grid/register -port 5555. Getting error: couldnt register the node: the hub is down or not responding. I tried webdriver instead of node, still no luck. Any help will be much appreciated. Thanks

How to run selenium server sessions on different xvfb screens?

My problem is how to get an isolated video streams from SeleniumServer browser instances. Let me explain.
I have Selenium Server hub running at Ubuntu Server machine and the Selenium Server node running at the same server so I use the 'headless' Selenium mode using xvfb. I run the nodes like this: DISPLAY=:99 java -jar selenium-server-standalone.jar -role node -hub http://localhost:4444/grid/register
Then I wanna get video streams of the tests running there so I installed the x11server connected to the xvfb virtual display and after that I can to connect those remote server using VNC and I see my tests processing. The trouble is that all browser instances inside the node rendered at the same virtual display (#99) and when I need running several tests at the same time, I see many browser instances overlaying one by one. But I wanna record the error tests video streams so I can't do this. So I need to have probability to connect to every browser virtual display apart.
I think I can solve this problem by tuning the xvfb server somehow to force it to create isolated virtual display or screen (xvfb has multiscreen support, hasn't it?) for every client (browser instance in my case). But I have tried to do this and I have not get a result. Also I can use another virtual display (not xvfb) if it's necessary to solve this.
Please, help me to get isolated video streams from every browser instance :) Thanks a lot and sorry about my English.
With the selenium hub, you can add the browsers in separately in their own Xvfb sessions
java -jar selenium-server-standalone-2.33.0.jar -role hub&
then connect each browser separately in its own Xvfb session, DISPLAY and port
export DISPLAY=:11
Xvfb :11 -screen 0 1024x768x16 &
java -jar selenium-server-standalone-2.33.0.jar \
-role node \
-port 4441
-hub http://localhost:4444/grid/register \
-browser "browserName=firefox,version=19,maxInstances=5"&
For this kind of use, you could typically use the xvfb-run command (which can select automatically a display, but it can be configured)
Then you can create a firefox start script that would do xvfb-run firefox that you could use as the selenium firefox start command (specified as a FirefoxBinary)