title: Selenium webdriver: Connection refused (connection refused) error in Ubuntu14.04
body: <p>I'm trying to set up selenium webdriver3.4 in Ubuntu14.04 . While running selenium script I'm getting HttpHostConnectionException error. Please find below the script that I have used and the error:</p>
  
  <pre><code>import java.util.concurrent.TimeUnit;
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.firefox.FirefoxDriver;
  import org.testng.annotations.BeforeTest;
  import org.testng.annotations.Test;
  
  public class SampleTest {
      WebDriver driver;
    @BeforeTest
    public void f() {
        System.setProperty("webdriver.gecko.driver","/usr/local/bin/geckodriver");
        driver = new FirefoxDriver(); 
         }
  
       @Test
       public void approvelisting() 
       {
          driver.get("https://&lt;domain name&gt;/");
          driver.manage().timeouts().implicitlyWait(500, TimeUnit.SECONDS);
    }
  }
  </code></pre>
  
  <blockquote>
    <p>[RemoteTestNG] detected TestNG version 6.12.0
    1507297197197   geckodriver INFO    geckodriver 0.19.0
    1507297197226   geckodriver INFO    Listening on 127.0.0.1:13663
    FAILED CONFIGURATION: @BeforeTest f
    org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:13663 [localhost/127.1.0.0] failed: Connection refused (Connection refused)
    Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
    System info: host: 'admin-coddletech', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.16.0-30-generic', java.version: '1.8.0_141'
    Driver info: driver.version: FirefoxDriver</p>
  </blockquote>
  
  <p>Please help me on troubleshooting this exception</p>