Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git-bash (Cygwin) and vagrant-berkshelf

I’m having an issue when using git-bash to run vagrant commands. For example if I run vagrant status I will receive the error message “Failed to load the "vagrant-berkshelf" plugin.” If I run the same command from a normal windows command line it will work fine. If I run “VAGRANT_LOG=info vagrant status” the output looks like:

$ VAGRANT_LOG=info vagrant status
 INFO global: Vagrant version: 1.4.3
 INFO global: Ruby version: 2.0.0
 INFO global: RubyGems version: 2.0.14
 INFO global: VAGRANT_DETECTED_OS="MINGW32_NT-6.1"
 INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="c:/HashiCorp/Vagrant/bin/../embedded"
 INFO global: VAGRANT_INSTALLER_ENV="1"
 INFO global: VAGRANT_INSTALLER_VERSION="2"
 INFO global: VAGRANT_LOG="info"
 INFO manager: Registered plugin: box command
 INFO manager: Registered plugin: destroy command
 INFO manager: Registered plugin: halt command
 INFO manager: Registered plugin: help command
 INFO manager: Registered plugin: init command
 INFO manager: Registered plugin: package command
 INFO manager: Registered plugin: plugin command
 INFO manager: Registered plugin: provision command
 INFO manager: Registered plugin: reload command
 INFO manager: Registered plugin: resume command
 INFO manager: Registered plugin: ssh command
 INFO manager: Registered plugin: ssh-config command
 INFO manager: Registered plugin: status command
 INFO manager: Registered plugin: suspend command
 INFO manager: Registered plugin: up command
 INFO manager: Registered plugin: ssh communicator
 INFO manager: Registered plugin: Arch guest
 INFO manager: Registered plugin: CoreOS guest
 INFO manager: Registered plugin: Darwin guest
 INFO manager: Registered plugin: Debian guest
 INFO manager: Registered plugin: ESXi guest.
 INFO manager: Registered plugin: Fedora guest
 INFO manager: Registered plugin: FreeBSD guest
 INFO manager: Registered plugin: Gentoo guest
 INFO manager: Registered plugin: Linux guest.
 INFO manager: Registered plugin: OmniOS guest.
 INFO manager: Registered plugin: OpenBSD guest
 INFO manager: Registered plugin: PLD Linux guest
 INFO manager: Registered plugin: RedHat guest
 INFO manager: Registered plugin: Solaris guest.
 INFO manager: Registered plugin: Solaris 11 guest.
 INFO manager: Registered plugin: SUSE guest
 INFO manager: Registered plugin: Ubuntu guest
 INFO manager: Registered plugin: Arch host
 INFO manager: Registered plugin: BSD host
 INFO manager: Registered plugin: FreeBSD host
 INFO manager: Registered plugin: Gentoo host
 INFO manager: Registered plugin: Linux host
 INFO manager: Registered plugin: OpenSUSE host
 INFO manager: Registered plugin: Red Hat host
 INFO manager: Registered plugin: Slackware host
 INFO manager: Registered plugin: Windows host
 INFO manager: Registered plugin: kernel
 INFO manager: Registered plugin: kernel
 INFO manager: Registered plugin: VirtualBox provider
 INFO manager: Registered plugin: ansible
 INFO manager: Registered plugin: CFEngine Provisioner
 INFO manager: Registered plugin: chef
 INFO manager: Registered plugin: docker
 INFO manager: Registered plugin: file
 INFO manager: Registered plugin: puppet
 INFO manager: Registered plugin: salt
 INFO manager: Registered plugin: shell
 INFO manager: Registered plugin: NFS synced folders
 INFO vagrant: `vagrant` invoked: ["status"]
 INFO environment: Environment initialized (#<Vagrant::Environment:0x2cfab58>)
 INFO environment:   - cwd: d:/priorityplus
 INFO environment: Home path: C:/Users/wstaples/.vagrant.d
 INFO environment: Local data path: d:/priorityplus/.vagrant
 INFO environment: Loading plugin from JSON: vagrant-omnibus
 INFO manager: Registered plugin: vagrant-omnibus
 INFO manager: Registered required plugin: vagrant-omnibus
 INFO root: Loaded plugin vagrant-omnibus, version 1.2.1
 INFO environment: Loading plugin from JSON: vagrant-berkshelf
ERROR root: Failed to load plugin: vagrant-berkshelf
ERROR root:  -- Error: #<LoadError: 1114: A dynamic link library (DLL) initialization routine failed.
  - C:/Users/wstaples/.vagrant.d/gems/gems/nio4r-1.0.0/lib/nio4r_ext.so>
ERROR root:  -- Backtrace:
ERROR root: c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
C:/Users/wstaples/.vagrant.d/gems/gems/nio4r-1.0.0/lib/nio.rb:19:in `<top (required)>'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:in `require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:in `require'
C:/Users/wstaples/.vagrant.d/gems/gems/celluloid-io-0.14.1/lib/celluloid/io/reactor.rb:1:in `<top (required)>'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
C:/Users/wstaples/.vagrant.d/gems/gems/celluloid-io-0.14.1/lib/celluloid/io.rb:6:in `<top (required)>'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
C:/Users/wstaples/.vagrant.d/gems/gems/ridley-1.5.3/lib/ridley.rb:3:in `<top (required)>'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
C:/Users/wstaples/.vagrant.d/gems/gems/berkshelf-2.0.13/lib/berkshelf.rb:9:in `<top (required)>'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:in `require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:in `require'
C:/Users/wstaples/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/berkshelf/vagrant.rb:11:in `<top (required)>'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
C:/Users/wstaples/.vagrant.d/gems/gems/vagrant-berkshelf-1.3.7/lib/vagrant-berkshelf.rb:1:in `<top (required)>'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:in `require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:in `rescue in require'
c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:124:in `require'
c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant.rb:204:in `require_plugin'
c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/environment.rb:760:in `block in load_plugins'
c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/environment.rb:751:in `each'
c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/environment.rb:751:in `load_plugins'
c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/environment.rb:132:in `initialize'
c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.4.3/bin/vagrant:105:in `new'
c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.4.3/bin/vagrant:105:in `<top (required)>'
c:/HashiCorp/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
c:/HashiCorp/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
 INFO interface: error: Failed to load the "vagrant-berkshelf" plugin. View logs for more details.

Failed to load the "vagrant-berkshelf" plugin. View logs for more details.
 INFO environment: Running hook: environment_plugins_loaded
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x2867bb0>
 INFO environment: Running hook: environment_load
 INFO environment: Initializing config...
 INFO loader: Set :default = "c:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.4.3/config/default.rb"
 INFO loader: Set :root = #<Pathname:d:/priorityplus/Vagrantfile>
 INFO loader: Loading configuration in order: [:default, :home, :root]
 INFO hosts: Host class: VagrantPlugins::HostWindows::Host
 INFO runner: Preparing hooks for middleware sequence...
 INFO runner: 1 hooks defined.
 INFO runner: Running action: #<Vagrant::Action::Builder:0x325edf8>
 INFO cli: CLI: [] "status" ["--"]
 INFO command: Active machine found with name PPLUSDEVBOX. Using provider: virtualbox
 INFO environment: Getting machine: PPLUSDEVBOX (virtualbox)
 INFO environment: Uncached load of machine.
 INFO loader: Set :vm_PPLUSDEVBOX = [["2", #<Proc:0x4396e30@d:/priorityplus/Vagrantfile:8>]]
 INFO loader: Loading configuration in order: [:default, :home, :root, :vm_PPLUSDEVBOX]
 INFO box_collection: Searching for box: precise64 (virtualbox) in C:/Users/wstaples/.vagrant.d/boxes/precise64/virtualbox/metadata.json
 INFO box_collection: Box found: precise64 (virtualbox)
 INFO environment: Box exists with Vagrantfile. Reloading machine config.
 INFO loader: Set :box_precise64_virtualbox = #<Pathname:C:/Users/wstaples/.vagrant.d/boxes/precise64/virtualbox/Vagrantfile>
 INFO loader: Loading configuration in order: [:default, :box_precise64_virtualbox, :home, :root, :vm_PPLUSDEVBOX]
 INFO machine: Initializing machine: PPLUSDEVBOX
 INFO machine:   - Provider: VagrantPlugins::ProviderVirtualBox::Provider
 INFO machine:   - Box: #<Vagrant::Box:0x33c74e8>
 INFO machine:   - Data dir: d:/priorityplus/.vagrant/machines/PPLUSDEVBOX/virtualbox
 INFO base: VBoxManage path: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe
 INFO subprocess: Starting process: ["C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", "--version"]
 INFO meta: Using VirtualBox driver: VagrantPlugins::ProviderVirtualBox::Driver::Version_4_2
 INFO base: VBoxManage path: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe
 INFO subprocess: Starting process: ["C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", "showvminfo", "383b68e0-233b-449f-9361-95eb26f8d3bb"]
 INFO command: With machine: PPLUSDEVBOX (#<VagrantPlugins::ProviderVirtualBox::Provider:0x41ad7a0 @logger=#<Log4r::Logger:0x41ad770 @fullname="vagrant::provider::virtualbox", @outputters=[], @additive=true, @name="virtualbox", @path="vagrant::provider", @parent=#<Log4r::Logger:0x2bed188 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x2c0e560 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x2c0e518>, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x2c0ca48 @depth=7>, @out=#<IO:<STDERR>>>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x2bed0e0 @level=0, @outputters=[]>, @level=2, @trace=false>, @level=2, @trace=false>, @machine=#<Vagrant::Machine: PPLUSDEVBOX (VagrantPlugins::ProviderVirtualBox::Provider)>, @driver=#<VagrantPlugins::ProviderVirtualBox::Driver::Meta:0x4303cf8 @logger=#<Log4r::Logger:0x436d4a8 @fullname="vagrant::provider::virtualbox::meta", @outputters=[], @additive=true, @name="meta", @path="vagrant::provider::virtualbox", @parent=#<Log4r::Logger:0x41ad770 @fullname="vagrant::provider::virtualbox", @outputters=[], @additive=true, @name="virtualbox", @path="vagrant::provider", @parent=#<Log4r::Logger:0x2bed188 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x2c0e560 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x2c0e518>, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x2c0ca48 @depth=7>, @out=#<IO:<STDERR>>>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x2bed0e0 @level=0, @outputters=[]>, @level=2, @trace=false>, @level=2, @trace=false>, @level=2, @trace=false>, @interrupted=false, @vboxmanage_path="C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", @uuid="383b68e0-233b-449f-9361-95eb26f8d3bb", @version="4.2.18", @driver=#<VagrantPlugins::ProviderVirtualBox::Driver::Version_4_2:0x2995950 @logger=#<Log4r::Logger:0x2a3d140 @fullname="vagrant::provider::virtualbox_4_2", @outputters=[], @additive=true, @name="virtualbox_4_2", @path="vagrant::provider", @parent=#<Log4r::Logger:0x2bed188 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x2c0e560 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x2c0e518>, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x2c0ca48 @depth=7>, @out=#<IO:<STDERR>>>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x2bed0e0 @level=0, @outputters=[]>, @level=2, @trace=false>, @level=2, @trace=false>, @interrupted=false, @vboxmanage_path="C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", @uuid="383b68e0-233b-449f-9361-95eb26f8d3bb">>>)
 INFO command: Active machine found with name PPLUSDEVBOX. Using provider: virtualbox
 INFO environment: Getting machine: PPLUSDEVBOX (virtualbox)
 INFO environment: Returning cached machine: PPLUSDEVBOX (virtualbox)
 INFO command: With machine: PPLUSDEVBOX (#<VagrantPlugins::ProviderVirtualBox::Provider:0x41ad7a0 @logger=#<Log4r::Logger:0x41ad770 @fullname="vagrant::provider::virtualbox", @outputters=[], @additive=true, @name="virtualbox", @path="vagrant::provider", @parent=#<Log4r::Logger:0x2bed188 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x2c0e560 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x2c0e518>, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x2c0ca48 @depth=7>, @out=#<IO:<STDERR>>>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x2bed0e0 @level=0, @outputters=[]>, @level=2, @trace=false>, @level=2, @trace=false>, @machine=#<Vagrant::Machine: PPLUSDEVBOX (VagrantPlugins::ProviderVirtualBox::Provider)>, @driver=#<VagrantPlugins::ProviderVirtualBox::Driver::Meta:0x4303cf8 @logger=#<Log4r::Logger:0x436d4a8 @fullname="vagrant::provider::virtualbox::meta", @outputters=[], @additive=true, @name="meta", @path="vagrant::provider::virtualbox", @parent=#<Log4r::Logger:0x41ad770 @fullname="vagrant::provider::virtualbox", @outputters=[], @additive=true, @name="virtualbox", @path="vagrant::provider", @parent=#<Log4r::Logger:0x2bed188 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x2c0e560 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x2c0e518>, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x2c0ca48 @depth=7>, @out=#<IO:<STDERR>>>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x2bed0e0 @level=0, @outputters=[]>, @level=2, @trace=false>, @level=2, @trace=false>, @level=2, @trace=false>, @interrupted=false, @vboxmanage_path="C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", @uuid="383b68e0-233b-449f-9361-95eb26f8d3bb", @version="4.2.18", @driver=#<VagrantPlugins::ProviderVirtualBox::Driver::Version_4_2:0x2995950 @logger=#<Log4r::Logger:0x2a3d140 @fullname="vagrant::provider::virtualbox_4_2", @outputters=[], @additive=true, @name="virtualbox_4_2", @path="vagrant::provider", @parent=#<Log4r::Logger:0x2bed188 @fullname="vagrant", @outputters=[#<Log4r::StderrOutputter:0x2c0e560 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x2c0e518>, @name="stderr", @level=0, @formatter=#<Log4r::DefaultFormatter:0x2c0ca48 @depth=7>, @out=#<IO:<STDERR>>>], @additive=true, @name="vagrant", @path="", @parent=#<Log4r::RootLogger:0x2bed0e0 @level=0, @outputters=[]>, @level=2, @trace=false>, @level=2, @trace=false>, @interrupted=false, @vboxmanage_path="C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", @uuid="383b68e0-233b-449f-9361-95eb26f8d3bb">>>)
 INFO subprocess: Starting process: ["C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", "showvminfo", "383b68e0-233b-449f-9361-95eb26f8d3bb", "--machinereadable"]
 INFO subprocess: Starting process: ["C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe", "showvminfo", "383b68e0-233b-449f-9361-95eb26f8d3bb", "--machinereadable"]
 INFO interface: Machine: provider-name [:virtualbox, {:scope=>"PPLUSDEVBOX"}]
 INFO interface: Machine: state [:aborted, {:scope=>"PPLUSDEVBOX"}]
 INFO interface: Machine: state-human-short ["aborted", {:scope=>"PPLUSDEVBOX"}]
 INFO interface: Machine: state-human-long ["The VM is in an aborted state. This means that it was abruptly\nstopped without properly closing the session. Run `vagrant up`\nto resume this virtual machine. If any problems persist, you may\nhave to destroy and restart the virtual machine.", {:scope=>"PPLUSDEVBOX"}]
 INFO interface: info: Current machine states:

PPLUSDEVBOX               aborted (virtualbox)

The VM is in an aborted state. This means that it was abruptly
stopped without properly closing the session. Run `vagrant up`
to resume this virtual machine. If any problems persist, you may
have to destroy and restart the virtual machine.

I have tried uninstalling and reinstalling the plugin and I have upgraded vagrant twice since this issue and it still persists. I’m currently on vagrant 1.4.3

any ideas where to go from here?

like image 788
Cryptographic_ICE Avatar asked Dec 12 '22 08:12

Cryptographic_ICE


1 Answers

I have a same problem. I found workround, set "NIO4R_PURE" environment variable.

export NIO4R_PURE="yes"
vagrant status

gems/nio4r-1.0.0/lib/nio4r_ext.so is a C extension of NIO4R gem. NIO4R has other implementations.

See C:/Users/wstaples/.vagrant.d/gems/gems/nio4r-1.0.0/lib/nio.rb comment.

like image 175
Hizumi Avatar answered Jan 22 '23 20:01

Hizumi