trying to get HTML source but java.net.SocketException: Broken pipe or Connection reset

69 views
Skip to first unread message

Francisco J. Martin Umpierrez

unread,
Dec 22, 2011, 7:53:35 AM12/22/11
to Selenium Users
Hi, I'm using Selenium RC standalone in conjunction with PEAR php
bindings for Selenium. The testings scripts seem to work well but I'm
getting a problem when I use this piece of code with a dynamic page:

$this->selenium->open("/objects/navigation/");
$this->selenium->waitForPageToLoad("7000"); //error happens whatever
the time
$html = $this->selenium->getHtmlSource();


But the html source is not complete, server report either one of the
two following problems, sometimes a
java.net.SocketException:Connection reset and others
java.net.SocketException: Broken pipe

Does anybody knows about this problem, how to solve it or the correct
way to request for html code? thanks

The version info of the server is as follows, and I have put also the
error logs:

INFO: Launching a standalone server
12:53:09.969 INFO - Java: Apple Inc. 20.4-b02-402
12:53:09.972 INFO - OS: Mac OS X 10.6.8 x86_64
12:53:09.986 INFO - v2.15.0, with Core v2.15.0. Built from revision
15105
12:53:10.160 INFO - RemoteWebDriver instances should connect to:
http://127.0.0.1:4444/wd/hub
12:53:10.162 INFO - Version Jetty/5.1.x
12:53:10.163 INFO - Started HttpContext[/selenium-server/driver,/
selenium-server/driver]
12:53:10.164 INFO - Started HttpContext[/selenium-server,/selenium-
server]
12:53:10.165 INFO - Started HttpContext[/,/]
12:53:10.245 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler@39b8d6f7
12:53:10.246 INFO - Started HttpContext[/wd,/wd]
12:53:10.252 INFO - Started SocketListener on 0.0.0.0:4444
12:53:10.253 INFO - Started org.openqa.jetty.jetty.Server@584fce71



copy&paste of the console logs:

12:38:56.756 INFO - Got result: [HTML source] on session
1c827ec78e6047a4a06d88ec89f6497a
java.net.SocketException: Connection reset
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:
96)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
org.openqa.jetty.http.ChunkingOutputStream.bypassWrite(ChunkingOutputStream.java:
151)
at
org.openqa.jetty.http.BufferedOutputStream.write(BufferedOutputStream.java:
140)
at org.openqa.jetty.http.HttpOutputStream.write(HttpOutputStream.java:
423)
at org.openqa.jetty.http.HttpOutputStream.write(HttpOutputStream.java:
414)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
412)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
149)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:
820)
at
org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:
986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:
243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)

********************************************************************************************************************************
********************************************************************************************************************************
or as I said, the other variant of the problem:



12:42:46.881 INFO - Got result: [HTML source] on session
ef18b3be354d4048901bbf96db379d64
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:
92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
org.openqa.jetty.http.ChunkingOutputStream.bypassWrite(ChunkingOutputStream.java:
151)
at
org.openqa.jetty.http.BufferedOutputStream.write(BufferedOutputStream.java:
140)
at org.openqa.jetty.http.HttpOutputStream.write(HttpOutputStream.java:
423)
at org.openqa.jetty.http.HttpOutputStream.write(HttpOutputStream.java:
414)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
412)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
149)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:
820)
at
org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:
986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:
243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)


Reply all
Reply to author
Forward
0 new messages