org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:50091 [localhost/127.0.0.1] failed: Connection refused: connect Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700'

Stack Overflow | mskumar | 4 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    http.con.httphostconnection exception selenium3 and firefox 49 using gecock driver

    Stack Overflow | 7 months ago | surya135
    org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:42396 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect Build info: version: '3.0.0', revision: '350cf60', time: '2016-10-13 10:48:16 -0700' System info: host: 'sdards', ip: '192.168.1.5', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_101' Driver info: driver.version: FirefoxDriver
  2. 0

    Selenium webdriver 3.0.1 and selenium java 3.0.1

    Stack Overflow | 4 months ago | Ajveer Singh
    org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:30514 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700' System info: host: 'DESKTOP-SECO39S', ip: '192.168.1.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_111' Driver info: driver.version: FirefoxDriver
  3. 0
    samebug tip
    Take a look at this blog post on how to set up Grid2 https://goo.gl/rxzbE6. A user related (in the email group on the source) that using older selenium libs solves this exception.
    via gmane.org
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Selenium 3.3.1 - Failed to launch Firefox 52.0 in Linux

    Google Groups | 4 weeks ago | Unknown author
    org.apache.http.conn.HttpHostConnectException: Connect to localhost:30076 [localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800'System info: host: 'sdc-bpm855', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-327.36.3.el7.x86_64', java.version: '1.8.0_131'Driver info:
  6. 0

    if i'm trying to run the below written simple code then firefix will be triggered after this it'll t

    Google Groups | 2 years ago | ankit gupta
    java.version: '1.8.0_25'Driver info: driver.version: FirefoxDriver at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:130)
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.apache.http.conn.HttpHostConnectException

    Connect to localhost:50091 [localhost/127.0.0.1] failed: Connection refused: connect

    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect()
  2. Apache HttpClient
    CloseableHttpClient.execute
    1. org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158)
    2. org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    3. org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    4. org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    5. org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    6. org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    7. org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    8. org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    9. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
    10. org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
    10 frames
  3. Selenium
    RemoteWebDriver.<init>
    1. org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:142)
    2. org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:88)
    3. org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:108)
    4. org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:64)
    5. org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
    6. org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
    7. org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
    8. org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
    9. org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
    9 frames
  4. selenium-firefox-driver
    FirefoxDriver.<init>
    1. org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259)
    2. org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)
    3. org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)
    4. org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:238)
    5. org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)
    5 frames
  5. test
    Login.setup
    1. test.Login.setup(Login.java:12)
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  7. TestNG
    RemoteTestNG.main
    1. org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
    2. org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515)
    3. org.testng.internal.Invoker.invokeConfigurations(Invoker.java:217)
    4. org.testng.internal.Invoker.invokeConfigurations(Invoker.java:144)
    5. org.testng.TestRunner.beforeRun(TestRunner.java:634)
    6. org.testng.TestRunner.run(TestRunner.java:602)
    7. org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
    8. org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
    9. org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
    10. org.testng.SuiteRunner.run(SuiteRunner.java:289)
    11. org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    12. org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    13. org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
    14. org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
    15. org.testng.TestNG.runSuites(TestNG.java:1133)
    16. org.testng.TestNG.run(TestNG.java:1104)
    17. org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
    18. org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
    19. org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
    19 frames