Skip to content
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

HTTP Request Returned 404 Not Found: Object not found: /reports/nodes/vagrantvm1-local/runs #12

Open
jbpadgett opened this issue Jul 6, 2013 · 4 comments

Comments

@jbpadgett
Copy link

Having trouble getting vagrant-chef-zero to register clients and execute.
I also cannot connect to the chef-zero server using knife.
Questions:

  1. Do I need to add json files in the nodes directory for each vm in the vagrantfile by name? I tried this but got no love.

  2. Does vagrant-chef-zero/chef-zero automatically upload all the cookbooks in the paths specified in the config.chef_zero blocks? or do I need to use knife to do this?

Here is my local environment:

OSX Lion 10.8.4
RVM with 1.9.3
VirtualBox 4.2.12 (with ext pack 4.2.12)
Vagrant 1.2.2
Chef gem under the 1.9.3 RVM environment

Here is my Vagrantfile

Vagrant.configure("2") do |config|
#VAGRANT_LOG = debug
#config.berkshelf.enabled = true
config.ssh.timeout = 120
#chef-zero configuration block
#chef-zero runs on the host machine not the guest
# config.chef_zero.enabled = false
config.chef_zero.nodes = "/Users/jeff/git-repos/vagrantprojects/vagrant-chef-zero/nodes"
config.chef_zero.environments = "/Users/jeff/git-repos/vagrantprojects/vagrant-chef-zero/environments"
config.chef_zero.data_bags = "/Users/jeff/git-repos/vagrantprojects/vagrant-chef-zero/data_bags"
config.chef_zero.cookbooks = "/Users/jeff/git-repos/vagrantprojects/vagrant-chef-zero/cookbooks"
config.chef_zero.roles = "/Users/jeff/git-repos/vagrantprojects/vagrant-chef-zero/roles"

config.vm.provider :virtualbox do |vb|
  vb.gui = true
  end

config.vm.define :vm1 do |vm1|
    vm1.vm.hostname  =  "vagrantvm1-local"
    vm1.vm.box       =  "centos64basebox"
          vm1.vm.provision :chef_client do |chef|
            chef.run_list = [
            ]
          end

end

Here is the error I get when doing vagrant up with my vagrant file:

[vm1] Importing base box 'centos64basebox'...
[vm1] Matching MAC address for NAT networking...
[vm1] Setting the name of the VM...
[vm1] Clearing any previously set forwarded ports...
[Chef Zero] Starting Chef Zero at http://192.168.1.52:4000
[Chef Zero] Waiting for Chef Zero to start
[Chef Zero] Creating Node vagrantvm1-local
[Chef Zero] Creating Node vagrantvm2-local
[vm1] Creating shared folders metadata...
[vm1] Clearing any previously set network interfaces...
[vm1] Preparing network interfaces based on configuration...
[vm1] Forwarding ports...
[vm1] -- 22 => 2222 (adapter 1)
[vm1] Booting VM...
[vm1] Waiting for VM to boot. This can take a few minutes.
[vm1] VM booted and ready for use!
[vm1] Setting hostname...
[vm1] Configuring and enabling network interfaces...
[vm1] Mounting shared folders...
[vm1] -- /vagrant
[vm1] Running provisioner: chef_client...
Creating folder to hold client key...
Uploading chef client validation key...
Generating chef JSON and uploading...
[vm1] Warning: Chef solo run list is empty. This may not be what you want.
Running chef-client...
[2013-07-05T19:40:48-07:00] INFO: *** Chef 11.4.4 ***
[2013-07-05T19:40:48-07:00] INFO: [inet6] no default interface, picking the first ipaddress
[2013-07-05T19:40:49-07:00] INFO: Client key /etc/chef/client.pem is not present - registering
[2013-07-05T19:40:49-07:00] INFO: Run List is []
[2013-07-05T19:40:49-07:00] INFO: Run List expands to []
[2013-07-05T19:40:49-07:00] INFO: HTTP Request Returned 404 Not Found: Object not found: /reports/nodes/vagrantvm1-local/runs
[2013-07-05T19:40:49-07:00] INFO: Starting Chef Run for vagrantvm1-local
[2013-07-05T19:40:49-07:00] INFO: Running start handlers
[2013-07-05T19:40:49-07:00] INFO: Start handlers complete.
[2013-07-05T19:40:49-07:00] INFO: Loading cookbooks []
[2013-07-05T19:40:49-07:00] WARN: Node vagrantvm1-local has an empty run list.
[2013-07-05T19:40:49-07:00] INFO: Chef Run complete in 0.039698792 seconds
[2013-07-05T19:40:49-07:00] INFO: Running report handlers
[2013-07-05T19:40:49-07:00] INFO: Report handlers complete

@andrewgross
Copy link
Contributor

Hey,

Thanks for reporting this. Just want to double check that you have the latest version (0.2.4).

Going over the log, a few things seems strange. It doesn't show Chef Zero uploading anything except for nodes. Additionally when it tries to access the node info, it goes through a url starting with /reports/, seems off.

I'll keep investigating for now.

@jbpadgett
Copy link
Author

Thanks. Yeah the /report url seemed strange to me too.
I tried to create two node files just to see if they were required. My hope was they would get automatically created.
Here is one of them (run list is empty for now since I just want to make sure it will run cleanly):
vm1.json

{
"chef_type": "node",
"json_class": "Chef::Node",
"name": "vagrantvm1-local",
"chef_environment": "_default",
"run_list": []
}

Here is the vagrant plugins list I have:
vagrant plugin list

vagrant-chef-zero (0.2.4)
vagrant-rackspace (0.1.1)

Here are local gems I have for my RVM 1.9.3 environment just in case:
gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
bundler (1.3.5)
bundler-unload (1.0.1)
chef (11.4.4)
erubis (2.7.0)
highline (1.6.19)
io-console (0.3)
ipaddress (0.8.0)
json (1.5.5)
mime-types (1.23)
minitest (2.5.1)
mixlib-authentication (1.3.0)
mixlib-cli (1.3.0)
mixlib-config (1.1.2)
mixlib-log (1.6.0)
mixlib-shellout (1.1.0)
net-ssh (2.6.7)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.1)
ohai (6.16.0)
rake (10.1.0, 0.9.2.2)
rdoc (3.9.5)
rest-client (1.6.7)
rubygems-bundler (1.2.0)
rvm (1.11.3.8)
systemu (2.5.2)
yajl-ruby (1.1.0)

@andrewgross
Copy link
Contributor

The reports URL is actually where is will try to find info from previous runs, and it is ok if it fails.

@deepak-kosaraju
Copy link

@jbpadgett
Hi Jeff, any luck fixing above issue you raised almost an year ago. I started using Vagrant recently and having similar issue. I did configure client.rb to point to chef-zero but no luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants