3

I'm working on Selenium and I currently have a hub connected to two vms running linux with all the browsers.

I was able to launch browsers until suddenly it just stopped . Firefox or any of the other browsers don't launch. I get the following error.

Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.

I am running Selenium-server-standalone 2.26 with firefox 16.0.2 .

Please help.

mnel
  • 113,303
  • 27
  • 265
  • 254
user1807948
  • 338
  • 6
  • 14
  • This is the error I get : Exception in thread "main" org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: Error: no display specified Error: no display specified Command duration or timeout: 45.88 seconds Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 22:18:01' System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.2', java.version: '1.7.0_09' Driver info: driver.version: RemoteWebDriver Session ID: at – user1807948 Nov 08 '12 at 02:44
  • did u try checking restarting the selenium nodes ? – Harshavardhan Konakanchi Nov 08 '12 at 14:44

1 Answers1

7

Try running this before you start your Selenium server:

export DISPLAY=:0
Amey
  • 8,470
  • 9
  • 44
  • 63
  • @Amey Where? I use Scala to do this testing and have the same error. I'm using VNC so I guess I'll have to export accordingly :6 (right now), just need to now where should I do this export – 0fnt Aug 20 '14 at 16:57
  • @user247077 On your machine terminal. `DISPLAY` is essentially an environment variable which needs to be exported from the command line. The number is obtained when you start VNC. – Amey Aug 20 '14 at 17:54
  • @Amey I understand that (Thanks though!). I need to know where should I do this export. My vnc is at :6 – 0fnt Aug 21 '14 at 11:32
  • You need to export it in the same bash environment from where you will initiate your tests. So if you are on mac, open a terminal, type `vncserver`, observe the display number(lets say its :6), then type `export DISPLAY=:6` on the terminal, *THEN* trigger your tests `scala [-cp scalatest-.jar:...] org.scalatest.tools.Runner [arguments]` – Amey Aug 21 '14 at 22:19