Khalith Basha
Khalith Basha

Reputation: 101

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

I am facing issue while executing the selenium scripts in firefox browser.

Console Error:

        org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
        Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
        System info: host: 'usnywqa01', ip: '10.3.3.20', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_17'
        Driver info: driver.version: FirefoxDriver
        Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
        System info: host: abc-PV-5', ip: 'XX.X.XX.XX', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_07'
        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:250)
        at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:110)
        at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:197)
        at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:190)
        at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:108)
        at sun.reflect.GeneratedConstructorAccessor51.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:62)
        at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:56)
        at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:216)
        at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:170)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

I tried by changing selenium server to 2.35 or 2.39 and I upgraded ff to 26. But it doesnt work

When I degrade my ff version to 24, my scripts are working fine.

  1. I would like to know why it is happened and root causes
  2. I would like to know what is permanent solution for above 24 version of ff.

Please help me on this.

Upvotes: 5

Views: 14729

Answers (4)

user3181500
user3181500

Reputation: 401

Issue seems to be with Firefox latest version does not support web driver. Was facing similar issue, used chrome driver instaed of Firefox and it worked.

When we download web driver and extract it to a folder, changelog file will be there, open it with notepad, supported Firefox version is mentioned. So we can successfully execute script on mentioned firefox version.

Upvotes: 1

Kimar Arakaki Neves
Kimar Arakaki Neves

Reputation: 21

I had the same message before and I actually found out that the problem was the hosts file in my Mac (/private/etc/hosts). I don't know the reason but somehow it was pointing to an invalid IP in my network. Replacing the line for localhost pointing to 127.0.0.1 solved the problem for me. In resume, I was trying to access the Firefox in some other machine (odd!)

Upvotes: 2

TheOpti
TheOpti

Reputation: 1661

I had the same problem with the same output, i.e:

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

I was using Selenium and Java in my project in Eclipse IDE and when I tried to run tests, firefox window opened, but nothing happened later (i.e. it was blank and couldn't catch the URL from my test).

Solution: I changed the version of the driver in my POM.xml file from 2.42.x to 2.43.1. I rebuilt my project and now it works fine.

Now my POM.xml file looks as follows:

<dependencies>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.43.1</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
        <scope>test</scope>
    </dependency>
</dependencies>

Just try out the newest version of selenium driver or try to downgrade firefox (when you download firefox, it automatically downloads its latest version; some people claim that downgrading to older version may help).

Upvotes: 1

Sitam Jana
Sitam Jana

Reputation: 3129

Seems like an issue with webdriver version. Can you try once with latest bindings i.e 2.40.0. To get more info on webdriver version and supported firefox version please go throgh webdriver release notes :http://selenium.googlecode.com/git/java/CHANGELOG

Upvotes: 2

Related Questions