# Multiple Chef Servers on Different Ports

**URL:** <https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543>\
**Category:** Chef Infra (archive)\
**Created:** [March 9, 2012, 4:58pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543 "2012-03-09T16:58:36Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 9, 2012, 4:58pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/1 "2012-03-09T16:58:36Z")

</div>

Hi,

I have several git repos to manage changes to different environments (say  
DEV + PROD). Is it pretty straight-forward to run chef-server on different  
ports and have the DEV clients connect to the DEV port and PROD to the PROD  
port? Will I need to configure different rabbitmq queues and couchdb  
database for each one?

If any has pointers to docs (Google hasn’t help here) or has experience  
doing this I’d appreciate it.

Thanks,  
Mark

---

<div class="post-metadata">

**Author:** ![Bryan\_McLellan](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_mclellan/32/81_2.png) [@Bryan\_McLellan](https://discourse.chef.io/u/Bryan_McLellan)\
**Post date:** [March 9, 2012, 5:39pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/2 "2012-03-09T17:39:55Z")

</div>

On Fri, Mar 9, 2012 at 11:58 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> I have several git repos to manage changes to different environments (say  
> DEV + PROD). Is it pretty straight-forward to run chef-server on different  
> ports and have the DEV clients connect to the DEV port and PROD to the PROD  
> port? Will I need to configure different rabbitmq queues and couchdb  
> database for each one?
> 
> If any has pointers to docs (Google hasn't help here) or has experience  
> doing this I'd appreciate it.

I'd start here: [http://wiki.opscode.com/display/chef/Chef+Configuration+Settings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings)

The trick is that you'll need to be running two of everything. You can  
make decisions like two couchdb servers or one with two databases, and  
two rabbitmq servers or one with multiple vhosts? Theoretically you  
can set all this. If you do it, I'd love to hear your success. I'd  
personally just run two VMs because it leaves you with a more standard  
installation that is easier to scale.

Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 9, 2012, 5:50pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/3 "2012-03-09T17:50:08Z")

</div>

Hi Bryan, that's pretty much what I thought but wanted to check my idea  
before starting to install and configure (and suffer debugging pains 🙂 ).  
I'm not expecting _many_ clients, fewer that 100, so I think I'll go with  
one each of couchdb and rabbitmq and use multiple databases and multiple  
queues.

I can't run 2 VMs, because:  
a) I'm running in an EC2 instance and cannot further virtualize 🙂  
b) I really simplified the question and have other environments (QA, UAT,  
etc.) in between DEV and PROD. I can't afford that many servers for this  
project.

Mark

On Fri, Mar 9, 2012 at 12:39 PM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org) wrote:

> On Fri, Mar 9, 2012 at 11:58 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> wrote:
> 
> > I have several git repos to manage changes to different environments (say  
> > DEV + PROD). Is it pretty straight-forward to run chef-server on  
> > different  
> > ports and have the DEV clients connect to the DEV port and PROD to the  
> > PROD  
> > port? Will I need to configure different rabbitmq queues and couchdb  
> > database for each one?
> > 
> > If any has pointers to docs (Google hasn't help here) or has experience  
> > doing this I'd appreciate it.
> 
> I'd start here:  
> [http://wiki.opscode.com/display/chef/Chef+Configuration+Settings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings)
> 
> The trick is that you'll need to be running two of everything. You can  
> make decisions like two couchdb servers or one with two databases, and  
> two rabbitmq servers or one with multiple vhosts? Theoretically you  
> can set all this. If you do it, I'd love to hear your success. I'd  
> personally just run two VMs because it leaves you with a more standard  
> installation that is easier to scale.
> 
> Bryan

---

<div class="post-metadata">

**Author:** ![Bryan\_McLellan](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_mclellan/32/81_2.png) [@Bryan\_McLellan](https://discourse.chef.io/u/Bryan_McLellan)\
**Post date:** [March 9, 2012, 5:56pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/4 "2012-03-09T17:56:17Z")

</div>

On Fri, Mar 9, 2012 at 12:50 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> Hi Bryan, that's pretty much what I thought but wanted to check my idea  
> before starting to install and configure (and suffer debugging pains 🙂 ).  
> I'm not expecting _many_ clients, fewer that 100, so I think I'll go with  
> one each of couchdb and rabbitmq and use multiple databases and multiple  
> queues.
> 
> I can't run 2 VMs, because:  
> a) I'm running in an EC2 instance and cannot further virtualize 🙂  
> b) I really simplified the question and have other environments (QA, UAT,  
> etc.) in between DEV and PROD. I can't afford that many servers for this  
> project.

Cookies if you do this with chef-solo and release your cookbook when  
you're done.

Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 9, 2012, 6:28pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/5 "2012-03-09T18:28:46Z")

</div>

OK, I'll try and tackle solo mode once I have this env up and running.

First dumb question: is there a way to point chef-server at a different  
server.rb than the one in /etc/chef? I did chef-server --help but couldn't  
find any options for that.

Thanks,  
Mark

On Fri, Mar 9, 2012 at 12:56 PM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org) wrote:

> On Fri, Mar 9, 2012 at 12:50 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> wrote:
> 
> > Hi Bryan, that's pretty much what I thought but wanted to check my idea  
> > before starting to install and configure (and suffer debugging pains 🙂  
> > ).  
> > I'm not expecting _many_ clients, fewer that 100, so I think I'll go with  
> > one each of couchdb and rabbitmq and use multiple databases and multiple  
> > queues.
> > 
> > I can't run 2 VMs, because:  
> > a) I'm running in an EC2 instance and cannot further virtualize 🙂  
> > b) I really simplified the question and have other environments (QA, UAT,  
> > etc.) in between DEV and PROD. I can't afford that many servers for this  
> > project.
> 
> Cookies if you do this with chef-solo and release your cookbook when  
> you're done.
> 
> Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 9, 2012, 7:21pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/6 "2012-03-09T19:21:19Z")

</div>

Does this also mean I need multiple solr servers, each on a different port?

Mark

On Fri, Mar 9, 2012 at 12:50 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> Hi Bryan, that's pretty much what I thought but wanted to check my idea  
> before starting to install and configure (and suffer debugging pains 🙂 ).  
> I'm not expecting _many_ clients, fewer that 100, so I think I'll go with  
> one each of couchdb and rabbitmq and use multiple databases and multiple  
> queues.
> 
> I can't run 2 VMs, because:  
> a) I'm running in an EC2 instance and cannot further virtualize 🙂  
> b) I really simplified the question and have other environments (QA, UAT,  
> etc.) in between DEV and PROD. I can't afford that many servers for this  
> project.
> 
> Mark
> 
> On Fri, Mar 9, 2012 at 12:39 PM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org)wrote:
> 
> > On Fri, Mar 9, 2012 at 11:58 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> > wrote:
> > 
> > > I have several git repos to manage changes to different environments  
> > > (say  
> > > DEV + PROD). Is it pretty straight-forward to run chef-server on  
> > > different  
> > > ports and have the DEV clients connect to the DEV port and PROD to the  
> > > PROD  
> > > port? Will I need to configure different rabbitmq queues and couchdb  
> > > database for each one?
> > > 
> > > If any has pointers to docs (Google hasn't help here) or has experience  
> > > doing this I'd appreciate it.
> > 
> > I'd start here:  
> > [http://wiki.opscode.com/display/chef/Chef+Configuration+Settings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings)
> > 
> > The trick is that you'll need to be running two of everything. You can  
> > make decisions like two couchdb servers or one with two databases, and  
> > two rabbitmq servers or one with multiple vhosts? Theoretically you  
> > can set all this. If you do it, I'd love to hear your success. I'd  
> > personally just run two VMs because it leaves you with a more standard  
> > installation that is easier to scale.
> > 
> > Bryan

---

<div class="post-metadata">

**Author:** ![Andrea\_Campi](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/andrea_campi/32/514_2.png) [@Andrea\_Campi](https://discourse.chef.io/u/Andrea_Campi)\
**Post date:** [March 9, 2012, 8:32pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/7 "2012-03-09T20:32:45Z")

</div>

On Mar 9, 2012, at 8:21 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> Does this also mean I need multiple solr servers, each on a different port?

You need multiple Solr instances. Not necessarily different ports, if you set it up as multiple contexts on a single tomcat (or what have you).  
I'd like to hear about your experience too.

> On Fri, Mar 9, 2012 at 12:50 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:  
> Hi Bryan, that's pretty much what I thought but wanted to check my idea before starting to install and configure (and suffer debugging pains 🙂 ). I'm not expecting _many_ clients, fewer that 100, so I think I'll go with one each of couchdb and rabbitmq and use multiple databases and multiple queues.
> 
> I can't run 2 VMs, because:  
> a) I'm running in an EC2 instance and cannot further virtualize 🙂  
> b) I really simplified the question and have other environments (QA, UAT, etc.) in between DEV and PROD. I can't afford that many servers for this project.
> 
> Mark
> 
> On Fri, Mar 9, 2012 at 12:39 PM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org) wrote:  
> On Fri, Mar 9, 2012 at 11:58 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:
> 
> > I have several git repos to manage changes to different environments (say  
> > DEV + PROD). Is it pretty straight-forward to run chef-server on different  
> > ports and have the DEV clients connect to the DEV port and PROD to the PROD  
> > port? Will I need to configure different rabbitmq queues and couchdb  
> > database for each one?
> > 
> > If any has pointers to docs (Google hasn't help here) or has experience  
> > doing this I'd appreciate it.
> 
> I'd start here: [http://wiki.opscode.com/display/chef/Chef+Configuration+Settings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings)
> 
> The trick is that you'll need to be running two of everything. You can  
> make decisions like two couchdb servers or one with two databases, and  
> two rabbitmq servers or one with multiple vhosts? Theoretically you  
> can set all this. If you do it, I'd love to hear your success. I'd  
> personally just run two VMs because it leaves you with a more standard  
> installation that is easier to scale.
> 
> Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 9, 2012, 8:37pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/8 "2012-03-09T20:37:28Z")

</div>

I promise to document what I find :), it's the least I can do for all your  
kind help on the list.

Mark

On Fri, Mar 9, 2012 at 3:32 PM, Andrea Campi  
[andrea.campi@zephirworks.com](mailto:andrea.campi@zephirworks.com)wrote:

> On Mar 9, 2012, at 8:21 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:
> 
> Does this also mean I need multiple solr servers, each on a different port?
> 
> You need multiple Solr instances. Not necessarily different ports, if you  
> set it up as multiple contexts on a single tomcat (or what have you).  
> I'd like to hear about your experience too.
> 
> On Fri, Mar 9, 2012 at 12:50 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)wrote:
> 
> > Hi Bryan, that's pretty much what I thought but wanted to check my idea  
> > before starting to install and configure (and suffer debugging pains 🙂 ).  
> > I'm not expecting _many_ clients, fewer that 100, so I think I'll go with  
> > one each of couchdb and rabbitmq and use multiple databases and multiple  
> > queues.
> > 
> > I can't run 2 VMs, because:  
> > a) I'm running in an EC2 instance and cannot further virtualize 🙂  
> > b) I really simplified the question and have other environments (QA, UAT,  
> > etc.) in between DEV and PROD. I can't afford that many servers for this  
> > project.
> > 
> > Mark
> > 
> > On Fri, Mar 9, 2012 at 12:39 PM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org)wrote:
> > 
> > > On Fri, Mar 9, 2012 at 11:58 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> > > wrote:
> > > 
> > > > I have several git repos to manage changes to different environments  
> > > > (say  
> > > > DEV + PROD). Is it pretty straight-forward to run chef-server on  
> > > > different  
> > > > ports and have the DEV clients connect to the DEV port and PROD to the  
> > > > PROD  
> > > > port? Will I need to configure different rabbitmq queues and couchdb  
> > > > database for each one?
> > > > 
> > > > If any has pointers to docs (Google hasn't help here) or has experience  
> > > > doing this I'd appreciate it.
> > > 
> > > I'd start here:  
> > > [http://wiki.opscode.com/display/chef/Chef+Configuration+Settings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings)
> > > 
> > > The trick is that you'll need to be running two of everything. You can  
> > > make decisions like two couchdb servers or one with two databases, and  
> > > two rabbitmq servers or one with multiple vhosts? Theoretically you  
> > > can set all this. If you do it, I'd love to hear your success. I'd  
> > > personally just run two VMs because it leaves you with a more standard  
> > > installation that is easier to scale.
> > > 
> > > Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 9, 2012, 9:03pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/9 "2012-03-09T21:03:55Z")

</div>

When I try and start the chef-server I get the following error (cryptic)  
message. Can anyone identify what the source of the problem might be?

DEBUG: Starting AMQP connection with client settings:  
#\<Bunny::Client:0x7f9292af6898 @pass="chef", @queues={}, @heartbeat=0,  
@connecting=false, @lo  
gfile=nil, @user="chef", @insist=nil, @logger=nil, @exchanges={},  
@frame\_max=131072, @verify\_ssl=true, @message\_out=false,  
@vhost="dev-vhost", @por  
t="5672", @spec="0-8", @connect\_timeout=5.0, @channel\_max=0, @ssl=false,  
@host="0.0.0.0", @message\_in=false, @status=:not\_connected, @channel=#\<Bun  
ny::Channel:0x7f9292aeeb48 @number=0,  
@client=#\<Bunny::Client:0x7f9292af6898 ...\>, @active=false,  
@frame\_buffer=\>, @channels=[#\<Bunny::Channel:0x  
7f9292aeeb48 @number=0, @client=#\<Bunny::Client:0x7f9292af6898 ...\>,  
@active=false, @frame\_buffer=\>], @logging=false\>  
/usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/qrack/client.rb:84:in  
`next_method': undefined method `payload' for nil:NilClass (NoMethodError)  
from  
/usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/bunny/client08.rb:210:in  
`open_connection' from /usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/bunny/client08.rb:397:in `start'  
from  
/usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/bunny/client08.rb:389:in `loop' from /usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/bunny/client08.rb:389:in `start'  
from  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/index\_queue/amqp\_client.rb:45:in  
`amqp_client' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/index_queue/amqp_client.rb:72:in `queue\_for\_object'  
from  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/index\_queue/indexable.rb:95:in  
`publish_object' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/index_queue/indexable.rb:83:in `delete\_from\_index'  
from  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/couchdb.rb:165:in `delete' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/api_client.rb:221:in `cdb\_destroy'  
from  
/usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/certificate.rb:152:in  
`gen_validation_key' from /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.10.6/config/init.rb:84 from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:529:in `load'  
from  
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:529:in  
`load_initfile' from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:377:in `run'  
from  
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:97:in  
`run' from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:172:in `bootup'  
from  
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:42:in  
`start' from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core.rb:165:in `start'  
from  
/usr/lib/ruby/gems/1.8/gems/chef-server-api-0.10.6/bin/chef-server:84  
from /usr/bin/chef-server:19:in `load'  
from /usr/bin/chef-server:19

On Fri, Mar 9, 2012 at 3:32 PM, Andrea Campi  
[andrea.campi@zephirworks.com](mailto:andrea.campi@zephirworks.com)wrote:

> On Mar 9, 2012, at 8:21 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:
> 
> Does this also mean I need multiple solr servers, each on a different port?
> 
> You need multiple Solr instances. Not necessarily different ports, if you  
> set it up as multiple contexts on a single tomcat (or what have you).  
> I'd like to hear about your experience too.
> 
> On Fri, Mar 9, 2012 at 12:50 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)wrote:
> 
> > Hi Bryan, that's pretty much what I thought but wanted to check my idea  
> > before starting to install and configure (and suffer debugging pains 🙂 ).  
> > I'm not expecting _many_ clients, fewer that 100, so I think I'll go with  
> > one each of couchdb and rabbitmq and use multiple databases and multiple  
> > queues.
> > 
> > I can't run 2 VMs, because:  
> > a) I'm running in an EC2 instance and cannot further virtualize 🙂  
> > b) I really simplified the question and have other environments (QA, UAT,  
> > etc.) in between DEV and PROD. I can't afford that many servers for this  
> > project.
> > 
> > Mark
> > 
> > On Fri, Mar 9, 2012 at 12:39 PM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org)wrote:
> > 
> > > On Fri, Mar 9, 2012 at 11:58 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> > > wrote:
> > > 
> > > > I have several git repos to manage changes to different environments  
> > > > (say  
> > > > DEV + PROD). Is it pretty straight-forward to run chef-server on  
> > > > different  
> > > > ports and have the DEV clients connect to the DEV port and PROD to the  
> > > > PROD  
> > > > port? Will I need to configure different rabbitmq queues and couchdb  
> > > > database for each one?
> > > > 
> > > > If any has pointers to docs (Google hasn't help here) or has experience  
> > > > doing this I'd appreciate it.
> > > 
> > > I'd start here:  
> > > [http://wiki.opscode.com/display/chef/Chef+Configuration+Settings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings)
> > > 
> > > The trick is that you'll need to be running two of everything. You can  
> > > make decisions like two couchdb servers or one with two databases, and  
> > > two rabbitmq servers or one with multiple vhosts? Theoretically you  
> > > can set all this. If you do it, I'd love to hear your success. I'd  
> > > personally just run two VMs because it leaves you with a more standard  
> > > installation that is easier to scale.
> > > 
> > > Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 13, 2012, 5:03pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/10 "2012-03-13T17:03:34Z")

</div>

Hi folks, any ideas? Any ideas about how to go debugging this?

Thanks,  
Mark

On Fri, Mar 9, 2012 at 4:03 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> When I try and start the chef-server I get the following error (cryptic)  
> message. Can anyone identify what the source of the problem might be?
> 
> DEBUG: Starting AMQP connection with client settings:  
> #\<Bunny::Client:0x7f9292af6898 @pass="chef", @queues={}, @heartbeat=0,  
> @connecting=false, @lo  
> gfile=nil, @user="chef", @insist=nil, @logger=nil, @exchanges={},  
> @frame\_max=131072, @verify\_ssl=true, @message\_out=false,  
> @vhost="dev-vhost", @por  
> t="5672", @spec="0-8", @connect\_timeout=5.0, @channel\_max=0, @ssl=false,  
> @host="0.0.0.0", @message\_in=false, @status=:not\_connected, @channel=#\<Bun  
> ny::Channel:0x7f9292aeeb48 @number=0,  
> @client=#\<Bunny::Client:0x7f9292af6898 ...\>, @active=false,  
> @frame\_buffer=\>, @channels=[#\<Bunny::Channel:0x  
> 7f9292aeeb48 @number=0, @client=#\<Bunny::Client:0x7f9292af6898 ...\>,  
> @active=false, @frame\_buffer=\>], @logging=false\>  
> /usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/qrack/client.rb:84:in  
> `next_method': undefined method `payload' for nil:NilClass (NoMethodError)  
> from  
> /usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/bunny/client08.rb:210:in  
> `open_connection' from /usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/bunny/client08.rb:397:in `start'  
> from  
> /usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/bunny/client08.rb:389:in `loop' from /usr/lib/ruby/gems/1.8/gems/bunny-0.6.0/lib/bunny/client08.rb:389:in `start'  
> from  
> /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/index\_queue/amqp\_client.rb:45:in  
> `amqp_client' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/index_queue/amqp_client.rb:72:in `queue\_for\_object'  
> from  
> /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/index\_queue/indexable.rb:95:in  
> `publish_object' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/index_queue/indexable.rb:83:in `delete\_from\_index'  
> from  
> /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/couchdb.rb:165:in `delete' from /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/api_client.rb:221:in `cdb\_destroy'  
> from  
> /usr/lib/ruby/gems/1.8/gems/chef-0.10.6/lib/chef/certificate.rb:152:in  
> `gen_validation_key' from /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.10.6/config/init.rb:84 from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:529:in `load'  
> from  
> /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:529:in  
> `load_initfile' from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:377:in `run'  
> from  
> /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/bootloader.rb:97:in  
> `run' from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:172:in `bootup'  
> from  
> /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/server.rb:42:in  
> `start' from /usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core.rb:165:in `start'  
> from  
> /usr/lib/ruby/gems/1.8/gems/chef-server-api-0.10.6/bin/chef-server:84  
> from /usr/bin/chef-server:19:in `load'  
> from /usr/bin/chef-server:19
> 
> On Fri, Mar 9, 2012 at 3:32 PM, Andrea Campi \<[andrea.campi@zephirworks.com](mailto:andrea.campi@zephirworks.com)
> 
> > wrote:
> 
> > On Mar 9, 2012, at 8:21 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:
> > 
> > Does this also mean I need multiple solr servers, each on a different  
> > port?
> > 
> > You need multiple Solr instances. Not necessarily different ports, if you  
> > set it up as multiple contexts on a single tomcat (or what have you).  
> > I'd like to hear about your experience too.
> > 
> > On Fri, Mar 9, 2012 at 12:50 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)wrote:
> > 
> > > Hi Bryan, that's pretty much what I thought but wanted to check my idea  
> > > before starting to install and configure (and suffer debugging pains 🙂 ).  
> > > I'm not expecting _many_ clients, fewer that 100, so I think I'll go with  
> > > one each of couchdb and rabbitmq and use multiple databases and multiple  
> > > queues.
> > > 
> > > I can't run 2 VMs, because:  
> > > a) I'm running in an EC2 instance and cannot further virtualize 🙂  
> > > b) I really simplified the question and have other environments (QA,  
> > > UAT, etc.) in between DEV and PROD. I can't afford that many servers for  
> > > this project.
> > > 
> > > Mark
> > > 
> > > On Fri, Mar 9, 2012 at 12:39 PM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org)wrote:
> > > 
> > > > On Fri, Mar 9, 2012 at 11:58 AM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> > > > wrote:
> > > > 
> > > > > I have several git repos to manage changes to different environments  
> > > > > (say  
> > > > > DEV + PROD). Is it pretty straight-forward to run chef-server on  
> > > > > different  
> > > > > ports and have the DEV clients connect to the DEV port and PROD to  
> > > > > the PROD  
> > > > > port? Will I need to configure different rabbitmq queues and couchdb  
> > > > > database for each one?
> > > > > 
> > > > > If any has pointers to docs (Google hasn't help here) or has  
> > > > > experience  
> > > > > doing this I'd appreciate it.
> > > > 
> > > > I'd start here:  
> > > > [http://wiki.opscode.com/display/chef/Chef+Configuration+Settings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings)
> > > > 
> > > > The trick is that you'll need to be running two of everything. You can  
> > > > make decisions like two couchdb servers or one with two databases, and  
> > > > two rabbitmq servers or one with multiple vhosts? Theoretically you  
> > > > can set all this. If you do it, I'd love to hear your success. I'd  
> > > > personally just run two VMs because it leaves you with a more standard  
> > > > installation that is easier to scale.
> > > > 
> > > > Bryan

---

<div class="post-metadata">

**Author:** ![Andrea\_Campi](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/andrea_campi/32/514_2.png) [@Andrea\_Campi](https://discourse.chef.io/u/Andrea_Campi)\
**Post date:** [March 13, 2012, 5:43pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/11 "2012-03-13T17:43:23Z")

</div>

On Tue, Mar 13, 2012 at 6:03 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> Hi folks, any ideas? Any ideas about how to go debugging this?

Looks like a failure to connect to Rabbitmq; the error message is  
uglier than it could be (I have bunny-0.7.9 where the failure is  
handled better).  
Did you confirm it is indeed running on port 5672? Also, I see the  
host is 0.0.0.0.  
Depending on your OS and the phase of the moon, that may be different  
from 127.0.0.1; try that one.

Andrea

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 13, 2012, 8:19pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/12 "2012-03-13T20:19:44Z")

</div>

Hi Andrea,

I checked with netstat and it looks like it is on the right port; as for  
the Host=0.0.0.0 I don't yet know where it's getting that. Still looking ..

Mark

On Tue, Mar 13, 2012 at 1:43 PM, Andrea Campi  
[andrea.campi@zephirworks.com](mailto:andrea.campi@zephirworks.com)wrote:

> On Tue, Mar 13, 2012 at 6:03 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> wrote:
> 
> > Hi folks, any ideas? Any ideas about how to go debugging this?
> 
> Looks like a failure to connect to Rabbitmq; the error message is  
> uglier than it could be (I have bunny-0.7.9 where the failure is  
> handled better).  
> Did you confirm it is indeed running on port 5672? Also, I see the  
> host is 0.0.0.0.  
> Depending on your OS and the phase of the moon, that may be different  
> from 127.0.0.1; try that one.
> 
> Andrea

---

<div class="post-metadata">

**Author:** ![Andrea\_Campi](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/andrea_campi/32/514_2.png) [@Andrea\_Campi](https://discourse.chef.io/u/Andrea_Campi)\
**Post date:** [March 13, 2012, 10:12pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/13 "2012-03-13T22:12:05Z")

</div>

On Tue, Mar 13, 2012 at 9:25 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> OK, I found the setting apqp\_host and set it to 127.0.0.1 with no effect  
> (that is, still getting the error).

[https://github.com/celldee/bunny/issues/21](https://github.com/celldee/bunny/issues/21) suggests it may be an  
authentication error.

Refer to [http://wiki.opscode.com/display/chef/Chef+Indexer](http://wiki.opscode.com/display/chef/Chef+Indexer), it has a  
nice "checklist" you can use to verify rabbitmq is set up correctly.

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 13, 2012, 10:47pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/14 "2012-03-13T22:47:20Z")

</div>

Thanks Andrea, awesome links; following the Chef Indexer list fixed the  
problem, somehow. I suspect by forcing me to clean up my broker and  
restarting the instance.

Mark

On Tue, Mar 13, 2012 at 6:12 PM, Andrea Campi  
[andrea.campi@zephirworks.com](mailto:andrea.campi@zephirworks.com)wrote:

> On Tue, Mar 13, 2012 at 9:25 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> wrote:
> 
> > OK, I found the setting apqp\_host and set it to 127.0.0.1 with no effect  
> > (that is, still getting the error).
> 
> [https://github.com/celldee/bunny/issues/21](https://github.com/celldee/bunny/issues/21) suggests it may be an  
> authentication error.
> 
> Refer to [http://wiki.opscode.com/display/chef/Chef+Indexer](http://wiki.opscode.com/display/chef/Chef+Indexer), it has a  
> nice "checklist" you can use to verify rabbitmq is set up correctly.

---

<div class="post-metadata">

**Author:** ![Andrea\_Campi](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/andrea_campi/32/514_2.png) [@Andrea\_Campi](https://discourse.chef.io/u/Andrea_Campi)\
**Post date:** [March 13, 2012, 11:24pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/15 "2012-03-13T23:24:44Z")

</div>

On Tue, Mar 13, 2012 at 11:47 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> Thanks Andrea, awesome links; following the Chef Indexer list fixed the  
> problem, somehow. I suspect by forcing me to clean up my broker and  
> restarting the instance.

Glad to help 🙂

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 14, 2012, 7:54pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/16 "2012-03-14T19:54:52Z")

</div>

Well, it -was- going pretty well; I got one server up and running from a  
repository and, while getting the second one going, I'm running into  
certificate issues. Which highlights to me that I don't know enough about  
how certificates are generated and consumed in the Chef architecture. Are  
there any good pointers to documentation on this?

Mark

On Tue, Mar 13, 2012 at 7:24 PM, Andrea Campi  
[andrea.campi@zephirworks.com](mailto:andrea.campi@zephirworks.com)wrote:

> On Tue, Mar 13, 2012 at 11:47 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> wrote:
> 
> > Thanks Andrea, awesome links; following the Chef Indexer list fixed the  
> > problem, somehow. I suspect by forcing me to clean up my broker and  
> > restarting the instance.
> 
> Glad to help 🙂

---

<div class="post-metadata">

**Author:** ![Bryan\_McLellan](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bryan_mclellan/32/81_2.png) [@Bryan\_McLellan](https://discourse.chef.io/u/Bryan_McLellan)\
**Post date:** [March 14, 2012, 8:13pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/17 "2012-03-14T20:13:42Z")

</div>

On Wed, Mar 14, 2012 at 3:54 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> Well, it -was- going pretty well; I got one server up and running from a  
> repository and, while getting the second one going, I'm running into  
> certificate issues. Which highlights to me that I don't know enough about  
> how certificates are generated and consumed in the Chef architecture. Are  
> there any good pointers to documentation on this?

What kind of certificates? They're used for client authentication,  
which is briefly described here:  
[http://wiki.opscode.com/display/chef/API+Clients](http://wiki.opscode.com/display/chef/API+Clients)

Make sure you set the path to the validation\_key to a different value  
for each server. This is the special client that can be used to  
automate creating new clients. If the file specified by validation\_key  
does not exist it is recreated, but keep in mind that client keys are  
actually stored internally in the database. This file on the server is  
mostly a convenient way for you to get a couple of the validation  
clients key. See  
[http://wiki.opscode.com/display/chef/Chef+Configuration+Settings#ChefConfigurationSettings-certificatesettings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings#ChefConfigurationSettings-certificatesettings)

Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 15, 2012, 12:56am UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/18 "2012-03-15T00:56:22Z")

</div>

Thanks again for the links, they helped get me (initially) past the  
certificate issues.

I'm trying to start the webui and, although it seems to start correctly, I  
cannot seem to log in when presented with a login form. My chef-server is  
on port 4020 and the webui is on port 4050.

Which step is responsible for populating the database with the initial  
admin user?

Mark

Some of the log:

[Thu, 15 Mar 2012 00:45:53 +0000] DEBUG: Sending HTTP Request via GET to  
localhost:5984/chef/\_design/users/\_view/all\_id  
[Thu, 15 Mar 2012 00:45:53 +0000] DEBUG: Sending HTTP Request via GET to  
localhost:5984/chef/\_design/id\_map/\_view/name\_to\_id  
Logging to file at /var/log/chef/server-webui-qa.log

[Thu, 15 Mar 2012 00:46:24 +0000] DEBUG: Signing the request as  
chef-webui-qa  
[Thu, 15 Mar 2012 00:46:24 +0000] DEBUG: Sending HTTP Request via GET to  
localhost:4020/environments  
[Thu, 15 Mar 2012 00:46:25 +0000] DEBUG: Signing the request as  
chef-webui-qa  
[Thu, 15 Mar 2012 00:46:25 +0000] DEBUG: Sending HTTP Request via GET to  
localhost:4020/environments  
[Thu, 15 Mar 2012 00:46:36 +0000] DEBUG: Signing the request as  
chef-webui-qa  
[Thu, 15 Mar 2012 00:46:36 +0000] DEBUG: Sending HTTP Request via GET to  
localhost:4020/environments  
[Thu, 15 Mar 2012 00:46:37 +0000] DEBUG: Signing the request as  
chef-webui-qa  
[Thu, 15 Mar 2012 00:46:37 +0000] DEBUG: Sending HTTP Request via GET to  
localhost:4020/users/a  
[Thu, 15 Mar 2012 00:46:37 +0000] INFO: HTTP Request Returned 404 Not  
Found: Cannot load user a  
[Thu, 15 Mar 2012 00:46:37 +0000] ERROR: 404 "Not Found"

From server-webui-qa.log:  
merb : chef-server-webui : worker (port 4050) ~ Started request handling:  
Thu Mar 15 00:46:36 +0000 2012  
merb : chef-server-webui : worker (port 4050) ~ Routed to:  
{"action"=\>"login\_exec", "form\_submit"=\>"login", "name"=\>"a",  
"password"=\>"[FILTERED]",   
"controller"=\>"users"}  
merb : chef-server-webui : worker (port 4050) ~ Params:  
{"action"=\>"login\_exec", "form\_submit"=\>"login", "name"=\>"a",  
"password"=\>"[FILTERED]", "co  
ntroller"=\>"users"}  
merb : chef-server-webui : worker (port 4050) ~ {:dispatch\_time=\>0.115816,  
:action\_time=\>0.114778, :after\_filters\_time=\>2.8e-05, :before\_filters\_ti  
me=\>0.077609}  
merb : chef-server-webui : worker (port 4050) ~

On Wed, Mar 14, 2012 at 4:13 PM, Bryan McLellan [btm@loftninjas.org](mailto:btm@loftninjas.org) wrote:

> On Wed, Mar 14, 2012 at 3:54 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> wrote:
> 
> > Well, it -was- going pretty well; I got one server up and running from a  
> > repository and, while getting the second one going, I'm running into  
> > certificate issues. Which highlights to me that I don't know enough about  
> > how certificates are generated and consumed in the Chef architecture. Are  
> > there any good pointers to documentation on this?
> 
> What kind of certificates? They're used for client authentication,  
> which is briefly described here:  
> [http://wiki.opscode.com/display/chef/API+Clients](http://wiki.opscode.com/display/chef/API+Clients)
> 
> Make sure you set the path to the validation\_key to a different value  
> for each server. This is the special client that can be used to  
> automate creating new clients. If the file specified by validation\_key  
> does not exist it is recreated, but keep in mind that client keys are  
> actually stored internally in the database. This file on the server is  
> mostly a convenient way for you to get a couple of the validation  
> clients key. See
> 
> [http://wiki.opscode.com/display/chef/Chef+Configuration+Settings#ChefConfigurationSettings-certificatesettings](http://wiki.opscode.com/display/chef/Chef+Configuration+Settings#ChefConfigurationSettings-certificatesettings)
> 
> Bryan

---

<div class="post-metadata">

**Author:** ![mark\_bradley](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mark\_bradley](https://discourse.chef.io/u/mark_bradley)\
**Post date:** [March 13, 2012, 8:25pm UTC](https://discourse.chef.io/t/multiple-chef-servers-on-different-ports/2543/19 "2012-03-13T20:25:43Z")

</div>

OK, I found the setting apqp\_host and set it to 127.0.0.1 with no effect  
(that is, still getting the error).

Mark

On Tue, Mar 13, 2012 at 4:19 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com) wrote:

> Hi Andrea,
> 
> I checked with netstat and it looks like it is on the right port; as for  
> the Host=0.0.0.0 I don't yet know where it's getting that. Still looking ..
> 
> Mark
> 
> On Tue, Mar 13, 2012 at 1:43 PM, Andrea Campi \<  
> [andrea.campi@zephirworks.com](mailto:andrea.campi@zephirworks.com)\> wrote:
> 
> > On Tue, Mar 13, 2012 at 6:03 PM, mark bradley [gopearls42@gmail.com](mailto:gopearls42@gmail.com)  
> > wrote:
> > 
> > > Hi folks, any ideas? Any ideas about how to go debugging this?
> > 
> > Looks like a failure to connect to Rabbitmq; the error message is  
> > uglier than it could be (I have bunny-0.7.9 where the failure is  
> > handled better).  
> > Did you confirm it is indeed running on port 5672? Also, I see the  
> > host is 0.0.0.0.  
> > Depending on your OS and the phase of the moon, that may be different  
> > from 127.0.0.1; try that one.
> > 
> > Andrea
