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

--nocleanup argument unable to run rviz2 after re-entering container #170

Closed
MrOCW opened this issue Feb 4, 2022 · 2 comments
Closed

--nocleanup argument unable to run rviz2 after re-entering container #170

MrOCW opened this issue Feb 4, 2022 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MrOCW
Copy link

MrOCW commented Feb 4, 2022

Hi,

I ran
rocker --nocleanup --nvidia --x11 --privileged --network host --volume xxxxx -- osrf/ros:galactic-desktop
and rviz2 works but after exiting,
running docker start <container_id> gives me
Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/tmp/.dockercfa2413r.xauth" to rootfs at "/tmp/.dockercfa2413r.xauth" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type Error: failed to start containers: <container_id>

running docker run -it --network host --gpus all --privileged -v xxxxxx -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 -e XAUTHORITY=/tmp/.dockercfa2413r.xauth -v /tmp/.dockercfa2413r.xauth:/tmp/.dockercfa2413r.xauth -v /tmp/.X11-unix:/tmp/.X11-unix -v /etc/localtime:/etc/localtime:ro <image_id>
enters a new container and rviz2 gives me:

No protocol specified
qt.qpa.xcb: could not connect to display :1
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
@tfoote tfoote added bug Something isn't working help wanted Extra attention is needed labels Mar 3, 2022
@tfoote
Copy link
Collaborator

tfoote commented Mar 3, 2022

Reentry isn't something that I've tested.

The xauthority file is a temporary file created speficificailly for this launch and gets cleaned up by rocker at the end. So when you try to restart the container it tries to remount the file that doesn't exist. I think that the temporary xauth file needs to be persisted if the --nocleanup option is used.

I confirmed this seems to fix the problem by recreating the xauth file manually then I was able to restart the container.

@MrOCW MrOCW closed this as completed Mar 15, 2022
@felixf4xu
Copy link

this seems to fix the problem by recreating the xauth file manually

Could you share how to recreate the /tmp/.dockercfa2413r.xauth file (or folder) manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants