Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 478
Khalith Basha Avatar asked Mar 05 '14 21:03

Khalith Basha


2 Answers

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

like image 141
Sitam Jana Avatar answered Sep 21 '22 03:09

Sitam Jana


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!)

like image 32
Kimar Arakaki Neves Avatar answered Sep 20 '22 03:09

Kimar Arakaki Neves