-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Too many open files - getcwd (Errno::EMFILE) #2435
Comments
I upgraded virtualbox to 4.3.0 and see the same issue. I also tried this but it didn't work: config.vm.provision :shell, :inline => "ulimit -n 4048" |
Seeing the same issue. |
Setting the number of allowed open files to 4048 on the CL before calling |
@manuelmeurer thanks - it worked for me if I put the shell inline at the very top of the configure block; and even in that case, in some occasions, it will still fail. But thanks for mentioning this, since it now works 90% of the time :-) |
On another project, I have to do ulimit -n 4048 from the CL to fix things, indeed. |
Vagrant itself doesn't use many file handles (and when it does it closes them) so I'm unsure where this could be coming from. Without more info I'm going to close this since the workaround is so easy (just increase max files). |
It would be nice if the underlying issue on this could be resolved as this continues to be an issue. Even tho we can do the |
Yeah I can't reproduce this. It seems odd since I feel like I'm pretty good about file descriptors and Vagrant shouldn't use that many anyways. Would love more info. |
This is an issue for me too, which I've never had before I upgraded both Vagrant and VirtualBox. The ulimit fix does not work for me. I'm afraid I couldn't tell whether VB or Vagrant causing the problem :
Error Output [http://paste.ubuntu.com/6866112/] PS It would appear that is the shared folders that are causing the issue on my setup. |
It's still an issue apparently. https://gist.github.com/bjones/f2411b9b94ac5ff4483a If it helps, I then did halt and reload and it worked. |
I too get this when doing $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'puppetlabs/debian-7.4-64-puppet'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'puppetlabs/debian-7.4-64-puppet' is up to date...
==> default: Setting the name of the VM: test-box_default_1405346023035_89011
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
==> default: Running cleanup tasks for 'shell' provisioner...
==> default: Running cleanup tasks for 'puppet' provisioner...
/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/subprocess.rb:42:in `pwd': Too many open files - getcwd (Errno::EMFILE)
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/subprocess.rb:42:in `execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/subprocess.rb:22:in `execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/driver/base.rb:372:in `block in raw'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/driver/base.rb:371:in `raw'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/driver/base.rb:310:in `block in execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/retryable.rb:17:in `retryable'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/driver/base.rb:305:in `execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/driver/version_4_3.rb:241:in `read_forwarded_ports'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/driver/version_4_3.rb:490:in `ssh_port'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/provider.rb:67:in `ssh_info'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:367:in `ssh_info'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/communicators/ssh/communicator.rb:138:in `ready?'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/communicators/ssh/communicator.rb:62:in `block in wait_for_ready'
from /Applications/Vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/communicators/ssh/communicator.rb:39:in `wait_for_ready'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call' My Vagrantfile:
And the shell provisioning script:
Using Vagrant 1.6.3 on OS X 10.9.4. |
So I ran into this issue and used the workaround *on my host* terminal to get the machine to boot more than just one time (
|
It seems that on OS X Mavericks the default |
Further to @agis-'s comment, I can confirm that I also found it was the OS X host machine's |
On my machine, |
"ulimit -n" is different from ulimit. More info here: https://docs.mongodb.com/manual/reference/ulimit/ |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
While doing
vagrant up
on a precise64 box with virtualbox 4.2.18 r88780 and vagrant 1.3.5, I'm getting these errors.It occurs only if I try to use a synced folder using this (if I remove this, the issue disappears):
I did not include the full verbose log publicly because I'm concerned about leaking some client related data, but I could send it to you privately though.
The text was updated successfully, but these errors were encountered: