Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#91 Xvfb failed to start fix #256

Closed

Conversation

gurukiran007
Copy link

@gurukiran007 gurukiran007 commented Aug 5, 2016

The fix is to make sure that the password used by VNC is created by "seluser" and not as root due to which the entrypoint script fails. Only
impacts all debug node containers
This must fix issues i guess:
#91
#205
#76
#257
#253

"seluser" and not as root due to which the entrypoint script fails. Only
impacts all debug node containers
@marcinbojanowski
Copy link

Works for me! :D

@alexgandy
Copy link

Worked for me as well

@ahmadrabie
Copy link

I need this too.
@kayabendroth please merge it ASAP.
Thanks :)

@saikrishna321
Copy link

@kayabendroth can this be merged

@zouxuoz
Copy link

zouxuoz commented Sep 13, 2016

@kayabendroth merge this please

@pproenca
Copy link

@kayabendroth is it possible to merge this PR?

@schmunk42
Copy link
Contributor

Ping...

@ddavison
Copy link
Member

could you please rebase your branch? then i'll merge it in

@zouxuoz
Copy link

zouxuoz commented Sep 29, 2016

//summon @gurukiran007

Conflicts:
	NodeChromeDebug/Dockerfile
	NodeFirefoxDebug/Dockerfile
	StandaloneChromeDebug/Dockerfile
	StandaloneFirefoxDebug/Dockerfile
@gurukiran007
Copy link
Author

Done can you guys see if this helps now...

@vikramvi
Copy link

@gurukiran007 I tried docker run -P -p 5901:5901 -e no_proxy=localhost -e HUB_ENV_no_proxy=localhost --link selenium-hub:hub selenium/node-chrome-debug:2.53.1 and got error

Unable to find image 'selenium/node-chrome-debug:2.53.1' locally
Pulling repository docker.io/selenium/node-chrome-debug
docker: Tag 2.53.1 not found in repository docker.io/selenium/node-chrome-debug.
See 'docker run --help'.

@gurukiran007
Copy link
Author

@vikramvi does that work on master for you ?

@vikramvi
Copy link

@gurukiran007 can you please give command which I can try , struggling with debug version since almost 1/2 day now :( thanks in advance.

@gurukiran007
Copy link
Author

gurukiran007 commented Sep 29, 2016

@vikramvi :
STEP 1: build the version you want, after you have cloned the repo, run this: VERSION=2.53.1 make build
STEP 2: build the images you want from the docker files generated from step 1
STEP 3: Run the command you shared

@ddavison can you please merge this to master. I have rebased the branch from master.
@kayabendroth merge this please

@gurukiran007
Copy link
Author

@kayabendroth can you help please i cannot understand why the build fails after i have rebased from master

@schmunk42
Copy link
Contributor

@gurukiran007 From the logs it looks to me like test.sh is not building selenium/test:local for some reason.

I'd also expect to see the echo output from https://github.com/gurukiran007/docker-selenium/blob/89a6026d5191bab02c1e254bff44c251724c373e/test.sh#L22 in the logs?!

@ddavison
Copy link
Member

yea - i've been fiddling around with it trying to get it to work to no avail.. i'm very tempted to wipe it out and try something with travis

@ddavison
Copy link
Member

ddavison commented Sep 29, 2016

good news! i've got travis integration working. i'll be working on implementing this, then working on getting this in

@ddavison
Copy link
Member

do me a favor @gurukiran007 and push another commit.. your build should pass when run through travis. (gotta invoke it first with a commit)

Adding just a space to commit and trigger the build
@ddavison
Copy link
Member

ddavison commented Sep 30, 2016

one more test, then this puppy is going in. give me a little

@gurukiran007
Copy link
Author

Sounds good thanks @ddavison

@ddavison
Copy link
Member

ddavison commented Sep 30, 2016

@gurukiran007 , are you able to successfully run your NodeChromeDebug container? i see that it's done waiting for xvfb, but fails on Xserver stuff, ultimately killing the container

dj@Daniels-MBP:~/workspace/docker-selenium|0472fd3
⇒  docker run 02a38ad73b5b
/opt/bin/entry_point.sh: line 5: /opt/bin/clear_x_locks.sh: No such file or directory
Waiting xvfb...
-bash: 169.254/16: No such file or directory
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
dj@Daniels-MBP:~/workspace/docker-selenium|0472fd3
⇒

@gurukiran007
Copy link
Author

Let me re test it locally ... that does not look right ...

@ddavison
Copy link
Member

ddavison commented Oct 1, 2016

were you able to find out the issue? the chrome-debug image is still unstable for some reason.. i haven't been able to narrow it down just yet

@ddavison ddavison closed this in 261242d Oct 2, 2016
@ddavison
Copy link
Member

ddavison commented Oct 2, 2016

i found the issue - it's due to this issue in docker that i was unable to build successfully.

@gurukiran007
Copy link
Author

Thanks @ddavison for closing that and sharing the docker bug.. the explains the local issue i had as well.. 👍

@ddavison
Copy link
Member

ddavison commented Oct 2, 2016

sorry i couldn't give your commit credit there.. i did pull pieces of yours in to use, but i'm trying to organize everything in the repository.. merging it in from github would've been uncomfortable as it is right now.. it'll be stable shortly, where i can accept PR's from github 😊

@ddavison
Copy link
Member

ddavison commented Oct 3, 2016

wait, @gurukiran007 - what were we thinking.. the entry_point.sh is called by root, NOT seluser. the xvfb-run command is executed by seluser, not root. and the x11vnc command is run by root, not seluser.

a lot of people said this works for them, but it makes no sense why it does. i just took a look at #291 and this happens when .vnc/ is in /home/seluser, but passes when in /root/.vnc.

@gurukiran007
Copy link
Author

@ddavison I see what you mean,
The fix was done before the new call/last call in the script with x11vnc is being made in entry_point.sh presently,

The defect it fixed was that the docker file created the password with root: http://screencast.com/t/DIIpZvARg
And tried to access it using seluser http://screencast.com/t/sj0QLXfspi
But as you mentioned now that we have one more call to start the x11vnc would be happy if i do that as seluser as well?

@ddavison
Copy link
Member

ddavison commented Oct 3, 2016

well, i have #292 working right now, so i think i'll merge that in. I don't believe it matters who is running x11vnc

@ddavison ddavison closed this Oct 3, 2016
@gurukiran007
Copy link
Author

Ok, but i believe that fix will again not allow the VNC server to be up as xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" tries to look for password in seluser home directory but the password is saved in root home and hence will fail

@ddavison
Copy link
Member

ddavison commented Oct 3, 2016

i believe your assumption is incorrect. xvfb-run runs as seluser, sure, but x11vnc running as root really doesn't matter vs running as seluser.

chrome-debug-vnc

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

Successfully merging this pull request may close these issues.

10 participants