Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms #4790

Closed
lukeis opened this issue Mar 4, 2016 · 49 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 4790

From selenium IDE 1.9.1 I recorded some web browsing. and I 've exported the test under
Java/Junit4/webdriver

Then from Eclipse I try now to play the test but I have an error.
org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 21:08:56'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version:
'1.6.0_25'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:94)
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:73)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:245)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:109)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:185)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:178)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:174)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:92)
    at com.example.tests.Essai.setUp(Essai.java:20)
    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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

I have the following libraries:
- junit-4.10.jar
- selenium-server-standalone-2.25.0.jar
- selenium-java-2.25.0.jar

Here is the code I got :

package com.example.tests;

//import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;
//import com.google.common.collect.ImmutableList;
//import com.google.common.collect.*;
import org.junit.*;
import static org.junit.Assert.*;
//import static org.hamcrest.CoreMatchers.*;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
//import org.openqa.selenium.support.ui.Select;

public class Essai {
    private WebDriver driver;
    private String baseUrl;
    private StringBuffer verificationErrors = new StringBuffer();
    @Before
    public void setUp() throws Exception {
        driver = new FirefoxDriver();
        Thread.sleep(10);
        System.out.println(driver);
        baseUrl = "http://vgerndvud311:7101/SCI";
        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

    }

    @Test
    public void testEssai() throws Exception {
        driver.get(baseUrl + "/SCI/login;jsessionid=GCDfQmLbprqmpV6mvzXdVp8Fyz8ZVd41gk6YP7SmQFQ1dCvHyQvy!-70800896");
        driver.findElement(By.id("j_username")).clear();
        driver.findElement(By.id("j_username")).sendKeys("admin@MNO");
        driver.findElement(By.id("j_password")).clear();
        driver.findElement(By.id("j_password")).sendKeys("gemalto,123");
        driver.findElement(By.id("sci_j_login")).click();
        driver.findElement(By.id("sci_search_text")).click();
        driver.findElement(By.id("sci_search_text")).clear();
        driver.findElement(By.id("sci_search_text")).sendKeys("0*");
        driver.findElement(By.cssSelector("a.submit")).click();
        driver.findElement(By.xpath("//div[@id='sci_search_select']/ul/li/span")).click();
        driver.findElement(By.id("sci_search_select_submit_btn")).click();
        driver.findElement(By.cssSelector("div.header > div.close")).click();
        driver.findElement(By.xpath("//div[@id='ef0a090e-240a-40ea-8a1d-63369a907deb']/div[2]/a[6]/div")).click();
    }

    @After
    public void tearDown() throws Exception {
        driver.quit();
        String verificationErrorString = verificationErrors.toString();
        if (!"".equals(verificationErrorString)) {
            fail(verificationErrorString);
        }
    }

    private boolean isElementPresent(By by) {
        try {
            driver.findElement(by);
            return true;
        } catch (NoSuchElementException e) {
            return false;
        }
    }
}


Reported by gregauvray78120 on 2012-11-19 13:34:59

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I use Firefox 14.0.1

Reported by gregauvray78120 on 2012-11-19 13:43:16

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Please check your system proxy setting to ensure that it does not block (or redirect)
connections to the localhost:7054

Reported by barancev on 2012-11-24 19:35:21

  • Status changed: NeedsClarification

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Closing the issue, no response from the author for a long time.

Reported by barancev on 2012-12-20 07:11:06

  • Status changed: Invalid
  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am experiencing the similar issue:
If i use selenium-java 2.28.0 than i do not find any issues.
But when i use selenium-standalone-server 2.28.0 than I encounter this issue.

I need standalone server jar as sometimes I want to run them on GRID. and the same
testcase, when run on GRID, runs fine. So there must be something wrong with standalone-server
jar file.

Reported by tshah@argusoft.com on 2013-01-11 05:08:59

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 22:18:01'
System info: os.name: 'Windows 2003', os.arch: 'x86', os.version: '5.2', java.version:
'1.6.0_10-rc2'
Driver info: driver.version: FirefoxDriver
org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 22:18:01'
System info: os.name: 'Windows 2003', os.arch: 'x86', os.version: '5.2', java.version:
'1.6.0_10-rc2'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:94)
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:73)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:245)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:109)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:178)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:174)

I hava same problem ,use ff 12.and selenium-java 2.28.0

Reported by Franklin.zhenGS on 2013-01-23 09:38:30

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I resolved the error as follows;
java versions: jre7, jdk1.7.0
Fire Fox Version: 14.0.1
Library: selenium-java 2.28.0.jar and selenium-standalone-server 2.28.0.jar

But i don't know what are the wanted and unwanted files from the above. 
Can someone please help me to figure out it?


Reported by Wasundara888 on 2013-02-07 06:30:11


- _Attachment: [Image1.JPG](https://storage.googleapis.com/google-code-attachments/selenium/issue-4790/comment-6/Image1.JPG)_

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am using selenium-server-standalone-2.31.0.jar and FF 18 and FF 19.0.2 and running
tests parallel using testng still getting the issue. 
What is the stable jar and FF it supports.

Reported by raghuram26 on 2013-03-19 12:35:39

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hello, I'm using the same resources mentioned above... that is, FF 19.x.x, Selenium
Server Version 2.31.0, AND I have updated my POM file to include version 2.31.0 of
the client/server pieces and Firefox driver into my project as well.  

Furthermore, I've shut down my firewall all-together...
Yet, I am facing the same binding issue...

Reported by garciajuanluis on 2013-03-29 15:15:43

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hello, 
I'm using selenium jar of version 2.32.0 & FF17. while trying to run cases in parallel
getting this exception

rg.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000
ms
Build info: version: '2.21.0', revision: '16552', time: '2012-04-11 19:08:38'
System info: os.name: 'Windows Vista', os.arch: 'amd64', os.version: '6.1', java.version:
'1.6.0_10'
Driver info: driver.version: FirefoxDriver

Reported by santoshsarma.jv on 2013-04-18 06:23:57

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am using Selenium 2.31 and  and tried with all 3 versions of firefox FF 17 ,18  &
19  and getting this error.Guys please help me to get this resolved.

org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms Build info: version: '2.31.0', revision: '1bd294d185a80fa4206dfeab80ba773c04ac33c0',
time: '2013-02-27 13:51:26' System info: os.name: 'Windows Server 2008 R2', os.arch:
'amd64', os.version: '6.1', java.version: '1.6.0_39' Driver info: driver.version: FirefoxDriver
org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms
Build info: version: '2.31.0', revision: '1bd294d185a80fa4206dfeab80ba773c04ac33c0',
time: '2013-02-27 13:51:26'
System info: os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1',
java.version: '1.6.0_39' 


Reported by muskaan2606 on 2013-04-19 10:27:46

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am using Selenium 2.32 with FF 11.0 and same error:

org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms
   [testng] Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
   [testng] System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.32-042stab063.2',
java.version: '1.6.0_20'
   [testng] Driver info: driver.version: FirefoxDriver

Any suggestion?
Regards

Reported by dbrandib on 2013-04-25 16:35:29

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I run 5 tests in parallel and 3 of them was unable to start with the exception below.
2 tests had started successfully. I use selenium 2.32.0 and FF 20.0.1


org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version:
'1.6.0_37'
Driver info: driver.version: FirefoxDriver

Reported by Maria.Rodionova on 2013-05-07 10:43:34

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I'm working on this issue, reproduced in my env recently, thank you for reminding.

Reported by barancev on 2013-05-07 13:00:48

  • Status changed: Accepted

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

This issue was closed by revision cdd5f60c8d7f.

Reported by barancev on 2013-05-09 16:56:53

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

@barancev

Do we have to wait for next selenium webdriver release to get the above fix? or how
can i get this? I am blocked because of the issue?

Reported by kavita.sharda on 2013-05-15 22:57:34

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

The next release is to be shipped this week.

Reported by barancev on 2013-05-16 07:01:31

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

@barancev

Has the new release been shipped. I need to get my stuff up and running and I am waiting
on this one.

Reported by mail2shivendra on 2013-05-20 16:27:58

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi recently I have faced the same issue.Clearing the temp files somehow helped me..
Try it out !!! It might work..To delete all files in temp.Go to run and type %temp%
and click enter.Delete all the files.

Reported by anand09.u on 2013-05-20 16:42:44

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

The patch is reverted due to incompatibility with existing architecture, I'm working
on another solution.

Reported by barancev on 2013-05-20 17:21:27

  • Status changed: Started

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

This issue was closed by revision a49b2a48fefd.

Reported by barancev on 2013-05-20 18:44:34

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi,
could anyone help me with this issue is Selenium
This is my sample selenium 2 code

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class Test {

    public static void main(String [] args){
        WebDriver driver = new FirefoxDriver();
        driver.get("www.google.com");
    }
}

When i run this i see the below exception:
Exception in thread "main" org.openqa.selenium.WebDriverException: Unable to bind to
locking port 7054 within 45000 ms
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:23:22'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version:
'1.6.0_33'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:94)
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:72)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:179)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:92)
    at Test.main(Test.java:8)

