-
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
Vagrant / Virtualbox crashes when installing npm modules #2786
Comments
|
Also, this might be better placed in the VirtualBox forums, but I wanted to start an issue here first just to make sure. |
|
https://gist.github.com/arekkas/8318589 Unfortunately I don't know how to open the npm-debug.log file, since the VM crashes :D |
|
I've also found some problems which could be related to this one:
However, the physical network is on both hosts (Windows and Mac) the same. Although the one is connected through WLAN (Mac) and the other through LAN (Windows) |
|
Is there a way to not let vagrant destroy the box when it crashes so I can recover the virtualbox.log file? |
Haha, gotcha. =) Unfortunately I have no idea what is happening based on the Vagrant log. But I'm not sure the VM actually crashes or if the connection is just lost. Vagrant will destroy the box in both cases. You could run |
|
Nope, the VM crashes, since |
|
|
|
Yes I think it is an VirtualBox bug. I've already created a ticket here: https://www.virtualbox.org/ticket/12588 |
|
I'm closing this for now. Please reopen if you get information what Vagrant could do to avoid the issue. |
|
Will do, thank you for your support! |
|
By the way, the guest additions of the |
|
Agreed, but some people still use 4.2.x while others 4.3.y. But you can use vagrant-vbguest plugin to automatically keep them in sync with the VirtualBox version on your host. I though I checked from your log that the versions matched but apparently didn't. Must have been other case. Too much debug log again today for me. ;) |
|
Ah cool, thanks for the tip :) |
|
I'm sorry for posting here again, but this has to do something with the combination of vagrant and virtualbox. I've created a custom debian box with most of the stuff I need pre-configured and pre-installed (modules like grunt, bower, grunt-cli, etc). While setting up everything worked fine but as soon as I make a box out of it and run "vagrant up", npm crashes the box. Maybe someone could test this on their own windows system? Maybe it's something with Windows itself? |
|
Okay this issue seems to be related to 'NAT Networking'. Is there a possibility to use another networking provider like 'Network bridge'? I couldn't find anything in the docs, but maybe I'm way to tired to find it :D Still, when setting up a machine in the vbox gui, NAT isn't a problem, only when using vagrant the problem appears. |
|
@arekkas Vagrant has a public_network feature that creates a bridged network. |
|
Unfortunately, this only enables a secondary network adapter, it doesn't disable the NAT tho -> still crashing :( |
|
Yeah, Vagrant currently always creates the first interface as a NAT one. No way around it as far as I know. |
|
You could use vbox manage to remove that interface, but then I doubt your networking would continue to function. It's worth a try. |
Is there a possibility to not use dnsproxy? |
|
The only DNS setting I know is: config.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
endYou can try if that makes a difference. |
|
Thanks, I'll try that once I'm home! :) |
|
That solves the problem! |
|
Maybe you could include this in a cookbook or a known issues section, so other people find this quickly :) |
|
If I only found this one weeks ago. Thank you guys so much. Was struggling with this issue for days now. |
Hi,
I've been trying to get Vagrant up and running with precise32 and it works fine on Mac OS X. However, on Windows host it crashes during installing files from NPM.
My Vagrantfile is:
My bootstrap looks like:
Somewhere when installing npm stuff, the vbox crashes. Npm has a very high IO load as there are many files that are being written. I think that this is related to the issue (since I'm reading buffered_io). However, those files are being installed with
-gwhich means that they're installed globally and should not be installed in the/vagrantdirectory but rather in something like/root/.npm. Additionally I don't think that the install fails as npm outputsnpm http GET, so maybe it's the temp dir - but to be honest, I have no clue why this happens.I've attached the crash log, so I hope this helps you a little bit.
Please also note, that the crash happens randomly when executing npm. Sometimes execution stops at installing "configstore", sometimes at "archy", sometimes at "which". So I don't think this is related to npm
The text was updated successfully, but these errors were encountered: