Connection refused when phantomjs is run on different machine than selenium hub -


is possible have selenium hub on 1 machine , instance of phantomjs on different computer connects hub in same manner selenium node?

if start selenum hub , instance of phantomjs on same machine, can run tests.

if start selenium hub , start selenium node different machine , run test firefox, test executed successfully.

if start selenium hub , instance of phantomjs on different machine, phantomjs connect hub refuses connection when hub tries send test.

every example of phantomjs instance connecting selenium hub i've found shows phantomjs instance running on same machine hub.

basic environment info###:

  • both machines running debian jessie
  • selenium-server-standalone-2.39.0.jar
  • phantomjs version 1.9.7
  • using python , nose

scenarios , startup commands###:

hub , phantomjs on same machine successfully executes tests

java -jar selenium-server-standalone-2.39.0.jar -role hub -timeout=50 -browsertimeout=60 -ensurecleansession phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://localhost:4444 

hub , node on different machine successfully executes tests firefox

java -jar selenium-server-standalone-2.39.0.jar -role hub -timeout=50 -browsertimeout=60 -ensurecleansession java -jar selenium-server-standalone-2.39.0.jar -role node -hub http://10.3.1.120:4444/grid/register -port 8080 -maxsessions=1 

hub , phantomjs on different machines fails execute tests

java -jar selenium-server-standalone-2.39.0.jar -role hub -timeout=50 -browsertimeout=60 -ensurecleansession phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://10.3.1.120:4444 
  • server output

    mar 10, 2014 12:19:57 pm org.openqa.grid.selenium.proxy.defaultremoteproxy isalive warning: failed check status of node: connection refused 
  • phantomjs output

    phantomjs launching ghostdriver... [info  - 2014-03-10t16:15:46.149z] ghostdriver - main - running on port 8080 [info  - 2014-03-10t16:15:46.150z] ghostdriver - main - registering selenium hub 'http://10.3.1.120:4444' using '127.0.0.1:8080' [info  - 2014-03-10t16:15:46.198z] hub register - register - registered grid hub: http://10.3.1.120:4444/ (ok) 

add ip address webdriver parameter along port number. should resolve issue. ex -

phantomjs --webdriver-selenium-grid-hub=http://<remote_ip_of_grid_hub>:4444 --webdriver=<ip_of_the_local_node>:9301 

basically, if no ip mentioned in "--webdriver" param, node value sent localhost. hub looks requests on localhost port 9301. since port 9301 not open on hub, connection drops & see error.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -