I am unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. firefox console output: , what must I do to fix this error?

629    Asked by AlanTaylor in Cyber Security , Asked on Feb 15, 2022

My script is not running even by using selenium 2.53.1 and firefox 47.0.1. Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. is the error returned.

The script that was tried is,


package SystemPackTest; 

import org.openqa.selenium.WebDriver; 

import org.openqa.selenium.firefox.FirefoxDriver; 

public class TestClass { 
    public static void main(String[] args) { 
        WebDriver driver ;
        System.setProperty("webdriver.gecko.driver", "");
        driver = new FirefoxDriver(); 
        driver.get("google.com"); 
        System.out.println("Successfully opened the website"); 
        //driver.close(); 
    } 

How to fix the error, Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms?


Answered by Alexander Coxon

As you are unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. firefox console output:, you can try the following solutions -


Solution 1 -

I will suggest downgrading (replace with older version) your ff browser version. You are unable to connect to 127.0.0.1 maybe because versions do not support each other. Upgrading or downgrading versions for Selenium or FF will resolve the issue. Note - Prefer to downgrade FF version, I got success with such approach. Solution 2 - Try running this before you start your Selenium server:

  export DISPLAY=:0

DISPLAY is essentially an environment variable which needs to be exported from the command line.



Your Answer

Interviews

Parent Categories