Comments (13)
What port is your chef-server running on? This looks like the same problem as berkshelf/berkshelf#453
from ridley.
How did you install the server? The chef-server cookbook? What attributes did you set?
Please post your berkshelf config and your knife.rb
I'm can't recreate it against a chef-server I just stood up.
from ridley.
It's running on port 4000, which is the default as far as I can tell.
I installed chef-server using the opscode package of chef and chef-server for ubuntu. Followed this guide: http://generalthings.com/2012/05/08/simple-steps-install-chef-ubuntu-12-04-10-04/. No attributes have been set.
I've updated the gist above to include my (very vanilla) Berksfile and my knife.rb. I have no local configuration in ~/.berkshelf, so it's just using defaults.
I can confirm that if I run
berks upload -d
I can see that it's sending requests to the naked domain (no port). So I agree that it seems like the same problem as issue 453 in berkshelf.
from ridley.
Ok. I'll try again to recreate it tomorrow following those steps. I was using the chef-server cookbook to create my server which installs with the omnibus package. I'm not sure if that makes a difference.
from ridley.
Sounds great, thanks.
from ridley.
FWIW, just did a wireshark capture and it appears that perhaps chef-server itself is returning an incorrect HTTP response? Note that the response body includes URLs without a port. Indicates some sort of misconfiguration on my server, maybe?
POST /sandboxes HTTP/1.1
Accept: application/json
Content-Type: application/json
X-Chef-Version: 11.4.0
User-Agent: Ridley v0.9.0
X-Ops-Sign: algorithm=sha1;version=1.0;
X-Ops-Userid: dair
X-Ops-Timestamp: 2013-04-09T06:57:31Z
X-Ops-Content-Hash: S9gerHoujMdsqfWIM2gwYGwy5TI=
X-Ops-Authorization-1: DFnBc9gLoqcMEwYHoy8D2tM7+rpewqbKYiTX7BmuZqWOfUDugB3JbHin1M/x
X-Ops-Authorization-2: TU7I1fleNEQXMP9gfuhDUi/hbWeBsRB8QJdVROze+Op/TIl4JmW94HNkzZmJ
X-Ops-Authorization-3: 6OzNodD5RCMNRJe0WAafmgtSRGhICGJDJF4sUn8HyU2XgeQiqAVa/9h5dVdQ
X-Ops-Authorization-4: 7Z6+ByRMELXP3EQ+DVGmp5dyD//WvD20/WDCq8yyF6DPKzDyuubo3vCUKCpa
X-Ops-Authorization-5: kkpaK5sad47I2kE11ORpzPmj6N5tfQFb1AEN2B3sv6rxQ4wOnnUuqsJVaQLC
X-Ops-Authorization-6: ltqiV2rnSJzXcbBwAXUYqQeXlcbh05j4KJGDrwGZpw==
Host: dal05-prod-zk0000.keen.io
Content-Length: 455
Connection: keep-alive
Keep-Alive: 30
{"checksums":{"7530dfc28eb3720128758606136b7164":null,"a490e796da4cebfe735ae51f7bf74c14":null,"cdb9f7dbe4715c061a6b7551766a46ab":null,"03485640b005eb1083c76518764053dd":null,"5824de5e6942413e49891c22330f3450":null,"f37af72c1a9e79514d73b8349bfedf12":null,"9bd815f0fddbb2e28f2cce693f85521f":null,"785b6770f5f098af18927556977e7ffd":null,"fb8a7976020ce23d5abd579a3a7cbdbd":null,"7f369ca922a739463d8bb42f7f9e49df":null,"167fbb4c9fdb73eb4facd49e31e16a20":null}}HTTP/1.1 201 Created
Location: http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761
Content-Type: application/json; charset=utf-8
Connection: close
Server: thin 1.3.1 codename Triple Espresso
{"sandbox_id":"f1f775fdbfe04b4ebcccccbf8bd30761","uri":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761","checksums":{"fb8a7976020ce23d5abd579a3a7cbdbd":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/fb8a7976020ce23d5abd579a3a7cbdbd"},"a490e796da4cebfe735ae51f7bf74c14":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/a490e796da4cebfe735ae51f7bf74c14"},"5824de5e6942413e49891c22330f3450":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/5824de5e6942413e49891c22330f3450"},"cdb9f7dbe4715c061a6b7551766a46ab":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/cdb9f7dbe4715c061a6b7551766a46ab"},"7f369ca922a739463d8bb42f7f9e49df":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/7f369ca922a739463d8bb42f7f9e49df"},"f37af72c1a9e79514d73b8349bfedf12":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/f37af72c1a9e79514d73b8349bfedf12"},"03485640b005eb1083c76518764053dd":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/03485640b005eb1083c76518764053dd"},"7530dfc28eb3720128758606136b7164":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/7530dfc28eb3720128758606136b7164"},"167fbb4c9fdb73eb4facd49e31e16a20":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/167fbb4c9fdb73eb4facd49e31e16a20"},"9bd815f0fddbb2e28f2cce693f85521f":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/9bd815f0fddbb2e28f2cce693f85521f"},"785b6770f5f098af18927556977e7ffd":{"needs_upload":true,"url":"http://dal05-prod-zk0000.keen.io/sandboxes/f1f775fdbfe04b4ebcccccbf8bd30761/785b6770f5f098af18927556977e7ffd"}}}
from ridley.
Blech, just realized that I was actually running chef-server 10.18.2 instead of 11.0.4. Reinstalled 11.0.4 and now this works.
I'll leave this open so you can decide if you care about that backwards compatibility. If not, feel free to close. Sorry for the headache.
from ridley.
The port is getting added or dropped here when we make a new connection: https://github.com/RiotGames/ridley/blob/master/lib/ridley/sandbox_uploader.rb#L112-L121
from ridley.
dupe of #85
from ridley.
So this will work with Chef 11 or higher, because everything is served over SSL. However, in earlier versions of Chef the sandbox uploader would return a URL with a randomly assigned port. At some point we are dropping that port when the new Faraday connection is created for the uploader. (See https://github.com/RiotGames/ridley/blob/master/lib/ridley/sandbox_uploader.rb#L112-L121)
from ridley.
fixed by #106
from ridley.
Hi guys,
I'm running into an issue with ridley that, with some Googling, brought me to this page. I'm running vagrant up with the vagrant-berkshelf plugin installed and a Vagrantfile that looks like this:
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_NAME = ENV['BOX_NAME'] || "precise64"
BOX_URI = ENV['BOX_URI'] || "https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-ubuntu-12.04.box"
CHEF_SERVER_IP = "10.0.0.10"
# We'll mount the Chef::Config[:file_cache_path] so it persists between
# Vagrant VMs
host_cache_path = File.expand_path("../.cache", __FILE__)
guest_cache_path = "/tmp/vagrant-cache"
Vagrant.configure("2") do |config|
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = "./Berksfile-vagrant"
# Ensure Chef 11.x is installed for provisioning
config.omnibus.chef_version = :latest
# Configuration for the Chef server VM
config.vm.define :chef do |config|
config.vm.box = BOX_NAME
config.vm.box_url = BOX_URI
config.vm.hostname = "chef"
config.vm.network :private_network, ip: CHEF_SERVER_IP
config.ssh.max_tries = 40
config.ssh.timeout = 120
config.ssh.forward_agent = true
config.vm.provision :chef_solo do |chef|
chef.provisioning_path = guest_cache_path
chef.json = {
"chef-server" => {
"version" => :latest
},
"languages" => {
"ruby" => {
"default_version" => "1.9.1"
}
}
}
chef.run_list = [
"recipe[apt::default]",
"recipe[chef-server::default]",
"recipe[ruby::default]",
"recipe[build-essential::default]",
"recipe[git::default]"
]
end
config.vm.provision :shell, :inline => <<-SCRIPT
mkdir -p /vagrant/.chef
cp /etc/chef-server/admin.pem /vagrant/.chef/
cp /etc/chef-server/chef-validator.pem /vagrant/.chef/
chown vagrant /vagrant/.chef/*
apt-get -y install libxslt-dev libxml2-dev # stupid Nokogiri!
gem install spiceweasel --no-ri --no-rdo
echo "Chef server installed!!\nNow let us configure up the cookbooks."
SCRIPT
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpus", 2]
vb.customize ["modifyvm", :id, "--memory", 1024]
end
end
config.vm.define :controller do |config|
config.vm.hostname = "openstack"
config.vm.box = BOX_NAME
config.vm.box_url = BOX_URI
config.vm.network :private_network, ip: "10.0.0.11"
config.ssh.max_tries = 40
config.ssh.timeout = 120
config.ssh.forward_agent = true
config.vm.provision :chef_client do |chef|
chef.chef_server_url = "https://#{CHEF_SERVER_IP}"
chef.validation_key_path = ".chef/chef-validator.pem"
chef.provisioning_path = guest_cache_path
chef.run_list = [
]
end
config.vm.provision :shell, :inline => <<-SCRIPT
# final provisioning goes here.
SCRIPT
end
end
My .chef/knife.rb file looks like this:
log_level :info
log_location STDOUT
node_name 'admin'
client_key '.chef/admin.pem'
validation_client_name 'chef-validator'
validation_key '.chef/chef-validator.pem'
chef_server_url 'https://10.0.0.10'
cache_type 'BasicFile'
cache_options( :path => '/home/vagrant/.chef/checksums' )
And I'm hitting a similar error as described in this Issue:
jpipes@uberbox:~/repos/att-cloud/chef-repo$ bundle exec vagrant up
Bringing machine 'chef' up with 'virtualbox' provider...
Bringing machine 'controller' up with 'virtualbox' provider...
[chef] VirtualBox VM is already running.
[controller] Setting the name of the VM...
[controller] Clearing any previously set forwarded ports...
[Berkshelf] Uploading cookbooks to 'https://10.0.0.10'
[Berkshelf] Using apt (1.9.2)
[Berkshelf] Using build-essential (1.4.0)
[Berkshelf] Using ruby (0.9.2)
[Berkshelf] Using git (2.5.2)
[Berkshelf] Using curl (1.1.0)
[Berkshelf] Installing chef-server (2.0.0) from git: 'git://github.com/opscode-cookbooks/chef-server.git' with branch: 'master' at ref: '18d6e951a2daa1154b7e82c8909bb7245e57ec1b'
[Berkshelf] Using dmg (1.1.0)
[Berkshelf] Using yum (2.3.0)
[Berkshelf] Using windows (1.10.0)
[Berkshelf] Using chef_handler (1.1.4)
[Berkshelf] Using runit (1.1.6)
[Berkshelf] Uploading apt (1.9.2) to: 'https://10.0.0.10:443/'
Ridley::SandboxUploader crashed!
Errno::ENOENT: No such file or directory - getaddrinfo
/opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:762:in `initialize'
/opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:762:in `open'
/opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
/opt/vagrant/embedded/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
/opt/vagrant/embedded/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
/opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:762:in `connect'
/opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
/opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:744:in `start'
/opt/vagrant/embedded/lib/ruby/1.9.1/net/http.rb:1284:in `request'
/home/jpipes/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in `perform_request'
/home/jpipes/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in `call'
/home/jpipes/.vagrant.d/gems/gems/ridley-1.2.3/lib/ridley/middleware/chef_auth.rb:74:in `call'
/home/jpipes/.vagrant.d/gems/gems/ridley-1.2.3/lib/ridley/middleware/follow_redirects.rb:67:in `perform_with_redirection'
/home/jpipes/.vagrant.d/gems/gems/ridley-1.2.3/lib/ridley/middleware/follow_redirects.rb:60:in `call'
/home/jpipes/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
/home/jpipes/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in `run_request'
/home/jpipes/.vagrant.d/gems/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in `put'
/home/jpipes/.vagrant.d/gems/gems/ridley-1.2.3/lib/ridley/sandbox_uploader.rb:91:in `upload'
/home/jpipes/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `public_send'
/home/jpipes/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in `dispatch'
/home/jpipes/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in `dispatch'
/home/jpipes/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in `block in handle_message'
/home/jpipes/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in `block in initialize'
/home/jpipes/.vagrant.d/gems/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in `block in create'
Does anyone have any ideas? I'm fresh out of em... :(
Thanks in advance for any help!
-jay
from ridley.
does anyone already fixed this? im also having a trouble with this.
$ knife cookbook upload foobar
Uploading foobar [0.1.0]
ERROR: Errno::ENOENT: No such file or directory - getaddrinfo
$
from ridley.
Related Issues (20)
- Ridley 4.4.2 doesn't work with Chef < 12.5 HOT 2
- `berks upload` fails due to missing /sandboxes route in supermarket HOT 2
- chef_version setting in cookbook metadata HOT 1
- dot-separated attribute name HOT 1
- Actor death breaks Ridley as an instance, Thread leak blocks instance re-creation
- Reading databag items with `.all` does not work correctly HOT 2
- Ec2? method does not return true for ec2 instances HOT 2
- Celluloid block
- Replace celluloid with thin actor model based on ruby Threads? HOT 1
- ridley 4.6.1 not compatible with ruby 1.9 anymore HOT 5
- Unable to search data bags
- Unable to terminate ridley
- Warnings from Hashie gem HOT 16
- Digester breaks when trying to checksum non-files
- How to retrieve node last checkin time? HOT 3
- gemspec constraints for celluloid are quite strict HOT 1
- Increase timeout for search, partial_search.
- Update client version HOT 5
- Ridley gem for knife-vsphere HOT 1
- ridley bootstap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ridley.