# Bootstrapping Chef server fails with "no valid gem 'chef-server-api' (= 11.0.0)"

**URL:** <https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652>\
**Category:** Chef Infra (archive)\
**Created:** [February 4, 2013, 10:59pm UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652 "2013-02-04T22:59:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmocek](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pmocek](https://discourse.chef.io/u/pmocek)\
**Post date:** [February 4, 2013, 10:59pm UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652/1 "2013-02-04T22:59:17Z")

</div>

I would appreciate any suggestions for troubleshooting my failed  
Chef server bootstrap process.

I installed chef-solo by running the [Omnibus installer script](https://www.opscode.com/chef/install.sh),  
then, as described on the [Installing Chef Server using Chef Solo  
page](http://wiki.opscode.com/display/chef/Installing+Chef+Server+using+Chef+Solo), I ran chef-solo with a JSON attributes file referencing  
the rubygems-install recipe of the chef-server cookbook. I'm using  
version 1.1.1 of that cookbook.

The [output from chef-solo](https://gist.github.com/4710420) includes the following:

> Recipe: chef-server::rubygems-install
> 
> - gem\_package[chef-server-api] action install  
> ================================================================================  
> Error executing action `install` on resource 'gem\_package[chef-server-api]'  
> ================================================================================
> 
> ## Mixlib::ShellOut::ShellCommandFailed
> 
> Expected process to exit with [0], but received '2'  
> ---- Begin output of /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" ----  
> STDOUT:  
> STDERR: ERROR: Could not find a valid gem 'chef-server-api' (= 11.0.0) in any repository  
> ERROR: Possible alternatives: chef-server-api  
> ---- End output of /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" ----  
> Ran /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" returned 2
> 
> ## Resource Declaration:
> 
> # In /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb
> 
> 83: gem\_package gem do  
> 84: version node['chef\_packages']['chef']['version']  
> 85: end  
> 86: end
> 
> ## Compiled Resource:
> 
> # Declared in /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb:83:in `block in from\_file'
> 
> gem\_package("chef-server-api") do  
> provider Chef::Provider:📦:Rubygems  
> action :install  
> retries 0  
> retry\_delay 2  
> package\_name "chef-server-api"  
> version "11.0.0"  
> cookbook\_name :"chef-server"  
> recipe\_name "rubygems-install"  
> gem\_binary "/opt/chef/embedded/bin/gem"  
> end

I'm running chef-solo 11.0.0:

> root@chef:~# chef-solo --version  
> Chef: 11.0.0  
> root@chef:~# which chef-solo  
> /usr/bin/chef-solo  
> root@chef:~# ll /usr/bin/chef-solo  
> lrwxrwxrwx 1 root root 23 Feb 4 22:03 /usr/bin/chef-solo -\> /opt/chef/bin/chef-solo\*

Thanks in advance for any guidance. I'll follow up here with  
resolution.

References:

--  
Phil Mocek  
[http://mocek.org/](http://mocek.org/)

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [February 4, 2013, 11:13pm UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652/2 "2013-02-04T23:13:37Z")

</div>

Hi Phil,

We haven't released to the community site the chef-server cookbook version for chef 11.

You can get it from the GitHub repository. We will release the new version (2.0.0) later today.

> **[GitHub - chef-cookbooks/chef-server: Cookbook to install standalone Chef Server](https://github.com/chef-cookbooks/chef-server)**
>
> Cookbook to install standalone Chef Server. Contribute to chef-cookbooks/chef-server development by creating an account on GitHub.

Cheers!

--  
Joshua Timberman

On Monday, February 4, 2013 at 15:59, Phil Mocek wrote:

> I would appreciate any suggestions for troubleshooting my failed  
> Chef server bootstrap process.
> 
> I installed chef-solo by running the [Omnibus installer script](https://www.opscode.com/chef/install.sh),  
> then, as described on the [Installing Chef Server using Chef Solo  
> page](http://wiki.opscode.com/display/chef/Installing+Chef+Server+using+Chef+Solo), I ran chef-solo with a JSON attributes file referencing  
> the rubygems-install recipe of the chef-server cookbook. I'm using  
> version 1.1.1 of that cookbook.
> 
> The [output from chef-solo](https://gist.github.com/4710420) includes the following:
> 
> > Recipe: chef-server::rubygems-install
> > 
> > - gem\_package[chef-server-api] action install  
> > ================================================================================  
> > Error executing action `install` on resource 'gem\_package[chef-server-api]'  
> > ================================================================================
> > 
> > ## Mixlib::ShellOut::ShellCommandFailed
> > 
> > Expected process to exit with [0], but received '2'  
> > ---- Begin output of /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" ----  
> > STDOUT:  
> > STDERR: ERROR: Could not find a valid gem 'chef-server-api' (= 11.0.0) in any repository  
> > ERROR: Possible alternatives: chef-server-api  
> > ---- End output of /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" ----  
> > Ran /opt/chef/embedded/bin/gem install chef-server-api -q --no-rdoc --no-ri -v "11.0.0" returned 2
> > 
> > ## Resource Declaration:
> > 
> > # In /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb
> > 
> > 83: gem\_package gem do  
> > 84: version node['chef\_packages']['chef']['version']  
> > 85: end  
> > 86: end
> > 
> > ## Compiled Resource:
> > 
> > # Declared in /tmp/chef-solo/cookbooks/chef-server/recipes/rubygems-install.rb:83:in `block in from\_file'
> > 
> > gem\_package("chef-server-api") do  
> > provider Chef::Provider:📦:Rubygems  
> > action :install  
> > retries 0  
> > retry\_delay 2  
> > package\_name "chef-server-api"  
> > version "11.0.0"  
> > cookbook\_name :"chef-server"  
> > recipe\_name "rubygems-install"  
> > gem\_binary "/opt/chef/embedded/bin/gem"  
> > end
> 
> I'm running chef-solo 11.0.0:
> 
> > root@chef:~# chef-solo --version  
> > Chef: 11.0.0  
> > root@chef:~# which chef-solo  
> > /usr/bin/chef-solo  
> > root@chef:~# ll /usr/bin/chef-solo  
> > lrwxrwxrwx 1 root root 23 Feb 4 22:03 /usr/bin/chef-solo -\> /opt/chef/bin/chef-solo\*
> 
> Thanks in advance for any guidance. I'll follow up here with  
> resolution.
> 
> References:
> 
> --  
> Phil Mocek  
> [http://mocek.org/](http://mocek.org/)

---

<div class="post-metadata">

**Author:** ![pmocek](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pmocek](https://discourse.chef.io/u/pmocek)\
**Post date:** [February 5, 2013, 12:10am UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652/3 "2013-02-05T00:10:46Z")

</div>

On Mon, Feb 04, 2013 at 04:13:37PM -0700, Joshua Timberman wrote:

> We haven't released to the community site the chef-server  
> cookbook version for chef 11.
> 
> You can get it from the GitHub repository. We will release the  
> new version (2.0.0) later today.Â

Thanks for the tip.

Unfortunately, it seems the problem is that  
[http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz](http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz) still  
contains the obsolete cookbook. I put a copy of chef-server  
cookbook 2.0.0 in the location where chef-solo is configured to  
expect cookbooks:

> > root@chef:~# grep ^cookbook /etc/chef/solo.rb  
> > cookbook\_path "/tmp/chef-solo/cookbooks"  
> > root@chef:~# grep ^version /tmp/chef-solo/cookbooks/chef-server/metadata.rb  
> > version "1.1.1"  
> > root@chef:~# cd /tmp/chef-solo/cookbooks/  
> > root@chef:/tmp/chef-solo/cookbooks# rm -rf chef-server  
> > root@chef:/tmp/chef-solo/cookbooks# git clone git://github.com/opscode-cookbooks/chef-server.git  
> > Cloning into 'chef-server'...  
> > remote: Counting objects: 460, done.  
> > remote: Compressing objects: 100% (240/240), done.  
> > remote: Total 460 (delta 233), reused 407 (delta 188)  
> > Receiving objects: 100% (460/460), 87.39 KiB, done.  
> > Resolving deltas: 100% (233/233), done.  
> > root@chef:/tmp/chef-solo/cookbooks# cd -  
> > root@chef:~# grep ^version /tmp/chef-solo/cookbooks/chef-server/metadata.rb  
> > version "2.0.0"

I again ran:

> > chef-solo -c /etc/chef/solo.rb -j /etc/chef/chef.json -r [http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz](http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz)

And I observed the same failure.

Is there a more reliable method of bootstrapping a Chef server?  
Alternatively, what would I need to modify in order to install a  
version of Chef server that is compatible with the chef-server  
cookbook in the bootstrap-latest archive?

Again: I'm following [directions on the Opscode wiki](http://wiki.opscode.com/display/chef/Installing+Chef+Server+using+Chef+Solo#InstallingChefServerusingChefSolo-BootstrapChefServer). I  
don't see any server installation documentation on the [docs  
site](http://docs.opscode.com/#the-chef-server).

References:

--  
Phil Mocek  
[http://mocek.org/](http://mocek.org/)

---

<div class="post-metadata">

**Author:** ![AJ\_Christensen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/aj_christensen/32/525_2.png) [@AJ\_Christensen](https://discourse.chef.io/u/AJ_Christensen)\
**Post date:** [February 5, 2013, 1:05am UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652/4 "2013-02-05T01:05:38Z")

</div>

If you pass the '-r' remote cookbook URL flag to chef-solo it will  
download the bootstrap-latest.tar.gz and extract it to the cookbook  
path, effectively clobbering your work of deploying a copy of the Git  
cookbook; reverting you back to 1.1.1.

This will not work.

You need to use the chef-server v2.0.0 cookbook to deploy erchef11.  
The opscode chef-server v2.0.0 cookbook has been very reliable in all  
of my testing across all of the platforms we have under management.

Cheers,

AJ

On 5 February 2013 13:10, Phil Mocek [phil-lists@mocek.org](mailto:phil-lists@mocek.org) wrote:

> On Mon, Feb 04, 2013 at 04:13:37PM -0700, Joshua Timberman wrote:
> 
> > We haven't released to the community site the chef-server  
> > cookbook version for chef 11.
> > 
> > You can get it from the GitHub repository. We will release the  
> > new version (2.0.0) later today.
> 
> Thanks for the tip.
> 
> Unfortunately, it seems the problem is that  
> [http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz](http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz) still  
> contains the obsolete cookbook. I put a copy of chef-server  
> cookbook 2.0.0 in the location where chef-solo is configured to  
> expect cookbooks:
> 
> > > root@chef:~# grep ^cookbook /etc/chef/solo.rb  
> > > cookbook\_path "/tmp/chef-solo/cookbooks"  
> > > root@chef:~# grep ^version /tmp/chef-solo/cookbooks/chef-server/metadata.rb  
> > > version "1.1.1"  
> > > root@chef:~# cd /tmp/chef-solo/cookbooks/  
> > > root@chef:/tmp/chef-solo/cookbooks# rm -rf chef-server  
> > > root@chef:/tmp/chef-solo/cookbooks# git clone git://github.com/opscode-cookbooks/chef-server.git  
> > > Cloning into 'chef-server'...  
> > > remote: Counting objects: 460, done.  
> > > remote: Compressing objects: 100% (240/240), done.  
> > > remote: Total 460 (delta 233), reused 407 (delta 188)  
> > > Receiving objects: 100% (460/460), 87.39 KiB, done.  
> > > Resolving deltas: 100% (233/233), done.  
> > > root@chef:/tmp/chef-solo/cookbooks# cd -  
> > > root@chef:~# grep ^version /tmp/chef-solo/cookbooks/chef-server/metadata.rb  
> > > version "2.0.0"
> 
> I again ran:
> 
> > > chef-solo -c /etc/chef/solo.rb -j /etc/chef/chef.json -r [http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz](http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz)
> 
> And I observed the same failure.
> 
> Is there a more reliable method of bootstrapping a Chef server?  
> Alternatively, what would I need to modify in order to install a  
> version of Chef server that is compatible with the chef-server  
> cookbook in the bootstrap-latest archive?
> 
> Again: I'm following [directions on the Opscode wiki](http://wiki.opscode.com/display/chef/Installing+Chef+Server+using+Chef+Solo#InstallingChefServerusingChefSolo-BootstrapChefServer). I  
> don't see any server installation documentation on the [docs  
> site](http://docs.opscode.com/#the-chef-server).
> 
> References:
> 
> --  
> Phil Mocek  
> [http://mocek.org/](http://mocek.org/)

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [February 5, 2013, 3:33am UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652/5 "2013-02-05T03:33:36Z")

</div>

Hi Phil,

On 2/4/13 5:10 PM, "Phil Mocek" [phil-lists@mocek.org](mailto:phil-lists@mocek.org) wrote:

> Unfortunately, it seems the problem is that  
> [http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz](http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz) still  
> contains the obsolete cookbook. I put a copy of chef-server  
> cookbook 2.0.0 in the location where chef-solo is configured to  
> expect cookbooks:  
>   
> Is there a more reliable method of bootstrapping a Chef server?  
> Alternatively, what would I need to modify in order to install a  
> version of Chef server that is compatible with the chef-server  
> cookbook in the bootstrap-latest archive?

I'm sorry I wasn't clearer earlier, I was using a mobile device to reply.  
It was perhaps too terse.

You actually just need to retrieve the correct package for your platform:

> **[Download Chef Infra Client | Chef](https://www.chef.io/downloads/tools/infra-client)**
>
> Chef Infra Client is an agent that runs locally on every node that is under management by Chef Infra.

From the "Chef Server" tab.

Then, install the package on the system, and when it's done, run:

sudo chef-server-ctl reconfigure

You can optionally run this to perform all the tests in the "pedant" test  
suite.

sudo chef-server-ctl test

> Again: I'm following [directions on the Opscode wiki][1]. I  
> don't see any server installation documentation on the [docs  
> site][2].

Yeah, the installation pages in the wiki aren't yet updated for Chef 11.  
I'm sorry it isn't obvious how to go about installing Chef 11 server.  
We're working on getting that updated.

Cheers,  
Joshua

---

<div class="post-metadata">

**Author:** ![Jesse\_Campbell](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jesse_campbell/32/251_2.png) [@Jesse\_Campbell](https://discourse.chef.io/u/Jesse_Campbell)\
**Post date:** [February 6, 2013, 6:16pm UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652/6 "2013-02-06T18:16:13Z")

</div>

with chef-client, we can install on a unix platform by running this:  
curl -L [https://www.opscode.com/chef/install.sh](https://www.opscode.com/chef/install.sh) | bash

is there an analogue for chef-server?

On Mon, Feb 4, 2013 at 10:33 PM, Joshua Timberman [joshua@opscode.com](mailto:joshua@opscode.com)wrote:

> Hi Phil,
> 
> On 2/4/13 5:10 PM, "Phil Mocek" [phil-lists@mocek.org](mailto:phil-lists@mocek.org) wrote:
> 
> > Unfortunately, it seems the problem is that  
> > [http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz](http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz) still  
> > contains the obsolete cookbook. I put a copy of chef-server  
> > cookbook 2.0.0 in the location where chef-solo is configured to  
> > expect cookbooks:  
> >   
> > Is there a more reliable method of bootstrapping a Chef server?  
> > Alternatively, what would I need to modify in order to install a  
> > version of Chef server that is compatible with the chef-server  
> > cookbook in the bootstrap-latest archive?
> 
> I'm sorry I wasn't clearer earlier, I was using a mobile device to reply.  
> It was perhaps too terse.
> 
> You actually just need to retrieve the correct package for your platform:
> 
> [http://www.opscode.com/chef/install/](http://www.opscode.com/chef/install/)
> 
> From the "Chef Server" tab.
> 
> Then, install the package on the system, and when it's done, run:
> 
> sudo chef-server-ctl reconfigure
> 
> You can optionally run this to perform all the tests in the "pedant" test  
> suite.
> 
> sudo chef-server-ctl test
> 
> > Again: I'm following [directions on the Opscode wiki][1]. I  
> > don't see any server installation documentation on the [docs  
> > site][2].
> 
> Yeah, the installation pages in the wiki aren't yet updated for Chef 11.  
> I'm sorry it isn't obvious how to go about installing Chef 11 server.  
> We're working on getting that updated.
> 
> Cheers,  
> Joshua

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [February 6, 2013, 6:21pm UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652/7 "2013-02-06T18:21:11Z")

</div>

On Wednesday, February 6, 2013 at 10:16 AM, Jesse Campbell wrote:

> with chef-client, we can install on a unix platform by running this:  
> curl -L [https://www.opscode.com/chef/install.sh](https://www.opscode.com/chef/install.sh) | bash
> 
> is there an analogue for chef-server?  
> No. Since the server install is usually less frequent, we chose not to have an installer script to maintain. Also, we wanted to funnel new users through the [https://www.opscode.com/chef/install](https://www.opscode.com/chef/install) page so we can link to docs, troubleshooting tips, etc. If you're standing up a lot of Chef servers, you can either use the Omnitruck GET API or distribute the server package via scp/repo/etc.

--  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![pmocek](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pmocek](https://discourse.chef.io/u/pmocek)\
**Post date:** [February 6, 2013, 9:01pm UTC](https://discourse.chef.io/t/bootstrapping-chef-server-fails-with-no-valid-gem-chef-server-api-11-0-0/3652/8 "2013-02-06T21:01:36Z")

</div>

On Tue, Feb 05, 2013 at 03:33:36AM +0000, Joshua Timberman wrote:

> the installation pages in the wiki aren't yet updated for Chef 11.

I updated the [Bootstrap Chef Server section](http://wiki.opscode.com/display/chef/Installing+Chef+Server+using+Chef+Solo#InstallingChefServerusingChefSolo-BootstrapChefServer) of the  
"Installing Chef Server using Chef Solo" page with a warning that  
it may be obsolete and a reference to this discussion.

References:

--  
Phil Mocek  
[http://mocek.org/](http://mocek.org/)
