Skip to content

Instantly share code, notes, and snippets.

@ringods
Created February 8, 2011 09:49
Show Gist options
  • Save ringods/816196 to your computer and use it in GitHub Desktop.
Save ringods/816196 to your computer and use it in GitHub Desktop.
rdesmet@ringo-desktop:~/Projects/ruby/bv-chef-setup$ vagrant up
[default] Provisioning enabled with chef_server...
[default] Importing base box 'lucid-amd64'...
[default] Matching MAC address for NAT networking...
[default] Running any VM customizations...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] Creating shared folders metadata...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] Running provisioner: Vagrant::Provisioners::ChefServer...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
chown vagrant /tmp/vagrant-chef
rdesmet@ringo-desktop:~/Projects/ruby/bv-chef-setup$ vagrant halt
[default] Attempting graceful shutdown of linux...
rdesmet@ringo-desktop:~/Projects/ruby/bv-chef-setup$ vagrant up
[default] VM already created. Booting if its not already running...
[default] Provisioning enabled with chef_server...
[default] Running any VM customizations...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] Cleaning previously set shared folders...
[default] Creating shared folders metadata...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] Running provisioner: Vagrant::Provisioners::ChefServer...
[default] Creating folder to hold client key...
[default] Uploading chef client validation key...
[default] Generating chef JSON and uploading...
[default] Running chef-client...
[default] stdin: is not a tty
: stderr
[default] [Tue, 08 Feb 2011 01:40:07 -0800] INFO: Client key /etc/chef/client.pem is not present - registering
[Tue, 08 Feb 2011 01:40:16 -0800] WARN: HTTP Request Returned 404 Not Found: Cannot load node chef-client-test
[Tue, 08 Feb 2011 01:40:20 -0800] INFO: Setting the run_list to ["role[chef-client]"] from JSON
[Tue, 08 Feb 2011 01:40:21 -0800] INFO: Starting Chef Run (Version 0.9.12)
[Tue, 08 Feb 2011 01:40:23 -0800] INFO: Storing updated cookbooks/chef-client/recipes/delete_validation.rb in the cache.
[Tue, 08 Feb 2011 01:40:24 -0800] INFO: Storing updated cookbooks/chef-client/recipes/default.rb in the cache.
[Tue, 08 Feb 2011 01:40:25 -0800] INFO: Storing updated cookbooks/chef-client/recipes/service.rb in the cache.
[Tue, 08 Feb 2011 01:40:25 -0800] INFO: Storing updated cookbooks/chef-client/recipes/config.rb in the cache.
[Tue, 08 Feb 2011 01:40:26 -0800] INFO: Storing updated cookbooks/chef-client/attributes/default.rb in the cache.
[Tue, 08 Feb 2011 01:40:26 -0800] INFO: Storing updated cookbooks/chef-client/README.md in the cache.
[Tue, 08 Feb 2011 01:40:26 -0800] INFO: Storing updated cookbooks/chef-client/metadata.rb in the cache.
[Tue, 08 Feb 2011 01:40:27 -0800] INFO: Storing updated cookbooks/chef-client/metadata.json in the cache.
[Tue, 08 Feb 2011 01:40:27 -0800] INFO: Deleting file[/tmp/vagrant-chef/validation.pem] at /tmp/vagrant-chef/validation.pem
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Storing updated cookbooks/chef-client/templates/default/client.rb.erb in the cache.
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Writing updated content for template[/etc/chef/client.rb] to /etc/chef/client.rb
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Creating directory[/var/log/chef] at /var/log/chef
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Setting owner to 0 for directory[/var/log/chef]
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Setting group to 0 for directory[/var/log/chef]
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Setting mode to 755 for directory[/var/log/chef]
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Creating file[/etc/init.d/chef-client] at /etc/init.d/chef-client
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Setting mode to 755 for file[/etc/init.d/chef-client]
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Creating file[/etc/default/chef-client] at /etc/default/chef-client
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: Setting mode to 644 for file[/etc/default/chef-client]
: stdout
[default] [Tue, 08 Feb 2011 01:40:28 -0800] INFO: service[chef-client]: enabled successfully
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: template[/etc/chef/client.rb] sending create action to ruby_block[reload_client_config] (delayed)
[Tue, 08 Feb 2011 01:40:28 -0800] INFO: file[/etc/init.d/chef-client] sending restart action to service[chef-client] (delayed)
: stdout
[default] [Tue, 08 Feb 2011 01:40:29 -0800] INFO: service[chef-client]: restarted successfully
[Tue, 08 Feb 2011 01:40:30 -0800] INFO: Chef Run complete in 8.32863 seconds
[Tue, 08 Feb 2011 01:40:30 -0800] INFO: cleaning the checksum cache
[Tue, 08 Feb 2011 01:40:30 -0800] INFO: Running report handlers
[Tue, 08 Feb 2011 01:40:30 -0800] INFO: Report handlers complete
: stdout
rdesmet@ringo-desktop:~/Projects/ruby/bv-chef-setup$
@joakim
Copy link

joakim commented Feb 8, 2011

Hi! I have the same problem, except on my second run I get:

/Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh/transport/server_version.rb:50:in `negotiate!': connection closed by remote host (Net::SSH::Disconnect)
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh/transport/server_version.rb:45:in `loop'
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh/transport/server_version.rb:45:in `negotiate!'
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh/transport/server_version.rb:43:in `loop'
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh/transport/server_version.rb:43:in `negotiate!'
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh/transport/server_version.rb:32:in `initialize'
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh/transport/session.rb:75:in `new'
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh/transport/session.rb:75:in `initialize'
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh.rb:183:in `new'
    from /Library/Ruby/Gems/1.8/gems/net-ssh-2.1.0/lib/net/ssh.rb:183:in `start'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/ssh.rb:75:in `execute'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/util/retryable.rb:14:in `retryable'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/ssh.rb:74:in `execute'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/share_folders.rb:51:in `mount_shared_folders'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/share_folders.rb:17:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/clear_shared_folders.rb:14:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/nfs.rb:39:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/provision.rb:17:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/forward_ports.rb:88:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/clear_forwarded_ports.rb:17:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/customize.rb:16:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/vm/clean_machine_folder.rb:17:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/warden.rb:28:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action/builder.rb:120:in `call'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action.rb:131:in `run'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/util/busy.rb:19:in `busy'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/action.rb:131:in `run'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/vm.rb:143:in `start'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/command/up.rb:11:in `execute'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/command/up.rb:8:in `each'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/command/up.rb:8:in `execute'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/config.rb:115:in `map'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:73:in `each'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:109:in `send'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:109:in `invoke'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/lib/vagrant/cli.rb:45:in `up'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /Library/Ruby/Gems/1.8/gems/vagrant-0.7.1/bin/vagrant:15
    from /usr/bin/vagrant:19:in `load'
    from /usr/bin/vagrant:19

@joakim
Copy link

joakim commented Feb 8, 2011

I think the error I got had to do with me using NFS…

config.vm.network("192.168.10.100")
config.vm.share_folder("v-root", "/srv", ".", :nfs => true)

Trying the latest 0.7.2.dev version of Vagrant (see https://github.com/mitchellh/vagrant/wiki/Install-Vagrant-from-source) seemed to solve it.

@joakim
Copy link

joakim commented Feb 15, 2011

Got the error again on the first run of another Vagrant project, on 0.7.2. Host-only networking (config.vm.network) seems to be the culprit now.

I tried with config.vm.network and without :nfs => true in my Vagrantfile and still got the error, so NFS doesn't seem to be the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment