How to fix this Selenium Error: bind() failed: Cannot assign requested address (99) - selenium

I've installed the latest version of selenium via Docker:
docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:latest
and then ran this in my python console:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.Remote("http://127.0.0.1:4444/wd/hub", DesiredCapabilities.CHROME)
and finally checked the docker logs:
2019-04-24 19:09:26,880 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2019-04-24 19:09:26,881 INFO supervisord started with pid 8
2019-04-24 19:09:27,865 INFO spawned: 'xvfb' with pid 11
2019-04-24 19:09:27,867 INFO spawned: 'selenium-standalone' with pid 12
19:09:28.038 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
2019-04-24 19:09:28,039 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2019-04-24 19:09:28,039 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
19:09:28.093 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2019-04-24 19:09:28.126:INFO::main: Logging initialized #247ms to org.seleniumhq.jetty9.util.log.StdErrLog
19:09:28.289 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
19:09:28.349 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
19:09:43.631 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "chrome",
"version": ""
}
19:09:43.633 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729#{#29}) on port 22103
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1556132983.659][SEVERE]: bind() failed: Cannot assign requested address (99)
19:09:44.266 INFO [ProtocolHandshake.createSession] - Detected dialect: OSS
19:09:44.490 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session cedc7067c0133f6492ff65dda5c7dd88 (org.openqa.selenium.chrome.ChromeDriverService)
In particular, I'm unsure of how to fix this error:
[1556132983.659][SEVERE]: bind() failed: Cannot assign requested address (99)
I'm running this on my macbook pro using Mojave with the latest version of docker, python, and selenium. I also tried using other ports aside from 4444, same result. Thanks!

We have seen that entry in the logs for a long time, however, there is no evidence it affects your tests. The message comes directly from ChromeDriver/Chrome. It is safe to ignore it.

Related

Failed to connect Couldn't register this node: Error sending the registration request: Failed to connect while registering SeleniumGrid Node to Hub

Selenium hub is up and running on Windows desktop, set up Windows VM to be node. Node won't register to hub.
Step 1:
Entered command in Windows Desktop:
java -jar selenium-server-standalone-3.14.0.jar -role hub -port 2222
Output:
`11:11:24.171 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0'
11:11:24.175 INFO [GridLauncherV3$2.launch] - Launching Selenium Grid hub on port 2222
11:11:25.108:INFO::main: Logging initialized #2242ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:11:26.832 INFO [Hub.start] - Selenium Grid hub is up and running
11:11:26.832 INFO [Hub.start] - Nodes should register to http://172.20.111.25:2222/grid/register/
11:11:26.832 INFO [Hub.start] - Clients should connect to http://172.20.111.25:2222/wd/hub`
Checked the config page on localhost and saw that it was there.
Step 2:
Entered this into the command line in Windows Virtual Machine:
java -jar selenium-server-standalone-3.14.0.jar -role node -hub http://172.20.111.25:2222/grid/register
Output:
10:18:43.108 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0'
10:18:43.155 INFO [GridLauncherV3$3.launch] - Launching a Selenium Grid node on port 18004
2019-06-03 10:18:43.676:INFO::main: Logging initialized #1482ms to org.seleniumhq.jetty9.util.log.StdErrLog
10:18:44.108 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 18004
10:18:44.108 INFO [GridLauncherV3$3.launch] - Selenium Grid node is up and ready to register to the hub
10:18:44.280 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
10:18:44.280 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://172.20.111.25:2222/grid/register
10:19:06.003 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: Error sending the registration request: Failed to connect to /172.20.111.25:2222
You were almost there. You need to remove the additional forward slash (i.e. /) at the end of the registration uri while registering the Selenium Grid Node and you can use the following steps:
First of all, to start the Selenium Grid Hub on port 2222 you need to issue the following command:
java -jar selenium-server-standalone-3.14.0.jar -role hub -port 2222
You will find the following logs generated:
16:00:50.746 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0'
16:00:50.750 INFO [GridLauncherV3$2.launch] - Launching Selenium Grid hub on port 2222
2019-05-31 16:00:51.392:INFO::main: Logging initialized #1151ms to org.seleniumhq.jetty9.util.log.StdErrLog
16:00:52.139 INFO [Hub.start] - Selenium Grid hub is up and running
16:00:52.141 INFO [Hub.start] - Nodes should register to http://192.168.1.125:2222/grid/register/
16:00:52.141 INFO [Hub.start] - Clients should connect to http://192.168.1.125:2222/wd/hub
Now you can access the Selenium Grid Console through the URL:
http://localhost:2222/grid/console
The console will look like:
Now finally to start the Selenium Grid Node you have to issue the following command:
java -jar selenium-server-standalone-3.14.0.jar -role node -hub http://192.168.1.125:2222/grid/register
You will find the following logs generated:
16:04:48.440 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0'
16:04:48.470 INFO [GridLauncherV3$3.launch] - Launching a Selenium Grid node onport 7724
2019-05-31 16:04:48.985:INFO::main: Logging initialized #1059ms to org.seleniumhq.jetty9.util.log.StdErrLog
16:04:49.275 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 7724
16:04:49.275 INFO [GridLauncherV3$3.launch] - Selenium Grid node is up and ready to register to the hub
16:04:49.454 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
16:04:49.454 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://192.168.1.125:2222/grid/register
16:04:50.355 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
I would suggest to go through the steps mentioned below through which I am successfully able to resolve that issue.
Login to other machine and register it as a node.
Ping IP from both the machines to check whether you're on a same network.
Verify that Windows Defender Firewall should be off to ping machine when you're trying on a same network.
In Node Machine , Download standalone jar and paste in some directory and open cmd from that directory .
Verify whether you're able to check URL in Node machine
Ex: URL : http://xx.xx.xx.xx:4444/grid/console
Run the command :
java -Dwebdriver.chrome.driver="C:\chromedriver.exe" -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://xx.xx.xx.xx:4444/grid/register -port 5566
Okay, I believe I fixed this error.
So I started the hub from my desktop: 172.17.248.33
and then I tried to connect the node from my virtual machine: 173.248.137.73 back to my desktop 172.17.248.33.
I knew beforehand that when I started the hub from my desktop and then ran a node on my desktop it would connect.
However, I was under the impression I could start the hub in my desktop 172.17.248.33 and then have my VM node 173.248.137.73 connected to the hub desktop. I am guessing this is not possible with Selenium.
Once I started the hub from my virtual machine and initiated the node command from the same machine, it worked.

