Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Getting "webkit_server: cannot connect to X server" on CI #279

Closed
bcardarella opened this issue Feb 22, 2012 · 9 comments
Closed

Getting "webkit_server: cannot connect to X server" on CI #279

bcardarella opened this issue Feb 22, 2012 · 9 comments

Comments

@bcardarella
Copy link

I've set the driver to :webkit_debug and here is the output:

~/jobs/app/workspace$ rspec spec/requests/invitation_spec.rb 
webkit_server: cannot connect to X server 
webkit_server: cannot connect to X server 
Fwebkit_server: cannot connect to X server 
webkit_server: cannot connect to X server 
F

Failures:

  1) Requesting an invitation with valid information
     Failure/Error: visit root_path
     Capybara::TimeoutError:
       timed out
     # ./spec/requests/invitation_spec.rb:5:in `block (2 levels) in <top (required)>'

  2) Requesting an invitation with invalid information
     Failure/Error: visit root_path
     Capybara::TimeoutError:
       timed out
     # ./spec/requests/invitation_spec.rb:5:in `block (2 levels) in <top (required)>'

Finished in 20.55 seconds
2 examples, 2 failures

Thoughts?

@bcardarella
Copy link
Author

nm

@constantine-nikolaou
Copy link

@bcardarella what's nm? I am getting the same error on Jenkins (ubuntu box) and there isn't much on google or even debugging that helps much.

@bcardarella
Copy link
Author

@cnicolaou nm = never mind

This issue was two months ago, I should have documented why it was a non-issue as I cannot recall why now. Sorry.

@constantine-nikolaou
Copy link

@bcardarella no worries, if by any chance you remember how you solved it, please let us know

@kylefritz
Copy link

@cnicolaou i'm also seeing that webkit_server: cannot connect to X server. did you track it down?

@constantine-nikolaou
Copy link

Yes @kylefritz, i was able to run jenkins smoothly after following the instructions here: http://stackoverflow.com/a/646947/449483 (xhost ...) before Jenkins is started.

@kylefritz
Copy link

thanks for the tip @cnicolaou. i'm trying to run as the default ubuntu account, so tired

$ export DISPLAY=:0.0
$ xhost +local:ubuntu

and got back

xhost: unable to open display ":0.0"

any ideas?

@nuc
Copy link

nuc commented Jul 4, 2012

The way to make it work is:

Xvfb :1 -screen 0 1024x768x16 -nolisten inet6
export DISPLAY=localhost:1.0

I hope it will help somebody :)

@ghost
Copy link

ghost commented Jan 22, 2013

@nuc-gr Thanks for taking the time to post this here. It worked just fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants