Http 404错误使用托管厨师和流浪狗

我试图开始与厨师和流浪汉和厨师遇到404 Http错误,当我启动流浪实例,完整的输出显示如下。有人有什么主意吗?Http 404错误使用托管厨师和流浪狗

[default] VM already created. Booting if it's not already running... 

[default] Clearing any previously set forwarded ports...

[default] Forwarding ports...

[default] -- 22 => 2222 (adapter 1)

[default] -- 3000 => 3000 (adapter 1)

[default] Creating shared folders metadata...

[default] Clearing any previously set network interfaces...

[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::ChefClient...

[default] Creating folder to hold client key...

[default] Uploading chef client validation key...

[default] Generating chef JSON and uploading...

[default] Running chef-client...

stdin: is not a tty

[Sat, 23 Jun 2012 04:46:51 -0700] INFO: Starting Chef Run

/usr/lib/ruby/1.8/net/http.rb:2101:in `error!'

:

404 "Not Found"

(

Net::HTTPServerException

)

from /usr/lib/ruby/1.8/chef/rest.rb:233:in `run_request'

from /usr/lib/ruby/1.8/chef/rest.rb:95:in `post_rest'

from /usr/lib/ruby/1.8/chef/client.rb:221:in `create_registration'

from /usr/lib/ruby/1.8/chef/client.rb:199:in `register'

from /usr/lib/ruby/1.8/chef/client.rb:73:in `run'

from /usr/lib/ruby/1.8/chef/application/client.rb:186:in `run_application'

from /usr/lib/ruby/1.8/chef/application/client.rb:178:in `loop'

from /usr/lib/ruby/1.8/chef/application/client.rb:178:in `run_application'

from /usr/lib/ruby/1.8/chef/application.rb:57:in `run'

from /usr/bin/chef-client:25

The following SSH command responded with a non-zero exit status.

Vagrant assumes that this means the command failed!

chef-client -c /tmp/vagrant-chef-1/client.rb -j /tmp/vagrant-chef-1/dna.json

我游民文件的内容:

# -*- mode: ruby -*- 

# vi: set ft=ruby :

Vagrant::Config.run do |config|

config.vm.box = "lucid32-rvm-ruby193"

config.vm.forward_port 3000, 3000

config.vm.provision :chef_client do |chef|

chef.chef_server_url = "https://api.opscode.com/organizations/xxx"

chef.validation_key_path = "xxx-validator.pem"

chef.validation_client_name = "xxx-validator"

end

end

回答:

这就是当你输入的chef_server_url错了,你应该得到的错误。例如,如果你把:

chef.chef_server_url = "https://www.opscode.com/organizations/xxx" 

注www而不是API,你会得到这个错误。如果没有有效的服务器返回404,你会得到另一个错误(如果是来自错字,可能是名称解析)。检查/tmp/vagrant-chef-1/client.rb文件以确认它具有正确的URL,并仔细检查您的Vagrantfile以确保您使用的是正确的URL。

以上是 Http 404错误使用托管厨师和流浪狗 的全部内容, 来源链接: utcz.com/qa/266804.html

回到顶部