Could not start Selenium session: Failed to start new browser session: Error while launching browser

2,712 views
Skip to first unread message

Stephane

unread,
Mar 2, 2011, 10:30:18 AM3/2/11
to Selenium Users
Hi,

I get an error message, out of the blue. I did nothing between the
previous test run and this one.

The command "svn status" return nothing, showing I did nothing to the
code base.

Here is the message I get:

Could not start Selenium session: Failed to start new browser session:
Error while launching browser

I run the test using the following commands...

Starting the server:

mvn clean selenium:start-server -Pselenium -Ddebug=true

Checking for port use:

netstat -an | grep "4444"

If the server is not started then the above command returns nothing,
otherwise it returns the following response:

tcp6 0 0 :::4444 :::*
LISTEN
tcp6 1 0 127.0.0.1:35412 127.0.0.1:4444
CLOSE_WAIT
tcp6 0 0 127.0.0.1:35414 127.0.0.1:4444
TIME_WAIT
tcp6 0 0 127.0.0.1:4444 127.0.0.1:35412
FIN_WAIT2

Running the test:

mvn clean test -Dtest=com.thalasoft.webtest.website.UserLoginTestCase -
Ddebug=true

The full error exceptions is:


-------------------------------------------------------------------------------
Test set: com.thalasoft.webtest.website.UserLoginTestCase
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 41.677
sec <<< FAILURE!
testUserLogin(com.thalasoft.webtest.website.UserLoginTestCase) Time
elapsed: 20.919 sec <<< ERROR!
java.lang.RuntimeException: Could not start Selenium session: Failed
to start new browser session: Error while launching browser
at
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:
89)
at
com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:
123)
at
com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:
104)
at
com.thoughtworks.selenium.SeleneseTestCase.setUp(SeleneseTestCase.java:
78)
at
com.thalasoft.webtest.CommonTestCase.setUp(CommonTestCase.java:15)
at junit.framework.TestCase.runBare(TestCase.java:128)
at
com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:
212)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:
128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:228)
at junit.framework.TestSuite.run(TestSuite.java:223)
at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:
35)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:
140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:
127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:
345)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:
1009)
Caused by: com.thoughtworks.selenium.SeleniumException: Failed to
start new browser session: Error while launching browser
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
97)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
91)
at
com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:
262)
at
com.thoughtworks.selenium.HttpCommandProcessor.start(HttpCommandProcessor.java:
223)
at
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:
81)


And the pom.xml file is:

<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.thalasoft.webtest</groupId>
<artifactId>thalasoft-webtest</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>thalasoft-webtest</name>
<url>http://maven.apache.org</url>
<profiles>
<profile>
<id>selenium</id>
<activation>
<property>
<name>selenium</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.0.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
<logOutput>true</logOutput>
<multiWindow>true</multiWindow>
</configuration>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-server</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<appserver.home>/path/to/dev/appserver</appserver.home>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium.server</groupId>
<artifactId>selenium-server</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
</project>


Any clue ?

Cheers,

Stephane

unread,
Mar 2, 2011, 10:32:41 AM3/2/11
to Selenium Users
Here is what the server console shows:


mvn clean selenium:start-server -Pselenium -Ddebug=true
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building thalasoft-webtest
[INFO] task-segment: [clean, selenium:start-server]
[INFO]
------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory /home/stephane/dev/java/project/thalasoft-
webtest/target
[INFO] [selenium:start-server {execution: default-cli}]
Created dir: /home/stephane/dev/java/project/thalasoft-webtest/target/
selenium
Launching Selenium Server
Waiting for Selenium Server...
[INFO] User extensions: /home/stephane/dev/java/project/thalasoft-
webtest/target/selenium/user-extensions.js
16:31:04,432 INFO [org.openqa.selenium.server.SeleniumServer] Java:
Sun Microsystems Inc. 17.0-b16
16:31:04,433 INFO [org.openqa.selenium.server.SeleniumServer] OS:
Linux 2.6.32-21-generic i386
16:31:04,442 INFO [org.openqa.selenium.server.SeleniumServer] v2.0
[a2], with Core v2.0 [a2]
16:31:04,442 INFO [org.openqa.selenium.server.SeleniumServer]
Selenium server running in debug mode.
16:31:04,472 DEBUG [org.openqa.jetty.util.Container] add component:
SocketL...@0.0.0.0:4444
16:31:04,500 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.jetty.http.ResourceCache@787171
16:31:04,505 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
16:31:04,506 DEBUG [org.openqa.jetty.util.Container] add component:
HttpContext[/,/]
16:31:04,508 DEBUG [org.openqa.jetty.http.HttpServer] Added
HttpContext[/,/] for host *
16:31:04,508 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.jetty.http.ResourceCache@e80a59
16:31:04,513 DEBUG [org.openqa.jetty.http.HttpContext] added
SC{BASIC,null,user,CONFIDENTIAL} at /tests/html/basicAuth/*
16:31:04,520 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-
server,/selenium-server]
16:31:04,535 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.selenium.server.StaticContentHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:04,537 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.selenium.server.SessionExtensionJsHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:04,540 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler
in HttpContext[/selenium-server,/selenium-server]
16:31:04,542 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.selenium.server.htmlrunner.SeleniumHTMLRunnerResultsHandler@c1cd1f
16:31:04,542 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.selenium.server.CachedContentTestHandler@131f71a
16:31:04,543 DEBUG [org.openqa.jetty.util.Container] add component:
HttpContext[/selenium-server,/selenium-server]
16:31:04,543 DEBUG [org.openqa.jetty.http.HttpServer] Added
HttpContext[/selenium-server,/selenium-server] for host *
16:31:04,543 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.jetty.http.ResourceCache@16930e2
16:31:04,579 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.selenium.server.SeleniumDriverResourceHandler in
HttpContext[/selenium-server,/selenium-server]
16:31:04,579 DEBUG [org.openqa.jetty.util.Container] add component:
HttpContext[/selenium-server/driver,/selenium-server/driver]
16:31:04,579 DEBUG [org.openqa.jetty.http.HttpServer] Added
HttpContext[/selenium-server/driver,/selenium-server/driver] for host
*
16:31:04,579 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.jetty.http.ResourceCache@16f0472
16:31:04,605 DEBUG [org.openqa.jetty.util.Container] add component:
WebDriver remote server
16:31:04,618 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.jetty.jetty.servlet.HashSessionManager@187aeca
16:31:04,621 DEBUG [org.openqa.jetty.util.Container] add component:
org.openqa.jetty.jetty.servlet.ServletHandler@e48e1b
16:31:04,627 INFO [org.openqa.selenium.server.SeleniumServer]
RemoteWebDriver instances should connect to: http://62.16.211.90:4444/wd/hub
16:31:04,627 DEBUG [org.openqa.jetty.util.Container] add component:
HttpContext[/wd,/wd]
16:31:04,627 DEBUG [org.openqa.jetty.http.HttpServer] Added
HttpContext[/wd,/wd] for host *
16:31:04,627 DEBUG [org.openqa.jetty.util.Container] Starting
org.openqa.jetty.jetty.Server@9971ad
16:31:04,629 INFO [org.openqa.jetty.http.HttpServer] Version Jetty/
5.1.x
16:31:04,629 DEBUG [org.openqa.jetty.http.HttpServer] LISTENERS:
[SocketL...@0.0.0.0:4444]
16:31:04,629 DEBUG [org.openqa.jetty.http.HttpServer] HANDLER: {null={/
selenium-server/driver/*=[HttpContext[/selenium-server/driver,/
selenium-server/driver]], /selenium-server/*=[HttpContext[/selenium-
server,/selenium-server]], /=[HttpContext[/,/]], /wd/*=[HttpContext[/
wd,/wd]]}}
16:31:04,630 DEBUG [org.openqa.jetty.util.Container] Starting
HttpContext[/selenium-server/driver,/selenium-server/driver]
16:31:04,630 DEBUG [org.openqa.jetty.http.HttpContext] Init
classloader from null, sun.misc.Launcher$AppClassLoader@7d772e for
HttpContext[/selenium-server/driver,/selenium-server/driver]
16:31:04,630 INFO [org.openqa.jetty.util.Container] Started
HttpContext[/selenium-server/driver,/selenium-server/driver]
16:31:04,630 DEBUG [org.openqa.jetty.util.Container] Starting
HttpContext[/selenium-server,/selenium-server]
16:31:04,631 DEBUG [org.openqa.jetty.http.HttpContext] Init
classloader from null, sun.misc.Launcher$AppClassLoader@7d772e for
HttpContext[/selenium-server,/selenium-server]
16:31:04,631 DEBUG [org.openqa.jetty.http.handler.AbstractHttpHandler]
Started org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:04,632 DEBUG [org.openqa.jetty.http.handler.AbstractHttpHandler]
Started org.openqa.selenium.server.StaticContentHandler in
HttpContext[/selenium-server,/selenium-server]
16:31:04,632 DEBUG [org.openqa.jetty.http.handler.AbstractHttpHandler]
Started org.openqa.selenium.server.SessionExtensionJsHandler in
HttpContext[/selenium-server,/selenium-server]
16:31:04,632 DEBUG [org.openqa.jetty.http.handler.AbstractHttpHandler]
Started
org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler
in HttpContext[/selenium-server,/selenium-server]
16:31:04,632 DEBUG [org.openqa.jetty.http.handler.AbstractHttpHandler]
Started org.openqa.selenium.server.SeleniumDriverResourceHandler in
HttpContext[/selenium-server,/selenium-server]
16:31:04,632 INFO [org.openqa.jetty.util.Container] Started
HttpContext[/selenium-server,/selenium-server]
16:31:04,632 DEBUG [org.openqa.jetty.util.Container] Starting
HttpContext[/,/]
16:31:04,632 DEBUG [org.openqa.jetty.http.HttpContext] Init
classloader from null, sun.misc.Launcher$AppClassLoader@7d772e for
HttpContext[/,/]
16:31:04,632 DEBUG [org.openqa.jetty.http.handler.AbstractHttpHandler]
Started org.openqa.selenium.server.ProxyHandler in HttpContext[/,/]
16:31:04,632 INFO [org.openqa.jetty.util.Container] Started
HttpContext[/,/]
16:31:04,632 DEBUG [org.openqa.jetty.util.Container] Starting
HttpContext[/wd,/wd]
16:31:04,633 DEBUG [org.openqa.jetty.http.HttpContext] Init
classloader from null, sun.misc.Launcher$AppClassLoader@7d772e for
HttpContext[/wd,/wd]
16:31:04,633 DEBUG [org.openqa.jetty.util.Container] Starting
org.openqa.jetty.jetty.servlet.ServletHandler@e48e1b
16:31:04,633 DEBUG
[org.openqa.jetty.jetty.servlet.AbstractSessionManager] New random
session seed
16:31:04,660 DEBUG [org.openqa.jetty.jetty.servlet.Holder] Started
holder of class org.openqa.selenium.remote.server.DriverServlet
16:31:04,661 INFO [org.openqa.jetty.util.Container] Started
org.openqa.jetty.jetty.servlet.ServletHandler@e48e1b
16:31:04,661 INFO [org.openqa.jetty.util.Container] Started
HttpContext[/wd,/wd]
16:31:04,664 DEBUG
[org.openqa.jetty.jetty.servlet.AbstractSessionManager] Session
scavenger period = 30s
16:31:04,666 INFO [org.openqa.jetty.http.SocketListener] Started
SocketListener on 0.0.0.0:4444
16:31:04,666 INFO [org.openqa.jetty.util.Container] Started
org.openqa.jetty.jetty.Server@9971ad
16:31:05,176 DEBUG [org.openqa.jetty.http.HttpConnection] new
HttpConnection: Socket[addr=/127.0.0.1,port=33859,localport=4444]
16:31:05,228 DEBUG [org.openqa.jetty.http.HttpConnection] REQUEST from
SocketL...@0.0.0.0:4444:
GET /selenium-server HTTP/1.1
User-Agent: Java/1.6.0_21
Host: localhost:4444
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
16:31:05,232 DEBUG [org.openqa.jetty.http.HttpServer] Try HttpContext[/
selenium-server,/selenium-server],0
16:31:05,243 DEBUG [org.openqa.jetty.http.HttpConnection] new
HttpConnection: Socket[addr=/127.0.0.1,port=33860,localport=4444]
16:31:05,244 DEBUG [org.openqa.jetty.http.HttpConnection] REQUEST from
SocketL...@0.0.0.0:4444:
GET /selenium-server/ HTTP/1.1
User-Agent: Java/1.6.0_21
Host: localhost:4444
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
16:31:05,244 DEBUG [org.openqa.jetty.http.HttpServer] Try HttpContext[/
selenium-server,/selenium-server],0
16:31:05,244 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-
server,/selenium-server]
16:31:05,244 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.StaticContentHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:05,249 INFO [org.openqa.jetty.util.Credential] Checking
Resource aliases
16:31:05,249 DEBUG [org.openqa.jetty.http.HttpContext] HttpContext[/
selenium-server,/selenium-server] consumed all of path /selenium-
server, redirect to http://localhost:4444/selenium-server/
16:31:05,251 DEBUG [org.openqa.jetty.http.HttpConnection] RESPONSE:
HTTP/1.1 302 Moved Temporarily
Date: Wed, 02 Mar 2011 15:31:05 GMT
Server: Jetty/5.1.x (Linux/2.6.32-21-generic i386 java/1.6.0_21
Location: http://localhost:4444/selenium-server/
Transfer-Encoding: chunked
16:31:05,251 DEBUG [org.openqa.jetty.http.HttpConnection]
EOFException()
16:31:05,254 DEBUG [org.openqa.jetty.http.handler.ResourceHandler]
PATH=/ RESOURCE=file:/home/stephane/dev/java/project/thalasoft-webtest/
target/selenium/
16:31:05,254 DEBUG [org.openqa.jetty.http.handler.ResourceHandler]
Looking for file:/home/stephane/dev/java/project/thalasoft-webtest/
target/selenium/
16:31:05,255 DEBUG [org.openqa.jetty.http.handler.ResourceHandler]
sendDirectory: file:/home/stephane/dev/java/project/thalasoft-webtest/
target/selenium/
Selenium Server started
Waiting for Selenium Server to shutdown...
16:31:05,264 DEBUG [org.openqa.jetty.http.HttpContext] Handled by
org.openqa.selenium.server.StaticContentHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:05,267 DEBUG [org.openqa.jetty.http.HttpConnection] RESPONSE:
HTTP/1.1 200 OK
Date: Wed, 02 Mar 2011 15:31:05 GMT
Server: Jetty/5.1.x (Linux/2.6.32-21-generic i386 java/1.6.0_21
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/html; charset=UTF8
Content-Length: 304
16:31:18,366 DEBUG [org.openqa.jetty.http.HttpConnection] new
HttpConnection: Socket[addr=/127.0.0.1,port=33862,localport=4444]
16:31:18,368 DEBUG [org.openqa.jetty.http.HttpConnection] REQUEST from
SocketL...@0.0.0.0:4444:
POST /selenium-server/driver/ HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
User-Agent: Java/1.6.0_21
Host: localhost:4444
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 71
16:31:18,368 DEBUG [org.openqa.jetty.http.HttpServer] Try HttpContext[/
selenium-server/driver,/selenium-server/driver],0
16:31:18,368 DEBUG [org.openqa.jetty.http.HttpServer] Try HttpContext[/
selenium-server,/selenium-server],0
16:31:18,369 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-
server,/selenium-server]
16:31:18,369 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.StaticContentHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:18,372 INFO [org.openqa.jetty.util.Credential] Checking
Resource aliases
16:31:18,373 DEBUG [org.openqa.jetty.http.handler.ResourceHandler]
PATH=/driver/ RESOURCE=file:/home/stephane/dev/java/project/thalasoft-
webtest/target/selenium/MISSING%20RESOURCE
16:31:18,373 DEBUG [org.openqa.jetty.http.handler.ResourceHandler]
Looking for file:/home/stephane/dev/java/project/thalasoft-webtest/
target/selenium/MISSING%20RESOURCE
16:31:18,374 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.SessionExtensionJsHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:18,374 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler
in HttpContext[/selenium-server,/selenium-server]
16:31:18,374 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.htmlrunner.SeleniumHTMLRunnerResultsHandler@c1cd1f
16:31:18,374 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.CachedContentTestHandler@131f71a
16:31:18,374 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.SeleniumDriverResourceHandler in
HttpContext[/selenium-server,/selenium-server]
16:31:18,378 DEBUG
[org.openqa.selenium.server.SeleniumDriverResourceHandler] req: POST /
selenium-server/driver/ HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
User-Agent: Java/1.6.0_21
Host: localhost:4444
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 71
16:31:18,380 INFO
[org.openqa.selenium.server.SeleniumDriverResourceHandler] Command
request: getNewBrowserSession[*chrome, http://test.thalasoft.com, ] on
session null
16:31:18,384 INFO [org.openqa.selenium.server.BrowserSessionFactory]
creating new remote session
16:31:18,394 DEBUG
[org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory]
Requested browser string '*chrome' matches *chrome
16:31:18,398 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.Firefox2or3Locator]
Dicovering Firefox 2...
16:31:18,429 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Discovering Firefox 2...
16:31:18,429 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Checking whether Firefox 2 launcher at :'/Applications/Firefox-2.app/
Contents/MacOS/firefox-bin' is valid...
16:31:18,430 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Checking whether Firefox 2 launcher at :'/Applications/Firefox.app/
Contents/MacOS/firefox-bin' is valid...
16:31:18,430 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Checking whether Firefox 2 launcher at :'/usr/lib/firefox/firefox-bin'
is valid...
16:31:18,470 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.Firefox2or3Locator]
Did not find Firefox 2, now dicovering Firefox 3...
16:31:18,472 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Discovering Firefox 3...
16:31:18,499 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Checking whether Firefox 3 launcher at :'/usr/lib/firefox-addons/
firefox-bin' is valid...
16:31:18,501 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Checking whether Firefox 3 launcher at :'/usr/lib/firefox-addons/
firefox' is valid...
16:31:18,502 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Checking whether Firefox 3 launcher at :'/usr/lib/firefox-3.6.13/
firefox-bin' is valid...
16:31:18,502 DEBUG
[org.openqa.selenium.server.browserlaunchers.locators.BrowserLocator]
Discovered valid Firefox 3 launcher : '/usr/lib/firefox-3.6.13/
firefox-bin'
16:31:18,508 INFO [org.openqa.selenium.server.BrowserSessionFactory]
Allocated session 8a728682a790434eae06e294d5af3fdc for http://test.thalasoft.com,
launching...
16:31:18,528 DEBUG
[org.openqa.selenium.server.browserlaunchers.ResourceExtractor]
Extracting /customProfileDirCUSTFFCHROME to /tmp/
customProfileDir8a728682a790434eae06e294d5af3fdc
16:31:18,560 INFO
[org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher]
Preparing Firefox profile...
16:31:39,255 ERROR [org.openqa.selenium.server.BrowserSessionFactory]
Failed to start new browser session, shutdown browser and clear all
session data
java.lang.RuntimeException: Timed out waiting for profile to be
created!
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:
348)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:
124)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:
91)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:
400)
at
org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:
372)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
124)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
86)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:
733)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:
399)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
370)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
129)
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:
245)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
16:31:39,282 DEBUG
[org.openqa.selenium.server.FrameGroupCommandQueueSet] clearing queue
set
16:31:39,285 INFO
[org.openqa.selenium.server.SeleniumDriverResourceHandler] Got result:
Failed to start new browser session: Error while launching browser on
session null
16:31:39,285 DEBUG [org.openqa.jetty.http.HttpContext] Handled by
org.openqa.selenium.server.SeleniumDriverResourceHandler in
HttpContext[/selenium-server,/selenium-server]
16:31:39,290 DEBUG [org.openqa.jetty.http.HttpConnection] RESPONSE:
HTTP/1.1 200 OK
Date: Wed, 02 Mar 2011 15:31:18 GMT
Server: Jetty/5.1.x (Linux/2.6.32-21-generic i386 java/1.6.0_21
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 66
16:31:39,303 DEBUG [org.openqa.jetty.http.HttpConnection] REQUEST from
SocketL...@0.0.0.0:4444:
POST /selenium-server/driver/ HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
User-Agent: Java/1.6.0_21
Host: localhost:4444
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 71
16:31:39,303 DEBUG [org.openqa.jetty.http.HttpServer] Try HttpContext[/
selenium-server/driver,/selenium-server/driver],0
16:31:39,303 DEBUG [org.openqa.jetty.http.HttpServer] Try HttpContext[/
selenium-server,/selenium-server],0
16:31:39,303 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.jetty.http.handler.SecurityHandler in HttpContext[/selenium-
server,/selenium-server]
16:31:39,303 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.StaticContentHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:39,307 DEBUG [org.openqa.jetty.http.handler.ResourceHandler]
PATH=/driver/ RESOURCE=file:/home/stephane/dev/java/project/thalasoft-
webtest/target/selenium/MISSING%20RESOURCE
16:31:39,308 DEBUG [org.openqa.jetty.http.handler.ResourceHandler]
Looking for file:/home/stephane/dev/java/project/thalasoft-webtest/
target/selenium/MISSING%20RESOURCE
16:31:39,308 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.SessionExtensionJsHandler in HttpContext[/
selenium-server,/selenium-server]
16:31:39,309 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler
in HttpContext[/selenium-server,/selenium-server]
16:31:39,309 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.htmlrunner.SeleniumHTMLRunnerResultsHandler@c1cd1f
16:31:39,310 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.CachedContentTestHandler@131f71a
16:31:39,310 DEBUG [org.openqa.jetty.http.HttpContext] Handler
org.openqa.selenium.server.SeleniumDriverResourceHandler in
HttpContext[/selenium-server,/selenium-server]
16:31:39,310 DEBUG
[org.openqa.selenium.server.SeleniumDriverResourceHandler] req: POST /
selenium-server/driver/ HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
User-Agent: Java/1.6.0_21
Host: localhost:4444
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 71
16:31:39,312 INFO
[org.openqa.selenium.server.SeleniumDriverResourceHandler] Command
request: getNewBrowserSession[*chrome, http://test.thalasoft.com, ] on
session null
16:31:39,312 INFO [org.openqa.selenium.server.BrowserSessionFactory]
creating new remote session
16:31:39,312 DEBUG
[org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory]
Requested browser string '*chrome' matches *chrome
16:31:39,313 INFO [org.openqa.selenium.server.BrowserSessionFactory]
Allocated session f15489ebc430448ea7eac8af98ac2c88 for http://test.thalasoft.com,
launching...
16:31:39,319 DEBUG
[org.openqa.selenium.server.browserlaunchers.ResourceExtractor]
Extracting /customProfileDirCUSTFFCHROME to /tmp/
customProfileDirf15489ebc430448ea7eac8af98ac2c88
16:31:39,360 INFO
[org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher]
Preparing Firefox profile...
16:32:00,021 ERROR [org.openqa.selenium.server.BrowserSessionFactory]
Failed to start new browser session, shutdown browser and clear all
session data
java.lang.RuntimeException: Timed out waiting for profile to be
created!
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:
348)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:
124)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:
91)
at
org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:
400)
at
org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:
372)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
124)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
86)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:
733)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:
399)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
370)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
129)
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:
245)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
16:32:00,033 DEBUG
[org.openqa.selenium.server.FrameGroupCommandQueueSet] clearing queue
set
16:32:00,033 INFO
[org.openqa.selenium.server.SeleniumDriverResourceHandler] Got result:
Failed to start new browser session: Error while launching browser on
session null
16:32:00,033 DEBUG [org.openqa.jetty.http.HttpContext] Handled by
org.openqa.selenium.server.SeleniumDriverResourceHandler in
HttpContext[/selenium-server,/selenium-server]
16:32:00,035 DEBUG [org.openqa.jetty.http.HttpConnection] RESPONSE:
HTTP/1.1 200 OK
Date: Wed, 02 Mar 2011 15:31:39 GMT
Server: Jetty/5.1.x (Linux/2.6.32-21-generic i386 java/1.6.0_21
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 66
16:32:00,098 DEBUG [org.openqa.jetty.http.HttpConnection]
EOFException()
16:32:05,326 DEBUG [org.openqa.jetty.http.HttpConnection]
java.net.SocketTimeoutException: Read timed out

Mark Collin

unread,
Mar 2, 2011, 10:53:07 AM3/2/11
to seleniu...@googlegroups.com

Have you:

 

·         Updated FireFox?

·         Changed your FireFox profile?

·         Run the test as a user that doesn’t have permission to run FireFox?

 

Regards

 

Mark

--

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.

 


-- This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify postm...@ardescosolutions.com

Sona Dhanush

unread,
Mar 3, 2011, 7:24:14 AM3/3/11
to seleniu...@googlegroups.com
hi..i also faced with the same problem...just try changing the port no...which server r u using and is it running in 8080?try changing the selenium server port no to 4449 or 4448...

Stephane

unread,
Mar 12, 2011, 8:09:50 AM3/12/11
to seleniu...@googlegroups.com
Thanks for your replies. In fact, it now works. Out of the blue.

And I don't know why for I have done absolutely nothing.

So, I suspect it could be related to my localhost server and my connection to the internet.

Indeed, when I want to start my http server at localhost, depending on if I'm connected to the internet or not, I have to slightly edit the file /etc/hosts which contains:

127.0.0.1       localhost
127.0.1.1       stephane-laptop
127.0.0.1       localhost.localdomain

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

and change only the first line to have either:

127.0.0.1       localhost

or

127.0.0.1:80       localhost

Otherwise the http server refuses to start at localhost.

Maybe, it is something that bugs the Selenium server..

Stephane

unread,
Mar 12, 2011, 8:11:34 AM3/12/11
to seleniu...@googlegroups.com
No, I have not updated Firefox, nor changed  the profile (I don't know what that is in fact).

And yes I run the Selenium server and client both with the same bash user, my own user in fact, as always.

Stephane

unread,
Mar 12, 2011, 8:55:25 AM3/12/11
to seleniu...@googlegroups.com
What version of Selenium are you using ?

As of now I'm using:

Stephane

unread,
Mar 15, 2011, 1:33:40 AM3/15/11
to seleniu...@googlegroups.com
I have succeeded in updating my version of Selenium.

It now works fine with the following:

    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium</artifactId>
      <version>2.0a7</version>
    </dependency>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-server</artifactId>
      <version>2.0a7</version>
    </dependency>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-firefox-driver</artifactId>
      <version>2.0a7</version>
    </dependency>

Reply all
Reply to author
Forward
0 new messages