My Firefox version : 21 and using the webdriver 2.32 version jars. And I even checked
if the port mentioned in exception i.e. "7054" is being used by any process, and i
see that it is open for use.

Someone help me, thanks in advance


Reported by rajlaxmi.katkati on 2013-05-21 05:00:10

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

When this revision a49b2a48fefd will be available to end users? Still we have 2.32 Webdriver,
can we expect this to be  part of Webdriver 2.33 and when we can expect 2.33 in market?

Reported by muskaan2606 on 2013-05-21 07:23:37

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

@23, I would check out the instructions for building the WebDriver solution on your
own.

Reported by arran.huxtable on 2013-05-21 08:44:52

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Issue 4085 has been merged into this issue.

Reported by barancev on 2013-05-21 19:57:11

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I use java Selenium WebDriver 2.33.0 and Firefox 24. I have the same issue. It is a
normal to execute several(~20) selenium webdrivers at time in my system.

How to fix that?

Reported by bushevuv on 2013-09-18 13:26:19

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Don't start many firefox instances at once, run them one by one. Synchronize your code
that starts the browser.

Reported by barancev on 2013-09-18 13:29:19

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi,

thank you for quick answer!

Ok, I will introduce startup synchronization mechanism. But on what principies it should
based? Should I add a simple timeout before starting each instances? Or someone else?

Reported by bushevuv on 2013-09-18 13:32:10

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Download the latest jar files from Selenium hq website and map add those jars to the
project. This works.

Reported by pmohanalatha on 2014-04-22 12:36:04

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi, m getting this below error and got stuck from last 2 days...
tried all the possible solutions and downloaded latest jars too but still getting this
error.

org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms

Reported by ra.megha02 on 2014-05-02 12:47:52

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016


org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms

Reported by ra.megha02 on 2014-05-02 12:49:22

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Please help me out..
environment:
java - 1.8
selenium jars - 2.41
firefox - 17.0
OS - windows 8.1

am getting below mentioned error for simple webdriver program

Unable to bind to locking port 7054 within 45000 ms

Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'


Reported by vasireddysharmila on 2014-05-22 19:37:25

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi there. This issue is really annoying. We tried all latest selenium versions included
2.42 and 3 latest FF versions (27, 28, 29). If it's not going to be fixed can someone
share a workaround?

Reported by evgeny.mukhin on 2014-05-27 08:16:50

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Starting to get this issue too using Selenium 2.41.0.

Reported by owenfletcher on 2014-06-03 08:09:16

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I see this issue in java selenium 2.41.0 as well. It's affecting both Firefox 28 and
29 on my grid set up. When I upgrade to to selenium java 2.42.0 I get the following
Firefox startup error instead (posted at: https://code.google.com/p/selenium/issues/detail?id=7421)

Reported by AdamJasonDev on 2014-06-03 14:02:14

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I am also facing the same. Earlier it is working fine with FF-29.0 but during auto updation
in FF-29 issue is arising (may be due to some patch). Please help.

FAILED CONFIGURATION: @BeforeMethod setup
org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within
45000 ms
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'TBSL-181', ip: '10.150.241.186', os.name: 'Windows XP', os.arch:
'x86', os.version: '5.1', java.version: '1.7.0_51'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:98)
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:84)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
    at candidateSideAutomation.candidateBaseFunctions.startup(candidateBaseFunctions.java:39)
    at candidateSideAutomation.candsearch.setup(candsearch.java:19)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

Reported by dshukla2005 on 2014-06-13 04:48:19

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Getting the same error 
I have gridsetup which users selenium2.41 jar and tests are running parallel in firefox29
browser, getting the below error 

firefox
   [testng] org.openqa.selenium.WebDriverException: Unable to bind to locking port
7054 within 45000 ms
   [testng] Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
   [testng] System info: host: 'taf-build', ip: '192.168.2.14', os.name: 'Windows XP',
