title: Selenium startup error: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055
body: <p>I am getting this error when trying to run a very simple selenium script via java. This gets thrown a while after trying to create a new <code>FireFoxWebDriver()</code></p>
  
  <p>I have seen similar errors posted but they are quite old and none seem to have good solutions. I am using selenium-java and selenium-firefox-driver both version 2.51.0. My firefox version is 43.0.2, the selenium site says they support the latest version of firefox, so I assumed this wasn't the issue.</p>
  
  <p>Any help is much appreciated, thanks!</p>
  
  <pre><code> org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
      1455135105046   addons.xpi  INFO    Mapping fxdriver@googlecode.com to /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com
      1455135105047   addons.xpi  DEBUG   Ignoring file entry whose name is not a valid add-on ID: /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/webdriver-staging
      1455135105047   addons.xpi  INFO    SystemAddonInstallLocation directory is missing
      1455135105047   addons.xpi  INFO    Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
      1455135105047   addons.xpi  DEBUG   Skipping unavailable install location app-system-share
      1455135105048   addons.xpi  DEBUG   checkForChanges
      1455135105048   addons.xpi  DEBUG   Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"/var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.40.0","st":1455135098000,"mt":1455135098000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0.2","st":1451941111000,"mt":1451941105000}}}
      1455135105049   addons.xpi  DEBUG   Existing add-on fxdriver@googlecode.com in app-profile
      1455135105049   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
      1455135105049   addons.xpi  DEBUG   Existing add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
      1455135105049   addons.xpi  DEBUG   getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"/var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.40.0","st":1455135098000,"mt":1455135098000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0.2","st":1451941111000,"mt":1451941105000}}}
      1455135105050   addons.xpi  DEBUG   No changes found
      1455135105056   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
      1455135105056   addons.manager  DEBUG   Provider finished startup: XPIProvider
      1455135105057   addons.manager  DEBUG   Starting provider: LightweightThemeManager
      1455135105057   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
      1455135105057   addons.manager  DEBUG   Provider finished startup: LightweightThemeManager
      1455135105058   addons.manager  DEBUG   Starting provider: GMPProvider
      1455135105061   addons.manager  DEBUG   Registering shutdown blocker for GMPProvider
      1455135105061   addons.manager  DEBUG   Provider finished startup: GMPProvider
      1455135105061   addons.manager  DEBUG   Starting provider: PluginProvider
      1455135105062   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
      1455135105062   addons.manager  DEBUG   Provider finished startup: PluginProvider
      1455135105062   addons.manager  DEBUG   Completed startup sequence
      1455135105092   addons.xpi-utils    DEBUG   Starting async load of XPI database /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions.json
      *** Blocklist::_loadBlocklistFromFile: blocklist is disabled
      1455135105216   addons.manager  DEBUG   Starting provider: &lt;unnamed-provider&gt;
      1455135105216   addons.manager  DEBUG   Registering shutdown blocker for &lt;unnamed-provider&gt;
      1455135105216   addons.manager  DEBUG   Provider finished startup: &lt;unnamed-provider&gt;
      1455135105625   addons.xpi-utils    DEBUG   Async JSON file read took 0 MS
      1455135105625   addons.xpi-utils    DEBUG   Finished async read of XPI database, parsing...
      1455135105626   addons.xpi-utils    DEBUG   Successfully read XPI database
      1455135105684   addons.manager  DEBUG   Starting provider: PreviousExperimentProvider
      1455135105684   addons.manager  DEBUG   Registering shutdown blocker for PreviousExperimentProvider
      1455135105685   addons.manager  DEBUG   Provider finished startup: PreviousExperimentProvider
  
          at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
          at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:247)
          at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:112)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:192)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:187)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:183)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:96)
          at selenium.AppDriverImpl.&lt;init&gt;(AppDriverImpl.java:35)
          at selenium.SeleniumTestIT.test(SeleniumTestIT.java:50)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:497)
          at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
          at org.junit.rules.RunRules.evaluate(RunRules.java:20)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
          at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
          at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
          at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
          at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
          at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
  
      org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/Applications/Firefox.app/Contents/MacOS/firefox-bin) on port 7055; process output follows: 
      1455135105046   addons.xpi  INFO    Mapping fxdriver@googlecode.com to /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com
      1455135105047   addons.xpi  DEBUG   Ignoring file entry whose name is not a valid add-on ID: /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/webdriver-staging
      1455135105047   addons.xpi  INFO    SystemAddonInstallLocation directory is missing
      1455135105047   addons.xpi  INFO    Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
      1455135105047   addons.xpi  DEBUG   Skipping unavailable install location app-system-share
      1455135105048   addons.xpi  DEBUG   checkForChanges
      1455135105048   addons.xpi  DEBUG   Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"/var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.40.0","st":1455135098000,"mt":1455135098000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0.2","st":1451941111000,"mt":1451941105000}}}
      1455135105049   addons.xpi  DEBUG   Existing add-on fxdriver@googlecode.com in app-profile
      1455135105049   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
      1455135105049   addons.xpi  DEBUG   Existing add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
      1455135105049   addons.xpi  DEBUG   getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"/var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.40.0","st":1455135098000,"mt":1455135098000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0.2","st":1451941111000,"mt":1451941105000}}}
      1455135105050   addons.xpi  DEBUG   No changes found
      1455135105056   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
      1455135105056   addons.manager  DEBUG   Provider finished startup: XPIProvider
      1455135105057   addons.manager  DEBUG   Starting provider: LightweightThemeManager
      1455135105057   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
      1455135105057   addons.manager  DEBUG   Provider finished startup: LightweightThemeManager
      1455135105058   addons.manager  DEBUG   Starting provider: GMPProvider
      1455135105061   addons.manager  DEBUG   Registering shutdown blocker for GMPProvider
      1455135105061   addons.manager  DEBUG   Provider finished startup: GMPProvider
      1455135105061   addons.manager  DEBUG   Starting provider: PluginProvider
      1455135105062   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
      1455135105062   addons.manager  DEBUG   Provider finished startup: PluginProvider
      1455135105062   addons.manager  DEBUG   Completed startup sequence
      1455135105092   addons.xpi-utils    DEBUG   Starting async load of XPI database /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions.json
      *** Blocklist::_loadBlocklistFromFile: blocklist is disabled
      1455135105216   addons.manager  DEBUG   Starting provider: &lt;unnamed-provider&gt;
      1455135105216   addons.manager  DEBUG   Registering shutdown blocker for &lt;unnamed-provider&gt;
      1455135105216   addons.manager  DEBUG   Provider finished startup: &lt;unnamed-provider&gt;
      1455135105625   addons.xpi-utils    DEBUG   Async JSON file read took 0 MS
      1455135105625   addons.xpi-utils    DEBUG   Finished async read of XPI database, parsing...
      1455135105626   addons.xpi-utils    DEBUG   Successfully read XPI database
      1455135105684   addons.manager  DEBUG   Starting provider: PreviousExperimentProvider
      1455135105684   addons.manager  DEBUG   Registering shutdown blocker for PreviousExperimentProvider
      1455135105685   addons.manager  DEBUG   Provider finished startup: PreviousExperimentProvider
  
      Build info: version: '2.42.2', revision: '6a6995d31c7c56c340d6f45a76976d43506cd6cc', time: '2014-06-03 10:52:47'
      System info: host: 'Caseys-MBP-2', ip: '192.168.1.75', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.3', java.version: '1.8.0_45'
      Driver info: driver.version: FirefoxDriver
          at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:130)
          at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:247)
          at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:112)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:192)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:187)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:183)
          at org.openqa.selenium.firefox.FirefoxDriver.&lt;init&gt;(FirefoxDriver.java:96)
          at selenium.AppDriverImpl.&lt;init&gt;(AppDriverImpl.java:35)
          at selenium.SeleniumTestIT.test(SeleniumTestIT.java:50)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
          at org.junit.rules.RunRules.evaluate(RunRules.java:20)
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
          at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
          at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
          at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
      Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
      1455135105046   addons.xpi  INFO    Mapping fxdriver@googlecode.com to /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com
      1455135105047   addons.xpi  DEBUG   Ignoring file entry whose name is not a valid add-on ID: /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/webdriver-staging
      1455135105047   addons.xpi  INFO    SystemAddonInstallLocation directory is missing
      1455135105047   addons.xpi  INFO    Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
      1455135105047   addons.xpi  DEBUG   Skipping unavailable install location app-system-share
      1455135105048   addons.xpi  DEBUG   checkForChanges
      1455135105048   addons.xpi  DEBUG   Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"/var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.40.0","st":1455135098000,"mt":1455135098000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0.2","st":1451941111000,"mt":1451941105000}}}
      1455135105049   addons.xpi  DEBUG   Existing add-on fxdriver@googlecode.com in app-profile
      1455135105049   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
      1455135105049   addons.xpi  DEBUG   Existing add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
      1455135105049   addons.xpi  DEBUG   getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"/var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions/fxdriver@googlecode.com","e":false,"v":"2.40.0","st":1455135098000,"mt":1455135098000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"43.0.2","st":1451941111000,"mt":1451941105000}}}
      1455135105050   addons.xpi  DEBUG   No changes found
      1455135105056   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
      1455135105056   addons.manager  DEBUG   Provider finished startup: XPIProvider
      1455135105057   addons.manager  DEBUG   Starting provider: LightweightThemeManager
      1455135105057   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
      1455135105057   addons.manager  DEBUG   Provider finished startup: LightweightThemeManager
      1455135105058   addons.manager  DEBUG   Starting provider: GMPProvider
      1455135105061   addons.manager  DEBUG   Registering shutdown blocker for GMPProvider
      1455135105061   addons.manager  DEBUG   Provider finished startup: GMPProvider
      1455135105061   addons.manager  DEBUG   Starting provider: PluginProvider
      1455135105062   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
      1455135105062   addons.manager  DEBUG   Provider finished startup: PluginProvider
      1455135105062   addons.manager  DEBUG   Completed startup sequence
      1455135105092   addons.xpi-utils    DEBUG   Starting async load of XPI database /var/folders/hn/5gwsh3wj3v198z7w59srnrh00000gn/T/anonymous724724030317929263webdriver-profile/extensions.json
      *** Blocklist::_loadBlocklistFromFile: blocklist is disabled
      1455135105216   addons.manager  DEBUG   Starting provider: &lt;unnamed-provider&gt;
      1455135105216   addons.manager  DEBUG   Registering shutdown blocker for &lt;unnamed-provider&gt;
      1455135105216   addons.manager  DEBUG   Provider finished startup: &lt;unnamed-provider&gt;
      1455135105625   addons.xpi-utils    DEBUG   Async JSON file read took 0 MS
      1455135105625   addons.xpi-utils    DEBUG   Finished async read of XPI database, parsing...
      1455135105626   addons.xpi-utils    DEBUG   Successfully read XPI database
      1455135105684   addons.manager  DEBUG   Starting provider: PreviousExperimentProvider
      1455135105684   addons.manager  DEBUG   Registering shutdown blocker for PreviousExperimentProvider
      1455135105685   addons.manager  DEBUG   Provider finished startup: PreviousExperimentProvider
  
          at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
          ... 30 more
  </code></pre>