'Unable to create new session.' error using selenium-server-standalone-3.9.1.jar with ChromeDriver and Chrome

For the past few days, I was running tests using Selenium WebDriver with no issues. However, even though I didn't change anything in the code or my system, the last few times I tried to create a new browser session, I always get the following error:
Link
This happens regardless of whether I try to create a session through code, or manually through the browser.
This is the result of running the Selenium server and three tests:
$ java -jar selenium-server-standalone-3.9.1.jar
05:54:58.659 INFO - Selenium build info: version: '3.9.1', revision: '63f7b50'
05:54:58.660 INFO - Launching a standalone Selenium Server on port 4444
2019-04-18 05:54:58.754:INFO::main: Logging initialized #269ms to org.seleniumhq.jetty9.util.log.StdErrLog
2019-04-18 05:54:58.821:INFO:osjs.Server:main: jetty-9.4.7.v20170914, build timestamp: 2017-11-21T22:27:37+01:00, git hash: 82b8fb23f757335bb3329d540ce37a2a2615f0a8
2019-04-18 05:54:58.840:WARN:osjs.SecurityHandler:main: ServletContext#o.s.j.s.ServletContextHandler#65d6b83b{/,null,STARTING} has uncovered http methods for path: /
2019-04-18 05:54:58.843:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#65d6b83b{/,null,AVAILABLE}
2019-04-18 05:54:58.859:INFO:osjs.AbstractConnector:main: Started ServerConnector#1de74ecb{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2019-04-18 05:54:58.859:INFO:osjs.Server:main: Started #374ms
05:54:58.859 INFO - Selenium Server is up and running on port 4444
2019-04-18 05:55:04.002:INFO:osjshC.ROOT:qtp527446182-17: org.openqa.selenium.remote.server.WebDriverServlet-57175e74: Initialising WebDriverServlet
05:55:04.110 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.Status#4d5a702a
05:55:04.114 INFO - /status: Executing GET on /status (handler: Status)
05:55:04.178 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.GetAllSessions#3026be33
05:55:04.178 INFO - /sessions: Executing GET on /sessions (handler: GetAllSessions)
05:55:09.248 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#48e79260
05:55:09.249 INFO - /session: Executing POST on /session (handler: BeginSession)
05:55:09.333 INFO - Capabilities are: Capabilities {browserName: chrome}
05:55:09.334 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 27011
Only local connections are allowed.
05:55:09.788 INFO - Detected dialect: OSS
06:01:50.907 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#79d0ad1d
06:01:50.907 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#1ff85274
06:01:50.907 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#2d87d7a2
06:01:50.908 INFO - /session: Executing POST on /session (handler: BeginSession)
06:01:50.908 INFO - /session: Executing POST on /session (handler: BeginSession)
06:01:50.908 INFO - /session: Executing POST on /session (handler: BeginSession)
06:01:50.912 INFO - Capabilities are: Capabilities {browserName: chrome}
06:01:50.912 INFO - Capabilities are: Capabilities {browserName: chrome}
06:01:50.912 INFO - Capabilities are: Capabilities {browserName: chrome}
06:01:50.912 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
06:01:50.912 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
06:01:50.912 INFO - Capabilities {browserName: chrome} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 29789
Only local connections are allowed.
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 32366
Only local connections are allowed.
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 15121
Only local connections are allowed.
06:01:51.271 INFO - Detected dialect: OSS
06:01:51.335 INFO - Detected dialect: OSS
06:01:51.449 INFO - Detected dialect: OSS
I've tried downgrading, reinstalling everything, but nothing seems to work.
What I'm using:
Ubuntu 18.04
Selenium Java Server 3.9.1
Chrome 73
Chrome Driver 74
Also, oddly enough, my colleague who similarly is working on Selenium with me, is now running into the exact same issue on their own system.
This error message...
Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 15121
Only local connections are allowed.
06:01:51.271 INFO - Detected dialect: OSS
...implies that your ChromeDriver version is chromedriver=2.41
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.41
Release Notes of chromedriver=2.41 clearly mentions the following :
Supports Chrome v67-69
Presumably you are using the latest GAed chrome=73.0
Release Notes of ChromeDriver v2.46 clearly mentions the following :
Supports Chrome v71-73
So there is a clear mismatch between ChromeDriver v2.41 and the Chrome Browser v73.0
Solution
Upgrade ChromeDriver to current ChromeDriver v2.46 level.
Keep Chrome version between Chrome v71-73 levels. (as per ChromeDriver v2.46 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Execute your #Test.

selenium server standalone: unable to create a new session with vagrant in headless mode

I am trying to run the selenium server standalone in a vagrant box, with the following command:
java -jar selenium-server-standalone-3.13.0.jar
When I click the 'create session' button at http://lab.local:4444/wd/hub/static/resource/hub.html from my host web browser. I get a unable to create a new session error message.
I ask to create a firefox browser session for which I get the driver located in /usr/local/bin/geckodriver.
Firefox has been installed on the vagrant box with sudo apt install firefox-esr.
Error log detail:
14:52:04.485 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.13.0', revision: '2f0d292'
14:52:04.486 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
2018-08-09 14:52:04.564:INFO::main: Logging initialized #312ms to org.seleniumhq.jetty9.util.log.StdErrLog
14:52:04.757 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
14:52:15.563 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "firefox"
}
14:52:15.568 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
1533819135611 geckodriver INFO geckodriver 0.21.0
1533819135614 geckodriver INFO Listening on 127.0.0.1:25541
1533819135880 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.yuusnpGo8Gw6"
1533819136508 Marionette INFO Listening on port 2828
When I run the same executable directly from my host, I get no error and the firefox session is created with success.
I try to run a X server, Xvfb as follow but this does not change anything:
Xvfb :1 -screen 0 1600x1200x16 &
export DISPLAY=:1
java -jar selenium-server-standalone-3.13.0.jar
Problem solved after switching to selenium-server-standalone-3.3.1.jar with geckodriver 0.14.0. Sessions are created with success with this configuration.
source.

Headless Chrome Circle CI - Error: spawn /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/bin/java ENOENT

I am trying to run tests in Circle CI in headless chrome.
I am using selenium server version 3.8.1 and chromedriver version 2.34
protractor_conf.js consists of chrome capabilities as:
var chromeCapabilities = {
browserName: 'chrome',
chromeOptions: {  
args: [
'headless','--show-fps-counter=false', '--remote-debugging-port=2222', '--disable-gpu'
]
}
}
My sh script includes following commands for webdriver-manager and then running tests:
./node_modules/protractor/bin/webdriver-manager clean
./node_modules/protractor/bin/webdriver-manager update --gecko false --versions.standalone 3.8.1 --versions.chrome 2.34
./node_modules/protractor/bin/webdriver-manager start &
echo "*** Run script for e2e tests"
gulp e2e
I added these in m circle.yml to install latest version of stable chrome and launched headless listening to localhost:
dependencies:
post:
# Install the latest Chrome
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome.deb
- sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome
- rm google-chrome.deb
before_install:
- google-chrome --headless --remote-debugging-port=2222 --disable-gpu http://localhost &
So, when I run my build now, the tests don't run at all. Logs say:
** Updating webdriver **
[05:46:11] W/file_manager - path does not exist
/home/ubuntu/pharma/test/node_modules/protractor/node_modules/webdriver-
manager/selenium
[05:46:11] I/file_manager - creating folder
/home/ubuntu/pharma/test/node_modules/protractor/node_modules/webdriver-
manager/selenium
[05:46:12] I/update - chromedriver: unzipping chromedriver_2.34.zip
[05:46:12] I/update - chromedriver: setting permissions to 0755 for
/home/ubuntu/pharma/test/node_modules/protractor/node_modules/webdriver-
manager/selenium/chromedriver_2.34
[05:46:13] I/start - java -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/home/ubuntu/pharma/test/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.34 -jar /home/ubuntu/pharma/test/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.8.1.jar -port 4444
[05:46:13] I/start - seleniumProcess.pid: 24198
05:46:13.642 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b'
05:46:13.643 INFO - Launching a standalone Selenium Server
2018-01-12 05:46:13.740:INFO::main: Logging initialized #385ms to org.seleniumhq.jetty9.util.log.StdErrLog
05:46:13.781 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
05:46:13.799 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
05:46:13.801 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
05:46:13.803 INFO - Driver class not found: com.opera.core.systems.OperaDriver
05:46:13.803 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
05:46:13.803 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
05:46:13.804 INFO - Driver class not found: org.openqa.selenium.phantomjs.PhantomJSDriver
05:46:13.845 INFO - Driver provider class org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities {browserName: internet explorer, ensureCleanSession: true, platform: WINDOWS, version: } does not match the current platform LINUX
05:46:13.845 INFO - Driver provider class org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities {browserName: MicrosoftEdge, platform: WINDOWS, version: } does not match the current platform LINUX
05:46:13.846 INFO - Driver provider class org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities {browserName: safari, platform: MAC, version: } does not match the current platform LINUX
05:46:13.891 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
05:46:13.892 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
05:46:13.892 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
05:46:13.893 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
05:46:13.893 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
05:46:13.902 INFO - Using the passthrough mode handler
2018-01-12 05:46:13.932:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-01-12 05:46:13.970:WARN:osjs.SecurityHandler:main: ServletContext#o.s.j.s.ServletContextHandler#2db7a79b{/,null,STARTING} has uncovered http methods for path: /
2018-01-12 05:46:13.978:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#2db7a79b{/,null,AVAILABLE}
2018-01-12 05:46:13.998:INFO:osjs.AbstractConnector:main: Started ServerConnector#67b467e9{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2018-01-12 05:46:13.999:INFO:osjs.Server:main: Started #644ms
05:46:13.999 INFO - Selenium Server is up and running
[07:02:53] Using gulpfile ~/pharma/test/gulpfile.babel.js
[07:02:53] Starting 'set-envVars'...
[07:02:53] Finished 'set-envVars' after 245 μs
[07:02:53] Starting 'set-directories'...
[07:02:53] Finished 'set-directories' after 428 μs
[07:02:53] Starting 'e2e'...
--> Running tests using command: ./node_modules/.bin/protractor ./protractor_e2e_conf.js
Logger: Output file - /home/ubuntu/pharma/test/output/e2e/logs/console.log
[07:02:54] [INFO] Report destination: /home/ubuntu/pharma/test/output/e2e/logs/e2eTests.html
[07:02:54] [INFO] [07:02:54] I/launcher - Running 1 instances of WebDriver
[07:02:55] [INFO] [07:02:55] I/testLogger -
------------------------------------
[07:02:55] [INFO] [07:02:55] I/testLogger - [Chrome] PID: 24232
[Chrome] Specs: /home/ubuntu/pharma/test/e2e/spec/targeting/data_upload/uploadAccount_spec.js
[Chrome]
[Chrome] Logger: Output file - /home/ubuntu/pharma/test/output/e2e/logs/console.log
[Chrome] [07:02:55] [INFO] [07:02:55] I/local - Starting selenium standalone server...
[Chrome] events.js:160
[Chrome] throw er; // Unhandled 'error' event
[Chrome] ^
[Chrome]
[Chrome] Error: spawn /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/bin/java ENOENT
[Chrome] at exports._errnoException (util.js:1018:11)
[Chrome] at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
[Chrome] at onErrorNT (internal/child_process.js:367:16)
[Chrome] at _combinedTickCallback (internal/process/next_tick.js:80:11)
[Chrome] at process._tickCallback (internal/process/next_tick.js:104:9)
Versions used:
Chrome browser version: Google Chrome 63.0.3239.132
Protractor:v5.2.2
Chromedriver zip: 2.34
Selenium standalone: 3.8.1
Circle CI: 1.0
What am I missing?
Any help would be appreciated.
Solution:
The default java version installed on circle ci is 1.7. I forced it to install 1.8 jdk:
Went to circle ci build test commands and used: java --version command to check java version installed. Got v1.7 form there.
Then, I modified my Dockerfile to use jdk 8 by using: FROM openjdk:8
This would overwrite the v1.7 installed and force use 1.8 which solved my problem.

