host not connected error although I have configured Gecko driver

Hi,

I am getting following exception while executing my selenium script. Although the firefox is getting launched but the url is not getting invoked. Request you to please help me out. The exception is as follows:

 

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7057 after 45000 ms. Firefox console output:
10srollout@mozilla.org.xpi”,”e”:true,”v”:”1.14″,”st”:1494398679741},”firefox@getpocket.com”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\firefox@getpocket.com.xpi”,”e”:true,”v”:”1.0.5″,”st”:1494398679739},”webcompat@mozilla.org”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\webcompat@mozilla.org.xpi”,”e”:true,”v”:”1.0″,”st”:1494398679732}},”app-global”:{“{972ce4c6-7e08-4474-a285-3208198ce6fd}”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi”,”e”:true,”v”:”53.0.2″,”st”:1494398679746}}}
1494486864649 addons.xpi DEBUG No changes found
1494486864656 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1494486864657 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1494486864662 addons.xpi DEBUG Calling bootstrap method startup on aushelper@mozilla.org version 2.0
1494486864663 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1494486864663 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1494486864665 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.14
1494486864666 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1494486864666 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1494486864669 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0.5
1494486864676 addons.xpi-utils DEBUG Starting async load of XPI database C:\Users\shubhasm\AppData\Local\Temp\anonymous7308607170547586686webdriver-profile\extensions.json
1494486864677 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1494486864677 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1494486864679 addons.xpi DEBUG Calling bootstrap method startup on webcompat@mozilla.org version 1.0
1494486864681 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1494486864681 addons.manager DEBUG Provider finished startup: XPIProvider
1494486864681 addons.manager DEBUG Starting provider: LightweightThemeManager
1494486864681 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1494486864682 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1494486864682 addons.manager DEBUG Starting provider: GMPProvider
1494486864688 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1494486864688 addons.manager DEBUG Provider finished startup: GMPProvider
1494486864688 addons.manager DEBUG Starting provider: PluginProvider
1494486864688 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1494486864688 addons.manager DEBUG Provider finished startup: PluginProvider
1494486864689 addons.manager DEBUG Completed startup sequence
1494486865067 addons.xpi-utils DEBUG Async JSON file read took 0 MS
1494486865067 addons.xpi-utils DEBUG Finished async read of XPI database, parsing…
1494486865070 addons.xpi-utils DEBUG Successfully read XPI database
1494486865081 addons.manager DEBUG Starting provider: <unnamed-provider>
1494486865082 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1494486865082 addons.manager DEBUG Provider finished startup: <unnamed-provider>
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1494486865180 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1494486865180 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1494486865181 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider

at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:106)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:251)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:195)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:99)
at seleniumOne.SeleniumOne.main(SeleniumOne.java:12)
Exception in thread “main” org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7057; process output follows:
10srollout@mozilla.org.xpi”,”e”:true,”v”:”1.14″,”st”:1494398679741},”firefox@getpocket.com”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\firefox@getpocket.com.xpi”,”e”:true,”v”:”1.0.5″,”st”:1494398679739},”webcompat@mozilla.org”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\webcompat@mozilla.org.xpi”,”e”:true,”v”:”1.0″,”st”:1494398679732}},”app-global”:{“{972ce4c6-7e08-4474-a285-3208198ce6fd}”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi”,”e”:true,”v”:”53.0.2″,”st”:1494398679746}}}
1494486864649 addons.xpi DEBUG No changes found
1494486864656 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1494486864657 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1494486864662 addons.xpi DEBUG Calling bootstrap method startup on aushelper@mozilla.org version 2.0
1494486864663 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1494486864663 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1494486864665 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.14
1494486864666 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1494486864666 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1494486864669 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0.5
1494486864676 addons.xpi-utils DEBUG Starting async load of XPI database C:\Users\shubhasm\AppData\Local\Temp\anonymous7308607170547586686webdriver-profile\extensions.json
1494486864677 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1494486864677 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1494486864679 addons.xpi DEBUG Calling bootstrap method startup on webcompat@mozilla.org version 1.0
1494486864681 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1494486864681 addons.manager DEBUG Provider finished startup: XPIProvider
1494486864681 addons.manager DEBUG Starting provider: LightweightThemeManager
1494486864681 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1494486864682 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1494486864682 addons.manager DEBUG Starting provider: GMPProvider
1494486864688 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1494486864688 addons.manager DEBUG Provider finished startup: GMPProvider
1494486864688 addons.manager DEBUG Starting provider: PluginProvider
1494486864688 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1494486864688 addons.manager DEBUG Provider finished startup: PluginProvider
1494486864689 addons.manager DEBUG Completed startup sequence
1494486865067 addons.xpi-utils DEBUG Async JSON file read took 0 MS
1494486865067 addons.xpi-utils DEBUG Finished async read of XPI database, parsing…
1494486865070 addons.xpi-utils DEBUG Successfully read XPI database
1494486865081 addons.manager DEBUG Starting provider: <unnamed-provider>
1494486865082 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1494486865082 addons.manager DEBUG Provider finished startup: <unnamed-provider>
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1494486865180 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1494486865180 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1494486865181 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider

Build info: version: ‘2.35.0’, revision: ‘8df0c6bedf70ff9f22c647788f9fe9c8d22210e2’, time: ‘2013-08-17 12:46:41’
System info: os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.6.0_45’
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:251)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:195)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:99)
at seleniumOne.SeleniumOne.main(SeleniumOne.java:12)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7057 after 45000 ms. Firefox console output:
10srollout@mozilla.org.xpi”,”e”:true,”v”:”1.14″,”st”:1494398679741},”firefox@getpocket.com”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\firefox@getpocket.com.xpi”,”e”:true,”v”:”1.0.5″,”st”:1494398679739},”webcompat@mozilla.org”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\webcompat@mozilla.org.xpi”,”e”:true,”v”:”1.0″,”st”:1494398679732}},”app-global”:{“{972ce4c6-7e08-4474-a285-3208198ce6fd}”:{“d”:”C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi”,”e”:true,”v”:”53.0.2″,”st”:1494398679746}}}
1494486864649 addons.xpi DEBUG No changes found
1494486864656 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1494486864657 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1494486864662 addons.xpi DEBUG Calling bootstrap method startup on aushelper@mozilla.org version 2.0
1494486864663 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1494486864663 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1494486864665 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.14
1494486864666 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1494486864666 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1494486864669 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0.5
1494486864676 addons.xpi-utils DEBUG Starting async load of XPI database C:\Users\shubhasm\AppData\Local\Temp\anonymous7308607170547586686webdriver-profile\extensions.json
1494486864677 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1494486864677 addons.xpi DEBUG Loading bootstrap scope from C:\Program Files (x86)\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1494486864679 addons.xpi DEBUG Calling bootstrap method startup on webcompat@mozilla.org version 1.0
1494486864681 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1494486864681 addons.manager DEBUG Provider finished startup: XPIProvider
1494486864681 addons.manager DEBUG Starting provider: LightweightThemeManager
1494486864681 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1494486864682 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1494486864682 addons.manager DEBUG Starting provider: GMPProvider
1494486864688 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1494486864688 addons.manager DEBUG Provider finished startup: GMPProvider
1494486864688 addons.manager DEBUG Starting provider: PluginProvider
1494486864688 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1494486864688 addons.manager DEBUG Provider finished startup: PluginProvider
1494486864689 addons.manager DEBUG Completed startup sequence
1494486865067 addons.xpi-utils DEBUG Async JSON file read took 0 MS
1494486865067 addons.xpi-utils DEBUG Finished async read of XPI database, parsing…
1494486865070 addons.xpi-utils DEBUG Successfully read XPI database
1494486865081 addons.manager DEBUG Starting provider: <unnamed-provider>
1494486865082 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1494486865082 addons.manager DEBUG Provider finished startup: <unnamed-provider>
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1494486865180 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1494486865180 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1494486865181 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider

at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:106)
… 7 more

 

The script is :

 

package seleniumOne;

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

public class SeleniumOne {

public static void main(String[] args) throws InterruptedException {
System.setProperty(“webdriver.gecko.driver”,”D:\\Shubhashish\\Selenium\\Firefox Driver\\geckodriver.exe”);

WebDriver driver = new FirefoxDriver();
Thread.sleep(5000);
driver.get(“www.google.co.in/”);
}

}

Add Comment
  • 1 Answer(s)

    I have the same issue.

    Try to add as references only selenium-server-standalone-3.4.0.jar.

    Train Answered on May 11, 2017.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.