0

On our build server (bamboo launched) we are wanting to do selenium tests, to do this we are running xvfb-run, this works on our local servers which are all of the same type.

If I log on to the build server and run: xvfb-run echo 'i' I get the error: xvfb-run: error: Xvfb failed to start

I have tried running like this: xvfb-run -a echo 'i' This time it just hangs and never finishes, any ideas on things I can try?

Thanks

Kevin
  • 383
  • 5
  • 16
  • Sorry, I didn't understand your problem, are u trying to run your selenium tests in your build server with the xvfb? Which driver are u using? – Pedro Henrique Sep 17 '15 at 12:38
  • its just using xvfb-run to run headless tests for behat testing, selenium/mink is the driver, so it uses the selenium jar file - similar to basically running `java selenium.jar` which doesn't run it headless, so using xvfb-run to make it headless – Kevin Sep 17 '15 at 15:04

2 Answers2

1

Run following commands:

sudo nohup Xvfb :40 -ac &
export DISPLAY=:40
Mahsum Akbas
  • 1,523
  • 3
  • 21
  • 38
  • Running this gave the following response: `[1] 562` followed by `nohup: ignoring input and appending output to 'output.out'` but never actually comes back. – Kevin Sep 17 '15 at 15:03
0

Since it works locally, I suspect a server or permissions issue is going on. Perhaps your user can't open up a lock file in /tmp ? Try to get more info about the problem by running:

xvfb-run -e /dev/stdout [mycommand]
user2687058
  • 166
  • 1
  • 2
  • 10
  • The error received is: `(EE) Fatal server error: (EE) Server is already active for display 99 If this server is no longer running, remove /tmp/.X99-lock and start again. (EE)` – Kevin Sep 22 '15 at 09:57
  • Well, that seems self explanatory. There's a lock file, so either you have a problem from a previous run or there's another process taking up that display. Get everything cleanly stopped, remove the lock file(s) and try again. – user2687058 Sep 22 '15 at 15:49
  • Its not from a previous run as its a brand new server booted from bamboo... i've deleted that lock file, but get the exact same error. – Kevin Sep 23 '15 at 09:51
  • Any success on this? – Tarun Jun 23 '18 at 17:10