Setting up Selenium Grid - A Second Node on MAC -Registration Failure

Tried to setup a Selenium node on Mac using:
java -jar selenium-server-standalone-2.44.0.jar -role node \
-hub http://<<Hub Ip>> :4444/grid/regsiter -port 5557 \
-browser browserName=firefox,platform=MAC \
-remoteHost http://<<Remote Ip>>:5557
Error:
11:34:11.014 INFO - Adding browserName=firefox,platform=MAC
11:34:11.016 INFO - Adding browserName=chrome,platform=MAC
11:35:27.004 WARN - error getting the parameters from the hub. The
node may end up with wrong timeouts.Connect to Hub IP:80 [/Hub
IP] failed: Operation timed out 11:35:27.028 INFO - Java: Oracle
Corporation 23.25-b01 11:35:27.028 INFO - OS: Mac OS X 10.10.2 x86_64
11:35:27.038 INFO - v2.44.0, with Core v2.44.0. Built from revision
76d78cf 11:35:27.198 INFO - Default driver
org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{platform=WINDOWS,
ensureCleanSession=true, browserName=internet explorer, version=}]
does not match with current platform: MAC 11:35:27.254 INFO -
RemoteWebDriver instances should connect to:
http://127.0.0.1:5556/wd/hub 11:35:27.256 INFO - Version Jetty/5.1.x
11:35:27.259 INFO - Started
HttpContext[/selenium-server/driver,/selenium-server/driver]
11:35:27.260 INFO - Started
HttpContext[/selenium-server,/selenium-server] 11:35:27.261 INFO -
Started HttpContext[/,/] 11:35:27.294 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler#5f6b70e1 11:35:27.295
INFO - Started HttpContext[/wd,/wd] 11:35:27.299 INFO - Started
SocketListener on 0.0.0.0:5556 11:35:27.299 INFO - Started
org.openqa.jetty.jetty.Server#2c11c55b 11:35:27.346 INFO - using the
json request :
{"class":"org.openqa.grid.common.RegistrationRequest","configuration":{"register":true,"port":5556,"host":"<>","proxy":"org.openqa.grid.selenium.proxy.DefaultRemoteProxy","browser":"browserName\u003dfirefox,platform\u003dMAC","maxSession":5,"role":"node","hubHost":"Hub
IP","registerCycle":5000,"hub":"http://<Remote
IP:5556","remoteHost":"http://Remote Ip:5556"},"capabilities":[{"seleniumProtocol":"WebDriver","platform":"MAC","browserName":"firefox"},{"seleniumProtocol":"WebDriver","platform":"MAC","browserName":"chrome"}]}
11:35:27.347 INFO - Starting auto register thread. Will try to
register every 5000 ms. 11:35:27.347 INFO - Registering the node to
hub :http://**Remote IP:-1/grid/register 11:36:43.151 INFO -
couldn't register this node : Error sending the registration request
Your command appears to have a typo.
-hub http://<<Hub Ip>> :4444/grid/regsiter
^ ^^
here and here
Change this to:
-hub http://<<hubip>>:4444/grid/register
^ ^^
no space fix transposition
Additionally, I've always used the directive -hubUrl, not -hub. They may be synonyms, but if this solution I provided above still does not work, try also replacing -hub with -hubUrl.