os.arch: 'x86', os.version: '5.1', java.version: '1.7.0_07'
   [testng] Driver info: driver.version: FirefoxDriver
   [testng] Command duration or timeout: 45.63 seconds
   [testng] Build info: version: '2.33.0', revision: '4e90c97', time: '2013-05-22 15:32:38'
   [testng] System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.2.0-39-generic',
java.version: '1.6.0_22'
   [testng] Driver info: org.openqa.selenium.remote.RemoteWebDriver
   [testng]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   [testng]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   [testng]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   [testng]     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   [testng]     at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:191)
   [testng]     at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
   [testng]     at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
   [testng]     at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
   [testng]     at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
   [testng]     at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
   [testng]     at com.socialtwist.taf.selenium.BrowserSesssionFactory.getRemoteWebDriver(BrowserSesssionFactory.java:44)
   [testng]     at com.socialtwist.taf.selenium.BrowserSesssionFactory.getDriverInstance(BrowserSesssionFactory.java:27)
   [testng]     at com.socialtwist.taf.selenium.TafTestCase.startSession(TafTestCase.java:100)
   [testng]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   [testng]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   [testng]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   [testng]     at java.lang.reflect.Method.invoke(Method.java:597)
   [testng]     at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
   [testng]     at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
   [testng]     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
   [testng]     at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
   [testng]     at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
   [testng]     at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
   [testng]     at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
   [testng]     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
   [testng]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   [testng]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   [testng]     at java.lang.Thread.run(Thread.java:662)
   [testng] Caused by: org.openqa.selenium.WebDriverException: Unable to bind to locking
port 7054 within 45000 ms
   [testng] Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'

Reported by praneeth.krishna on 2014-06-13 12:51:19

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

the same with WebDriver 2.42.2

Reported by sirtsovg on 2014-06-14 21:45:45

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

getting same error when using via Grid2
I am spawning multiple request to the Hub at the same time (0.1 second interval), out
of 50 request, 3-5 of them fails with this error
FFversion: 28
Grid nodes running in AWS nodes
Jenkins/executor is also in AWS
OS: AWS Linux

Unable to bind to locking port 7054 within 45000 ms
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'ip-10-0-17-209', ip: '10.0.17.209', os.name: 'Linux', os.arch:
'amd64', os.version: '3.10.40-50.136.amzn1.x86_64', java.version: '1.6.0_35'
Driver info: driver.version: FirefoxDriver (org.openqa.selenium.WebDriverException)
(Selenium::WebDriver::Error::UnknownError)
[remote server] org.openqa.selenium.internal.SocketLock(SocketLock.java):98:in `lock'
[remote server] org.openqa.selenium.firefox.internal.NewProfileExtensionConnection(NewProfileExtensionConnection.java):84:in
`start'
[remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):246:in
`startClient'
[remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):114:in
`<init>'
[remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):193:in
`<init>'
[remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):186:in
`<init>'
[remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):104:in
`<init>'
[remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):-2:in
`newInstance0'
[remote server] sun.reflect.NativeConstructorAccessorImpl(NativeConstructorAccessorImpl.java):39:in
`newInstance'
[remote server] sun.reflect.DelegatingConstructorAccessorImpl(DelegatingConstructorAccessorImpl.java):27:in
`newInstance'
[remote server] java.lang.reflect.Constructor(Constructor.java):513:in `newInstance'
[remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):62:in
`callConstructor'
[remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):56:in
`newInstance'
[remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):216:in
`call'
[remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):1:in
`call'
[remote server] java.util.concurrent.FutureTask$Sync(FutureTask.java):303:in `innerRun'
[remote server] java.util.concurrent.FutureTask(FutureTask.java):138:in `run'
[remote server] org.openqa.selenium.remote.server.DefaultSession$1(DefaultSession.java):170:in
`run'
[remote server] java.util.concurrent.ThreadPoolExecutor$Worker(ThreadPoolExecutor.java):886:in
`runTask'
[remote server] java.util.concurrent.ThreadPoolExecutor$Worker(ThreadPoolExecutor.java):908:in
`run'
[remote server] java.lang.Thread(Thread.java):662:in `run'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/response.rb:51:in
`assert_ok'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/response.rb:15:in
`initialize'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/common.rb:59:in
`new'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/common.rb:59:in
`create_response'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/default.rb:66:in
`request'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/http/common.rb:40:in
`call'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:634:in
`raw_execute'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:99:in
`create_session'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:68:in
`initialize'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:33:in
`new'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:33:in
`for'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver.rb:67:in
`for'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/watir-webdriver-0.6.4/lib/watir-webdriver/browser.rb:46:in
`initialize'
/data/jenkins/workspace/seleniumgrid2/src/core/browser_overrides/watir_webdriver_override.rb:724:in
`new'
/data/jenkins/workspace/seleniumgrid2/src/core/browser_overrides/watir_webdriver_override.rb:724:in
`__start'
/data/jenkins/workspace/seleniumgrid2/src/core/environment/BaseEnvironment.rb:412:in
`init_browser'
/data/jenkins/workspace/seleniumgrid2/src/core/environment/BaseEnvironment.rb:98:in
`initialize'
/data/jenkins/workspace/seleniumgrid2/src/core/environment/CliEnvironment.rb:27:in
`initialize'
/data/jenkins/workspace/seleniumgrid2/src/core/environment/env.rb:50:in `new'
/data/jenkins/workspace/seleniumgrid2/src/core/environment/env.rb:50:in `<top (required)>'
/data/jenkins/workspace/seleniumgrid2/src/common/load_framework.rb:4:in `require'
/data/jenkins/workspace/seleniumgrid2/src/common/load_framework.rb:4:in `<top (required)>'
/data/jenkins/workspace/seleniumgrid2/src/projects/checkout/air/features/support/common.rb:4:in
`require'
/data/jenkins/workspace/seleniumgrid2/src/projects/checkout/air/features/support/common.rb:4:in
`<top (required)>'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/rb_support/rb_language.rb:122:in
`load'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/rb_support/rb_language.rb:122:in
`load_code_file'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/runtime/support_code.rb:180:in
`load_file'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/runtime/support_code.rb:83:in
`block in load_files!'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/runtime/support_code.rb:82:in
`each'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/runtime/support_code.rb:82:in
`load_files!'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/runtime.rb:183:in
`load_step_definitions'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/runtime.rb:42:in
`run!'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/lib/cucumber/cli/main.rb:47:in
`execute!'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/gems/cucumber-1.3.4/bin/cucumber:13:in
`<top (required)>'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/bin/cucumber:23:in `load'
/data/jenkins/workspace/seleniumgrid2/src/gems/ruby/1.9.1/bin/cucumber:23:in `<main>'
Unable to bind to locking port 7054 within 45000 ms
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'ip-10-0-17-209', ip: '10.0.17.209', os.name: 'Linux', os.arch:
'amd64', os.version: '3.10.40-50.136.amzn1.x86_64', java.version: '1.6.0_35'
Driver info: driver.version: FirefoxDriver (org.openqa.selenium.WebDriverException)
(Selenium::WebDriver::Error::UnknownError)
[remote server] org.openqa.selenium.internal.SocketLock(SocketLock.java):98:in `lock'
[remote server] org.openqa.selenium.firefox.internal.NewProfileExtensionConnection(NewProfileExtensionConnection.java):84:in
`start'
[remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):246:in
`startClient'
[remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):114:in
`<init>'
[remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):193:in
`<init>'
[remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):186:in
`<init>'
[remote server] org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java):104:in
`<init>'
[remote server] sun.reflect.GeneratedConstructorAccessor23():-1:in `newInstance'
[remote server] sun.reflect.DelegatingConstructorAccessorImpl(DelegatingConstructorAccessorImpl.java):27:in
`newInstance'
[remote server] java.lang.reflect.Constructor(Constructor.java):513:in `newInstance'
[remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):62:in
`callConstructor'
[remote server] org.openqa.selenium.remote.server.DefaultDriverFactory(DefaultDriverFactory.java):56:in
`newInstance'
[remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):216:in
`call'
[remote server] org.openqa.selenium.remote.server.DefaultSession$BrowserCreator(DefaultSession.java):1:in
`call'
[remote server] java.util.concurrent.FutureTask$Sync(FutureTask.java):303:in `innerRun'
[remote server] java.util.concurrent.FutureTask(FutureTask.java):138:in `run'
[remote server] org.openqa.selenium.remote.server.DefaultSession$1(DefaultSession.java):170:in
`run'
[remote server] java.util.concurrent.ThreadPoolExecutor$Worker(ThreadPoolExecutor.java):886:in
`runTask'
[remote server] java.util.concurrent.ThreadPoolExecutor$Worker(ThreadPoolExecutor.java):908:in
`run'
[remote server] java.lang.Thread(Thread.java):662:in `run'

Atleast if we know how to increase this time, that would be useful

Reported by eelam.ragavan on 2014-06-30 16:31:17

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

With WebDriver 2.42.2 the same issue persist.

Exception in thread "main" org.openqa.selenium.WebDriverException: Unable to bind to
locking port 7054 within 45000 ms
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:30'
System info: host: 'INBELW012037A', ip: '192.168.1.3', os.name: 'Windows 7', os.arch:
'amd64', os.version: '6.1', java.version: '1.7.0_60'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:98)
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:84)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
    at WDEg1.main(WDEg1.java:12)

Reported by hicmurali on 2014-07-03 13:50:32

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I too am seeing this same error with my grid setup.

WebDriver 2.41.0
FF 30.0

Reported by brentbarker9 on 2014-07-03 18:12:03

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi, I also struggled with this issue recently while running Selenium tests in parallel.
I came up with the following attempts or workaround.


1. Increase timeout (default to 45 seconds) as follows:

FirefoxProfileffProfile = new FirefoxProfile();
FirefoxBinary ffBinary = new FirefoxBinary();
ffBinary.setTimeout(TimeUnit.SECONDS.toMillis(180));
WebDriver webDriver = new FirefoxDriver(ffBinary, ffProfile);

Not sure it really helps though...


2. Configure Firefox with a custom locking port (default to 7054):

FirefoxProfileffProfile = new FirefoxProfile();
ffProfile.setPreference(FirefoxProfile.PORT_PREFERENCE, aCustomPort);

Problem: this port preference is currently ignored :(
And it requires this fix to be integrated: https://code.google.com/p/selenium/issues/detail?id=5172
I currently built my own WebDriver with this fix based on official 2.42.2 release.


3. Integrate fix from https://code.google.com/p/selenium/issues/detail?id=7272

This might prevent Firefox to hang while cleaning the firefox profile.
This also requires to be integrated manually.


Option #1 might be tried right away.
Options #2 and #3 requires manual WebDriver build or waiting for next release.

HTH

Reported by Truc.NGN on 2014-07-23 13:42:48

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

hi,
Getting the same error 
I have gridsetup which users selenium2.45 jar and tests are running parallel in firefox36
browser, getting the below error 
Exception in thread "main" org.openqa.selenium.WebDriverException: Unable to bind to
locking port 7054 within 45000 ms
Build info: version: '2.45.0', revision: '32a636c', time: '2015-03-05 22:01:35'
System info: host: 'touts-4-PC', ip: '10.0.0.47', os.name: 'Windows 7', os.arch: 'amd64',
os.version: '6.1', java.version: '1.7.0_17'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:98)
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:84)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
    at test1.Test.main(Test.java:13)

Pls,Someone help me, thanks in advance

Reported by lavanya.kotam on 2015-03-17 10:35:45

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

any one can help me to run the Script

Reported by lavanya.kotam on 2015-03-17 10:36:34

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi i am also facing the same issue " Unable to bind to locking port 7054 within 45000
ms" with selenium 2.45.0 and firefox 36.0.1 version please let me know what might be
the cause.

Reported by raghu03veer on 2015-03-20 05:09:28

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi any one can help me .........Exception in thread "main" org.openqa.selenium.WebDriverException:
Unable to bind to locking port 7054 within 45000 ms

Reported by lavanya.kotam on 2015-03-20 07:45:21

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi even I was facing the same issue i.e. "org.openqa.selenium.WebDriverException".
Deleted all temp files from my system & restarted the eclipse and now it is solved
:)

Reported by bhavisachanandani on 2015-03-22 07:41:15

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Hi Even for me below fix worked for me:

Deleted all temp files from my system & restarted the eclipse and now it is solved
:)

Reported by balineni.manohar on 2015-05-19 04:11:10

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

sandun75@gmail.com

Hi 
anyone knows precise answer for above issue(org.openqa.selenium.WebDriverException:
Unable to bind to locking port 7054 within 45000 ms)  , pls share with me as I'm time
wasting on that.

Reported by sandun75 on 2015-09-02 12:22:38

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:16:20

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 4, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant