-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
lxc-attach stopped working since 0.6.4 #2278
Comments
One thing that always works is "nsenter". It's a command part of util-linux (newer version needed depending on your distro) You use it like this: PID is the pid of the first process in the container (not lxc-start but the one with pid 1 inside) Obviously that does not solve the problem with lxc-attach but at least it will always work even if/when docker drops lxc. |
Yep, or drop bare lxc over to libvirt-lxc, thx for the idea ! |
Seems to rework on this setup:
|
I think this commit from lxc: lxc/lxc@69733b5 may have fixed it all, and so we may urgently document that ... |
Yes, confirmed that this bug is on the LXC side of the moon. |
@spahl, do you often use |
I only discovered a few months ago and haven't used it as much as |
@spahl thanks for pointing out the useful command :D |
Sorry for hijacking this old thread, but just wanted to link to: https://jpetazzo.github.io/2014/03/23/lxc-attach-nsinit-nsenter-docker-0-9/. Newer docker versions use libcontainer instead of the lxc driver so lxc-attach does not work anymore. See also: https://github.com/jpetazzo/nsenter |
I dont know why and how, but i was used to use lxc-attach to run an arbitrary command on a running docker container. i get a "lxc-attach: failed to get the init pid" error
I dont know if it can be a clue, but it seems lxc-attach didnt find a socket:
The text was updated successfully, but these errors were encountered: