Multiple Chef Servers on Different Ports


#1

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


#2

On Fri, Mar 9, 2012 at 11:58 AM, mark bradley 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

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


#3

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 :slight_smile: ).
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 :slight_smile:
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 wrote:

On Fri, Mar 9, 2012 at 11:58 AM, mark bradley 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

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


#4

On Fri, Mar 9, 2012 at 12:50 PM, mark bradley 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 :slight_smile: ).
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 :slight_smile:
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


#5

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 wrote:

On Fri, Mar 9, 2012 at 12:50 PM, mark bradley 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 :slight_smile:
).
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 :slight_smile:
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


#6

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 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 :slight_smile: ).
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 :slight_smile:
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.orgwrote:

On Fri, Mar 9, 2012 at 11:58 AM, mark bradley 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

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


#7

On Mar 9, 2012, at 8:21 PM, mark bradley 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 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 :slight_smile: ). 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 :slight_smile:
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 wrote:
On Fri, Mar 9, 2012 at 11:58 AM, mark bradley 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

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


#8

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.comwrote:

On Mar 9, 2012, at 8:21 PM, mark bradley 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.comwrote:

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 :slight_smile: ).
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 :slight_smile:
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.orgwrote:

On Fri, Mar 9, 2012 at 11:58 AM, mark bradley 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

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


#9

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 methodpayload’ 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:instart’
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:instart’
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:inqueue_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:indelete_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:incdb_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:inload’
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:inrun’
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:inbootup’
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:instart’
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.comwrote:

On Mar 9, 2012, at 8:21 PM, mark bradley 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.comwrote:

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 :slight_smile: ).
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 :slight_smile:
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.orgwrote:

On Fri, Mar 9, 2012 at 11:58 AM, mark bradley 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

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


#10

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 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 methodpayload’ 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:instart’
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:instart’
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:inqueue_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:indelete_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:incdb_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:inload’
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:inrun’
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:inbootup’
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:instart’
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

wrote:

On Mar 9, 2012, at 8:21 PM, mark bradley 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.comwrote:

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 :slight_smile: ).
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 :slight_smile:
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.orgwrote:

On Fri, Mar 9, 2012 at 11:58 AM, mark bradley 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

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


#11

On Tue, Mar 13, 2012 at 6:03 PM, mark bradley 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


#12

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.comwrote:

On Tue, Mar 13, 2012 at 6:03 PM, mark bradley 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


#13

On Tue, Mar 13, 2012 at 9:25 PM, mark bradley 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 suggests it may be an
authentication error.

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


#14

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.comwrote:

On Tue, Mar 13, 2012 at 9:25 PM, mark bradley 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 suggests it may be an
authentication error.

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


#15

On Tue, Mar 13, 2012 at 11:47 PM, mark bradley 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 :slight_smile:


#16

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.comwrote:

On Tue, Mar 13, 2012 at 11:47 PM, mark bradley 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 :slight_smile:


#17

On Wed, Mar 14, 2012 at 3:54 PM, mark bradley 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

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

Bryan


#18

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 wrote:

On Wed, Mar 14, 2012 at 3:54 PM, mark bradley 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

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

Bryan


#19

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 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> wrote:

On Tue, Mar 13, 2012 at 6:03 PM, mark bradley 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