Selenium grid : I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect

Today, in this write-up, I am going to share resolution of an issue which is not a frequent one and will not come rapidly, but yeah I have seen this issue while working with Selenium grid, so I am sharing this with you all.


ERROR Stack Trace

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\mjain>cd Downloads\Jar
C:\Users\mjain\Downloads\Jar>java -jar selenium-server-standalone-2.42.2.jar -role hub
Sep 01, 2014 1:57:42 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid server
2014-09-01 13:57:45.752:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT
2014-09-01 13:57:45.907:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null}
2014-09-01 13:57:45.939:INFO:osjs.AbstractConnector:Started SocketConnector@0.0.0.0:4444
Sep 01, 2014 2:26:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
Sep 01, 2014 2:26:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request
Sep 01, 2014 2:26:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
Sep 01, 2014 2:26:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request
Sep 01, 2014 2:26:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
Sep 01, 2014 2:26:08 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request
Sep 01, 2014 2:26:09 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy isAlive
WARNING: Failed to check status of node: Permission denied: connect
Sep 01, 2014 2:26:14 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
Sep 01, 2014 2:26:14 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request
Sep 01, 2014 2:26:14 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
Sep 01, 2014 2:26:14 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request
Sep 01, 2014 2:26:14 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
Sep 01, 2014 2:26:14 PM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request
Sep 01, 2014 2:26:14 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy isAlive
WARNING: Failed to check status of node: Permission denied: connect
Sep 01, 2014 2:26:14 PM org.openqa.grid.selenium.proxy.DefaultRemoteProxy onEvent
WARNING: Marking the node as down. Cannot reach the node for 2 tries.

 Steps which I have taken when I got this issue

  • Step1 Start selenium grid hub
 java -jar selenium-server-standalone-2.41.0.jar -role hub
  • Step2 Start a node
 java -jar selenium-server-standalone-2.41.0.jar -role node -hub <hub-ip>:<hub-port>/grid/register/
  • Step 3 Start executing test scripts.
  • Step4 You will get the above error.

Solution

You will get this error only and only when some other Virtual Private Network is connected on your machine. Such that there is some conflict in the IP which is causing the problems in re-directions of requests.

So to avoid this Error make sure you are not on any VPN connectivity, or for that matter, if you want to work on VPN then make sure you are providing the whole IP(192.168.1.23) rather than Host-name(localhost or MyMachine, etc).

Once you will apply any of the above steps then, you can easily get rid of this issue. This worked for me, I will be more than happy to answer your queries/feedback/revert over the same.

Advertisements

2 thoughts on “Selenium grid : I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s