VirtualBox

Opened 11 years ago

Closed 11 years ago

#12588 closed defect (duplicate)

VirtualBox crashes when running "npm install" -> duplicate of #11649

Reported by: machete143 Owned by:
Component: other Version: VirtualBox 4.3.6
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

I use vagrant provisioning for VirtualBox but there seems to be an issue with "npm" (nodejs). This problem exists only on my Windows 7 host, on Mac OS X this works fine!

I've disabled vagrant provisioning and just used vagrant for setup with:

vagrant up --no-provisioning

After that, I conntected to the vm using

vagrant ssh

After this, i ran

npm -g install bower

This crashed the VM. But it is not important which package I install.

npm install

crashes regardless of the package I'm trying to install.

So, here are some logfiles!

VBox.log: https://gist.github.com/arekkas/8319356

npm-debug.log: https://gist.github.com/arekkas/8319277

vagrant.log: https://gist.github.com/arekkas/8318589

The host is Windows 7 64 Bit, the Guest is Ubuntu precise 32Bit.

My gist config is:

# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|  
  config.vm.box = "http://files.vagrantup.com/precise32.box"
  config.vm.box = "precise32"
  config.vm.provision :shell, :path => "bootstrap.sh"
  config.vm.network :forwarded_port, host: 4567, guest: 80
  config.vm.network :forwarded_port, host: 3456, guest: 3306
  config.vm.synced_folder "../", "/var/www", :owner => "www-data", :group => "www-data", type: "nfs"
end

I'd be happy to help with this issue as best as I can, because we really need the setup for our develop environment.

Change History (19)

comment:1 by machete143, 11 years ago

I've previously opened a ticket on vagrant's github, which you may find here: https://github.com/mitchellh/vagrant/issues/2786

comment:2 by machete143, 11 years ago

Oh sorry, of course I meant to write: "My vagrant config is" instead of "My gist config is".

comment:3 by machete143, 11 years ago

This problem also does not seem to be related to

vagrant ssh

because when I start the VM from the VirtualBox GUI (-> using the VM viewer), npm crashes the VM as well.

comment:4 by Frank Mehnert, 11 years ago

A corresponding VBox.log file for this VM session is missing.

comment:5 by Frank Mehnert, 11 years ago

Oh sorry, nevermind, didn't find the link before because of all the Vagrant noise. Next time please use the 'Attach File' button.

Last edited 11 years ago by Frank Mehnert (previous) (diff)

comment:6 by Frank Mehnert, 11 years ago

So as I understood from your description, the VM crashes if you execute 'npm install' is that correct? Or is only a guest application crashing? Also, you say that you can reproduce the problem only when running your guest on a Windows host but not when running on a Mac OS X host. Is there any difference in the VM configuration between these two hosts? Please also attach the VBox.log file of such a VM session running on Mac OS X.

comment:7 by machete143, 11 years ago

No, the whole VM crashes when running 'npm install'! Sometimes I get a Windows crash message regarding "VBoxHeadless.exe" (mostly when running 'vagrant up').

The setup *should* be the same, because both VMs are configured through the vagrant config posted above. I will attach the log for the Mac OS VM soon.

comment:8 by machete143, 11 years ago

Here's the corresponding Mac OS X log:

https://gist.github.com/arekkas/8319960

comment:9 by Frank Mehnert, 11 years ago

On which drive are you performing 'vagrant up', is this a VirtualBox shared folder?

comment:10 by machete143, 11 years ago

Yes, the folder from which 'vagrant up' is run is a VirtualBox shared folder. In fact, the folder above is also shared:

Vagrant file: D:\workspace\athene2\vagrant\vagrantfile Shared folder: D:\workspace\athene2 -> /var/www

Version 0, edited 11 years ago by machete143 (next)

comment:11 by machete143, 11 years ago

Sorry, I should have included the bootstrap.sh script as well for easier reproduction: https://gist.github.com/arekkas/8320463

comment:12 by machete143, 11 years ago

I just ran 'npm install -g bower' on a custom setup VM (running Debian 7.2 64bit) using this guide for nodejs installation ( http://ariejan.net/2011/10/24/installing-node-js-and-npm-on-ubuntu-debian/ ) and everything worked fine. The VirtualBox log is: https://gist.github.com/arekkas/8320592

comment:13 by Frank Mehnert, 11 years ago

You might want to try upgrading the VBox Guest Additions. The current version you are using with your Windows/Mac OS X host is 4.2.0 which is quite old. Better use 4.3.6. This might affect the problem as the Guest Additions are required for shared folder support.

comment:14 by machete143, 11 years ago

Ok, I've updated the guest additions - still no luck, the vm crashed again.

According to the VBox.log they've been updated so I hope that this wasn't caused by me:

00:00:06.447223 Guest Additions information report: Version 4.3.6 r91406 '4.3.6'

If you want to see the full log please let me know

comment:15 by machete143, 11 years ago

I'm really running out of ideas here. I've now tried a different box ( http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box ) but that didn't change anything.

comment:16 by machete143, 11 years ago

So I've now created a custom debian box, where I installed some modules globally. While everything worked fine here, npm crashed VirtualBox again as soon as I added that VM as a box to vagrant and ran 'vagrant up'.

comment:17 by machete143, 11 years ago

It's not associated with shared folders - as I expected. I disabled all shared folders and the VM still crashes when doing 'npm install'.

comment:18 by machete143, 11 years ago

Found it, it is related to the network type! It seems to be related to: https://www.virtualbox.org/ticket/11649

I disabled 'NAT Networking' and enabled 'Network bridge' instead - now I can install everything without a problem.

(still doesn't work through vagrant, because it seems that vagrant does require NAT)

Last edited 11 years ago by machete143 (previous) (diff)

comment:19 by Michael Thayer, 11 years ago

Resolution: duplicate
Status: newclosed
Summary: VirtualBox crashes when running "npm install"VirtualBox crashes when running "npm install" -> duplicate of #11649
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette