WebDriver Error - INFO: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed

8,830 views
Skip to first unread message

Simon Latinwo

unread,
Jun 29, 2012, 5:48:10 AM6/29/12
to seleniu...@googlegroups.com
selenium-server-standalone-2.21.0
IE 9

Hi guys, I'm relatively new to Selenium so any help would be very much appreciated. I get
my test executed but I keep getting these error message in the console:

Jun 29, 2012 10:16:18 AM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed
Jun 29, 2012 10:16:18 AM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request

Can someone please tell me how to rectify this.

Second question:

can someone please explain to me what the benefits are to automating tests using RC when web driver seems equally capable, efficient and easier to work with?

Thanks a mill
Simon

Mark Collin

unread,
Jun 29, 2012, 5:54:08 AM6/29/12
to seleniu...@googlegroups.com

At a quick glance it looks like a network issue. Does it happen every run?  Do other tests work fine?

 

Showing us your test code would probably result in more useful answers.

 

If you are using the WebDriver API don’t bother with the RC API, it’s the old one and is effectively deprecated now.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.

Simon Latinwo

unread,
Jun 29, 2012, 6:02:38 AM6/29/12
to seleniu...@googlegroups.com
Hi Mark,

Thanks for as speedy reply. Yes it does happen on every run and yes all test work fine but I get the error before the console log.
Please find attached the test code:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;


public class kdf1 {

    /**
     * @param args
     */
    public static void main(String[] args) throws Exception{
        // TODO Auto-generated method stub
       
        //My variable or test data
        String vURL, vText, vGetText, vAttribute;
        long vSleep;
        String vXpath;
       
        // Initialising my data and objects
        vURL = "http://www.google.com";
        vXpath = "//*[@id='hplogo']";
        vText = "something";
        vAttribute = "value";
        vSleep = 2000;
       
        WebDriver myD = new InternetExplorerDriver();
       
        //navigate to a specific URL
        myD.navigate().to(vURL);
        Thread.sleep(vSleep);
       
        // SENDKEYS - find element and send text into it
        vXpath = "//*[@id='gbqfq']";
        vText = "selenium webdriver";
        myD.findElement(By.xpath(vXpath)).sendKeys(vText);
        Thread.sleep(vSleep);
       
        // CLICK - find element and click
        vXpath = "//*[@id='gbqfb']";
        myD.findElement(By.xpath(vXpath)).click();
        Thread.sleep(vSleep);
       
        // GETTEXT - find element and get text out of it
        //vXpath = "/html/body/div[4]/div[2]/div/div[2]/div/div/div/div/span";
        vXpath = "//div[@id='ab_name']";
        vGetText = myD.findElement(By.xpath(vXpath)).getText();
        System.out.println("Text 1 is " +vGetText);
        Thread.sleep(vSleep);
       
        vXpath = "//*[@id='resultStats']";
        vGetText = myD.findElement(By.xpath(vXpath)).getText();
        System.out.println("Text 2 is " +vGetText);
        Thread.sleep(vSleep);
       
        // GETATTRIBUTE - find element and get a value of a certain attribute out of this
        vAttribute = "value";
        vXpath = "//*[@id='gbqfq']";
        vGetText = myD.findElement(By.xpath(vXpath)).getAttribute(vAttribute);
        System.out.println("Text 3 is " +vGetText);
       
        //wait
        vSleep = 2000;
        Thread.sleep(vSleep);
       
        // CLOSE - close the WD or browser
        myD.close();
       
       
       
    }

}


Thanks

Simon

Maxim Vorobev

unread,
Jun 29, 2012, 7:20:23 AM6/29/12
to seleniu...@googlegroups.com
It's not a problem with code and it's not ERROR - it's just INFO.
Full log:
I 2012-06-29 11:52:37:390 server.cc(53) Starting WebDriver server on port: '49786' on host: ''
Started InternetExplorerDriver server (32-bit)
2.24.2.0
Listening on port 49786
Log level is set to DEBUG
D 2012-06-29 11:52:37:671 server.cc(210) Command: GET /status {}
D 2012-06-29 11:52:37:671 server.cc(272) Response: {"sessionId":"","status":0,"value":{"build":{"version":"2.21.0"},"os":{"arch":"x86","name":"windows","version":"5.1.2600"}}}

D 2012-06-29 11:52:38:156 server.cc(210) Command: POST /session {"desiredCapabilities":{"platform":"WINDOWS","ensureCleanSession":true,"browserName":"internet explorer","version":""}}
W 2012-06-29 11:52:38:171 IECommandExecutor.cpp(448) Browser ID requested was an empty string
W 2012-06-29 11:52:38:171 IECommandExecutor.cpp(415) Unable to find current browser
D 2012-06-29 11:52:38:171 BrowserFactory.cpp(528) Detected IE version: 8, detected Windows version: 5
D 2012-06-29 11:52:41:109 server.cc(210) Command: GET /favicon.ico {}
D 2012-06-29 11:52:41:109 server.cc(272) Response: { "status" : 404, "sessionId" : "<no session>", "value" : "Command not found: GET /favicon.ico" }
D 2012-06-29 11:52:41:218 server.cc(272) Response: {"sessionId":"5ec53f11-a4a6-48f9-b4d6-1bee62f2f2b9","status":303,"value":"/session/5ec53f11-a4a6-48f9-b4d6-1bee62f2f2b9"}

29.06.2012 11:52:41 org.apache.http.impl.client.DefaultRequestDirector tryExecute

INFO: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed
29.06.2012 11:52:41 org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
D 2012-06-29 11:52:41:281 server.cc(210) Command: GET /session/5ec53f11-a4a6-48f9-b4d6-1bee62f2f2b9 {}

2012/6/29 Simon Latinwo <sy.la...@gmail.com>

Mark Collin

unread,
Jun 29, 2012, 7:22:42 AM6/29/12
to seleniu...@googlegroups.com

Test code looks sane (apart from the use of thread.sleep) so I wouldn’t worry about it.

Simon Latinwo

unread,
Jun 29, 2012, 7:34:41 AM6/29/12
to seleniu...@googlegroups.com
Thanks Maxim and Mark, I agree with both comments and very much appreciate you guys. I can now move on with the rest tutorial. Cheers guys.

Jim Evans

unread,
Jun 29, 2012, 7:37:33 AM6/29/12
to seleniu...@googlegroups.com
We've answered this question several times before. The IE driver creates an HTTP server that the language bindings use to communicate with the driver. Launching this server takes a short period of time. With the Java bindings to the IE driver, there's a race condition where the Java HttpClient class polls to wait for the HTTP server to be initialized. The informational message you're seeing is when the client polls before the server is ready. It can safely be ignored.

--Jim

Simon Latinwo

unread,
Jun 29, 2012, 6:05:20 PM6/29/12
to seleniu...@googlegroups.com
Thanks Jim, much appreciated.

Simon Latinwo

Forgive the typos,
Sent from my iPhone

On 29 Jun 2012, at 12:37, Jim Evans <james.h....@gmail.com> wrote:

> We've answered this question several times before. The IE driver creates an HTTP server that the language bindings use to communicate with the driver. Launching this server takes a short period of time. With the Java bindings to the IE driver, there's a race condition where the Java HttpClient class polls to wait for the HTTP server to be initialized. The informational message you're seeing is when the client polls before the server is ready. It can safely be ignored.
>
> --Jim
>
> --
> You received this message because you are subscribed to the Google Groups "Selenium Users" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/1eATFMR0_GwJ.

Krishnan Mahadevan

unread,
Nov 7, 2012, 12:35:52 AM11/7/12
to seleniu...@googlegroups.com
Richard,
Perhaps it is time that you enabled logging for the IEDriverServer binary, retried the same thing again and help furnish the IEDriverServer's logs.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Tue, Nov 6, 2012 at 10:18 PM, richard.miller456 <richard....@gmail.com> wrote:
How does one "ignore this message"; I get the same thing; it completely stops my test from running with JUNIT in eclipse.

Started InternetExplorerDriver server (32-bit)
2.25.2.0
Listening on port 25024
Nov 06, 2012 11:36:25 AM org.apache.http.impl.client.DefaultRequestDirector tryExecute

INFO: I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed
Nov 06, 2012 11:36:25 AM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/e2Uw04VrYiwJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sreenu Lekkala

unread,
Jan 23, 2013, 8:06:28 AM1/23/13
to seleniu...@googlegroups.com
Hi Jim,

You have mentioned many times that the reason for getting this error, but we did not get solution for this yet. Can you provide me the right solution if you have?

Thanks in advance,

Sreenu Lekkala

Jim Evans

unread,
Jan 23, 2013, 8:49:45 AM1/23/13
to seleniu...@googlegroups.com
It's a non-error. There is no need for a "solution". If your framework regards informational log messages as errors, your framework is broken. If it's just that the Eclipse console formats the message in red, and you're conditioned to automatically think "red == bad" maybe you ought to be checking content instead of format. You might try changing the logging level on the driver, but I don't know if that will work, and don't know how you'd set it in Java. For further information: http://jimevansmusic.blogspot.com/2012/12/seeing-info-messages-in-log-does-not.html

Mark Collin

unread,
May 21, 2013, 3:51:49 AM5/21/13
to seleniu...@googlegroups.com
It's not an error it's an info message, the first time it tried to connect it couldn't so it tried again.  This is quite normal when working with applications that talk to each other over a network connection, there is nothing to do here.


On 20/05/2013 17:04, smar...@marstenpublishing.com wrote:
I get the same error running the IE driver as java code in eclipse. Is there a way to stop the race condition from happening? My app works once in thirty.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages