Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

kill: Operation not permitted #458

Closed
thePanz opened this issue Feb 14, 2018 · 5 comments
Closed

kill: Operation not permitted #458

thePanz opened this issue Feb 14, 2018 · 5 comments
Labels

Comments

@thePanz
Copy link

thePanz commented Feb 14, 2018

I am getting the following message when booting up a machine:

==> php-7.1: Machine booted and ready!
#<Thread:0x000055bba4492158@/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/wait_for_communicator.rb:21 aborting> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
        19: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/action/builtin/wait_for_communicator.rb:26:in `block in call'
        18: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/machine.rb:514:in `state'
        17: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/provider.rb:87:in `state'                                                                                                                                                                             
        16: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/driver.rb:235:in `state'                                                                                                                                                                              
        15: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/driver/cli.rb:50:in `state'                                                                                                                                                                           
        14: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/driver/cli.rb:161:in `run'                                                                                                                                                                            
        13: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/sudo_wrapper.rb:32:in `run'                                                                                                                                                                           
        12: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/sudo_wrapper.rb:58:in `execute'                                                                                                                                                                       
        11: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/retryable.rb:17:in `retryable'                                                                                                                                                                                
        10: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/sudo_wrapper.rb:60:in `block in execute'                                                                                                                                                              
         9: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/sudo_wrapper.rb:93:in `raw'                                                                                                                                                                           
         8: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/busy.rb:19:in `busy'                                                                                                                                                                                          
         7: from /home/ema/.vagrant.d/gems/2.5.0/gems/vagrant-lxc-1.3.1/lib/vagrant-lxc/sudo_wrapper.rb:94:in `block in raw'                                                                                                                                                                  
         6: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/subprocess.rb:22:in `execute'                                                                                                                                                                                 
         5: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/subprocess.rb:254:in `execute'                                                                                                                                                                                
         4: from /opt/vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/subprocess.rb:254:in `ensure in execute'                                                                                                                                                                      
         3: from /opt/vagrant/embedded/gems/gems/childprocess-0.6.3/lib/childprocess/unix/process.rb:12:in `stop'
         2: from /opt/vagrant/embedded/gems/gems/childprocess-0.6.3/lib/childprocess/unix/process.rb:61:in `send_term'
         1: from /opt/vagrant/embedded/gems/gems/childprocess-0.6.3/lib/childprocess/unix/process.rb:72:in `send_signal'
/opt/vagrant/embedded/gems/gems/childprocess-0.6.3/lib/childprocess/unix/process.rb:72:in `kill': Operation not permitted (Errno::EPERM)

Vagrant: v2.0.2
Vagrantl-lxc: v1.3.1
LXC: v2.0.8

@ghost
Copy link

ghost commented Feb 15, 2018

You get that every time? Could you try again with --debug?

@ccope
Copy link
Contributor

ccope commented Feb 15, 2018

The stacktrace is because Vagrant::LXC::Driver::CLI::run calls into Vagrant::LXC::SudoWrapper::raw which calls Vagrant::Util::Subprocess. This function has a timeout, and if it tries to kill the command if it's stuck. All of the lxc commands are run via sudo though, so it doesn't have the privileges to kill it. Vagrant could really use a nice interface like machine.communicate for running commands on the host...

@ccope
Copy link
Contributor

ccope commented Feb 15, 2018

As for @thePanz's issue, either there's a network misconfiguration or the container is failing to start due to some configuration problem. Try running sudo lxc-ls -f to see if your container is running and has an IP address. If there's no IP, start looking at your bridge configuration and dhcp server. If it's not running at all, try starting it by hand, with sudo lxc-start -n containername -l debug -o logfile. If it doesn't start, post the log file and your /var/lib/lxc/containername/config (note: you have to be root before attempting to tab complete that path, /var/lib/lxc is only readable by root)

@thePanz
Copy link
Author

thePanz commented Feb 15, 2018

@ccope @hsoft The issue is quite random, I started the machine (after a reboot) and the error is not displayed anymore.
Can we keep this issue open (or labelled as "to be confirmed") so I can post new insights as soon the issue manifests again?

@fgrehm fgrehm added the ignored label Nov 17, 2022
@fgrehm
Copy link
Owner

fgrehm commented Nov 17, 2022

Hey, sorry for the silence here but this project is looking for maintainers 😅

As per #499, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue 👋

@fgrehm fgrehm closed this as completed Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants