Raise priority of the issue with broken debian package for chef-server


#1

Hi,

Is it possible to raise the issue priority somehow?
Debian packages for Chef Server are broken - they don’t setup rabbitmq
correctly.
http://tickets.opscode.com/browse/CHEF-3170

anatoly t.


#2

]] anatoly techtonik

Is it possible to raise the issue priority somehow?
Debian packages for Chef Server are broken - they don’t setup rabbitmq
correctly.
http://tickets.opscode.com/browse/CHEF-3170

I suspect the issue here might be that you have a user in rabbit that’s
gotten out of sync with the information in chef’s config. Can you try
removing the chef user from rabbit and seeing if that fixes it for you?


Tollef Fog Heen
UNIX is user friendly, it’s just picky about who its friends are


#3

On Fri, Jun 29, 2012 at 11:53 PM, Tollef Fog Heen tfheen@err.no wrote:

]] anatoly techtonik

Is it possible to raise the issue priority somehow?
Debian packages for Chef Server are broken - they don’t setup rabbitmq
correctly.
http://tickets.opscode.com/browse/CHEF-3170

I suspect the issue here might be that you have a user in rabbit that’s
gotten out of sync with the information in chef’s config. Can you try
removing the chef user from rabbit and seeing if that fixes it for you?

I don’t remember adding user right now. But I had to execute:

rabbitmqctl add_vhost /chef
rabbitmqctl set_permissions -p /chef chef “." ".” “.*”

I can redo the server installation from scratch to see if this is
repeatable in a few hours.


#4

]] anatoly techtonik

I don’t remember adding user right now. But I had to execute:

rabbitmqctl add_vhost /chef
rabbitmqctl set_permissions -p /chef chef “." ".” “.*”

This should be done by chef-solr’s postinst.

I can redo the server installation from scratch to see if this is
repeatable in a few hours.

That would be useful, from pure inspection it looks like the postinst of
chef-solr should set everything up just fine.


Tollef Fog Heen
UNIX is user friendly, it’s just picky about who its friends are


#5

Reinstall from scratch went fine, except for two failure messages when
setting jetty and solr. See below. They are shown in red on every boot.
Is that ok?


Setting up chef (0.9.18+dfsg-1) …

Creating config file /etc/chef/client.rb with new version
Starting chef-client : chef-client.

Setting up rabbitmq-server (1.8.1-1opscode1) …
Adding group rabbitmq' (GID 108) ... Done. Adding system userrabbitmq’ (UID 106) …
Adding new user rabbitmq' (UID 106) with grouprabbitmq’ …
Not creating home directory /var/lib/rabbitmq'. Starting rabbitmq-server: SUCCESS rabbitmq-server. ... Setting up jetty (6.1.24-6) ... Adding system userjetty’ (UID 107) …
Adding new group jetty' (GID 109) ... Adding new userjetty’ (UID 107) with group jetty' ... Not creating home directory/usr/share/jetty’.
Not starting jetty - edit /etc/default/jetty and change NO_START to be
0 (or comment it out). … failed!

Setting up solr-common (1.4.1+dfsg1-2opscode1) …
Setting up solr-jetty (1.4.1+dfsg1-2opscode1) …
Not starting jetty - edit /etc/default/jetty and change NO_START to be
0 (or comment it out). … failed!
Setting up chef-solr (0.9.18+dfsg-1) …
Creating vhost “/chef” …
…done.
Creating user “chef” …
…done.
Setting permissions for user “chef” in vhost “/chef” …
…done.

Creating config file /etc/chef/solr.rb with new version
Starting chef-solr : chef-solr.
Starting chef-solr-indexer : chef-solr-indexer.
Setting up chef-server-api (0.9.18+dfsg-1) …

Creating config file /etc/chef/server.rb with new version
Starting chef-server : ~ In 9801
.
Setting up chef-server (0.9.18+dfsg-1) …
Setting up chef-server-webui (0.9.18+dfsg-1) …

Creating config file /etc/chef/webui.rb with new version
Starting chef-server-webui : ~ In 9962
.
Setting up default-jre-headless (1:1.6-40) …
Setting up ca-certificates-java (20100412) …
creating /etc/ssl/certs/java/cacerts…
done.

anatoly t.

On Sat, Jun 30, 2012 at 12:15 AM, Tollef Fog Heen tfheen@err.no wrote:

]] anatoly techtonik

I don’t remember adding user right now. But I had to execute:

rabbitmqctl add_vhost /chef
rabbitmqctl set_permissions -p /chef chef “." ".” “.*”

This should be done by chef-solr’s postinst.

I can redo the server installation from scratch to see if this is
repeatable in a few hours.

That would be useful, from pure inspection it looks like the postinst of
chef-solr should set everything up just fine.


Tollef Fog Heen
UNIX is user friendly, it’s just picky about who its friends are


#6

]] anatoly techtonik

Hiya,

Reinstall from scratch went fine, except for two failure messages when
setting jetty and solr. See below. They are shown in red on every boot.
Is that ok?

No need to worry about those as long as chef-solr itself is actually
running and working. Can you please verify that and report back?

Thanks,

Tollef Fog Heen
UNIX is user friendly, it’s just picky about who its friends are


#7

On Sat, Jun 30, 2012 at 11:26 PM, Tollef Fog Heen tfheen@err.no wrote:

]] anatoly techtonik

Hiya,

Reinstall from scratch went fine, except for two failure messages when
setting jetty and solr. See below. They are shown in red on every boot.
Is that ok?

No need to worry about those as long as chef-solr itself is actually
running and working. Can you please verify that and report back?

It appears that I’ve copy/pasted wrong apt repository location (it was
Chef 0.9.x). While new installation seem ok, and new node is
registered, everything just doesn’t seem right with Chef Server
10.12.0-1 Starting with error messages during system load, then trying
to edit default environment by clicking
http://server:4040/environments/_default/edit - it fails silently with
server just closing connections without any trace in logs or status
code. There are also errors in client.log on server machine. See
below:

Excerpts from the new install log. jetty and solr-jetty failed too:
-------------[install]------------------------------------------------------

Setting up chef (10.12.0-1) …

Creating config file /etc/chef/client.rb with new version
Starting chef-client : chef-client.

Setting up rabbitmq-server (1.8.1-1opscode1) …
Adding group rabbitmq' (GID 106) ... Done. Adding system userrabbitmq’ (UID 104) …
Adding new user rabbitmq' (UID 104) with grouprabbitmq’ …
Not creating home directory /var/lib/rabbitmq'. Starting rabbitmq-server: SUCCESS rabbitmq-server. ... Setting up jetty (6.1.24-6) ... Adding system userjetty’ (UID 107) …
Adding new group jetty' (GID 109) ... Adding new userjetty’ (UID 107) with group jetty' ... Not creating home directory/usr/share/jetty’.
Not starting jetty - edit /etc/default/jetty and change NO_START to be
0 (or comment it out). … failed!

Setting up solr-jetty (1.4.1+dfsg1-2opscode1) …
Not starting jetty - edit /etc/default/jetty and change NO_START to be
0 (or comment it out). … failed!
Setting up chef-solr (10.12.0-1) …
Creating vhost “/chef” …
…done.
Creating user “chef” …
…done.
Setting permissions for user “chef” in vhost “/chef” …
…done.

Creating config file /etc/chef/solr.rb with new version
Starting chef-solr : chef-solr.
Setting up chef-expander (10.12.0-1) …
Starting chef-expander : chef-expander[Sat, 30 Jun 2012 12:32:23
-0400] WARN: You seem to have a legacy setting for solr_url: did you
mean http://localhost:8983/solr ?
[Sat, 30 Jun 2012 12:32:23 -0400] INFO: Chef Expander 10.12.0 starting
cluster with 1 nodes
.
Setting up chef-server-api (10.12.0-1) …

Creating config file /etc/chef/server.rb with new version
Starting chef-server : ~ In 12241
.
Setting up chef-server (10.12.0-1) …
Setting up chef-server-webui (10.12.0-1) …

Creating config file /etc/chef/webui.rb with new version
Starting chef-server-webui : ~ In 12394
.
---------------[/install]-------------------------------

boot log shows that something is wrong, but there are not many details:
---------[/var/log/boot]---------

Sun Jul 1 11:31:33 2012: Starting database server: couchdb.
Sun Jul 1 11:31:33 2012: Not starting jetty - edit /etc/default/jetty
and change NO_START to be 0 (or comment it out). …
^[[31mfailed!^[[39;49m
Sun Jul 1 11:31:34 2012: Starting NFS common utilities: statd.
Sun Jul 1 11:31:34 2012: Starting portmap daemon…Already running…
Sun Jul 1 11:31:35 2012: Starting chef-client : chef-client.
Sun Jul 1 11:31:38 2012: Starting enhanced syslogd: rsyslogd.

Sun Jul 1 11:31:40 2012: Starting rabbitmq-server: SUCCESS
Sun Jul 1 11:31:40 2012: rabbitmq-server.

Sun Jul 1 11:31:40 2012: Starting chef-server :Starting chef-expander
: chef-expander[Sun, 01 Jul 2012 11:31:41 -0400] WARN: You seem to
have a legacy setting for solr_url: did you mean
http://localhost:8983/solr ?
Sun Jul 1 11:31:44 2012: [Sun, 01 Jul 2012 11:31:41 -0400] INFO: Chef
Expander 10.12.0 starting cluster with 1 nodes
Sun Jul 1 11:31:46 2012: .
Sun Jul 1 11:31:46 2012: ~ In 1475
Sun Jul 1 11:31:51 2012: ^[[31mfailed!^[[39;49m
Sun Jul 1 11:31:51 2012: Starting chef-server-webui : ~ In 1524
Sun Jul 1 11:32:02 2012: ^[[31mfailed!^[[39;49m
---------[/var/log/boot]---------

But logs are clear, even chef/expander.log

Chef server.log contains this:
---------------[server.log]---------------------------
merb : chef-server (api) : worker (port 4000) ~ Starting Thin at port 4000
merb : chef-server (api) : worker (port 4000) ~ Using Thin adapter on
host 0.0.0.0 and port 4000.
merb : chef-server (api) : worker (port 4000) ~ Successfully bound to port 4000
merb : chef-server (api) : worker (port 4000) ~ Changing privileges to chef:chef
merb : chef-server (api) : worker (port 4000) ~ Started request
handling: Sat Jun 30 12:32:51 -0400 2012
merb : chef-server (api) : worker (port 4000) ~ Params:
{“inflated_object”=>#<Chef::WebUIUser:0xb5873448 @couchdb_id=nil,
@password=“9f00c34fa4d18e8bca9ff7a6e3fa1280eff98aea”, @salt=“Sat Jun
30 12:32:51 -0400 2012WTOcWI1tJN5evt4qVUjYyQ5jjNkvyQ”,
@couchdb_rev=nil, @admin=true, @name=“admin”,
@couchdb=#<Chef::CouchDB:0xb5873358 @db=“chef”,
@rest=#<Chef::REST:0xb5873330 @sign_on_redirect=true,
@redirect_limit=10, @redirects_followed=0,
@auth_credentials=#<Chef::REST::AuthCredentials:0xb58732e0
@key_file=nil, @client_name=nil>, @cookies={}, @sign_request=true,
@default_headers={}, @disable_gzip=false,
@url=“http://localhost:5984”>>, @openid=nil>, “format”=>nil,
“action”=>“update”, “id”=>“admin”, “controller”=>“users”}
merb : chef-server (api) : worker (port 4000) ~ Cannot load user admin

  • (Merb::ControllerExceptions::NotFound)
    /usr/share/chef-server-api/app/controllers/users.rb:48:in update' /usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:315:insend’


    merb : chef-server (api) : worker (port 4000) ~ Started request
    handling: Sun Jul 01 09:26:31 -0400 2012
    merb : chef-server (api) : worker (port 4000) ~ Params: {“name”=>“db”,
    “action”=>“create”, “admin”=>false, “controller”=>“clients”}
    merb : chef-server (api) : worker (port 4000) ~ Failed to
    authenticate. Ensure that your client key is valid. -
    (Merb::ControllerExceptions::Unauthorized)
    /usr/share/chef-server-api/app/controllers/application.rb:56:in
    authenticate_every' /usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:346:insend’


    ---------------[/server.log]---------------------------

RabbitMQ logs seem clear.
Chef Client could not register - that’s probably another bug. I’ve
filled a similar issue for Knife
https://tickets.opscode.com/browse/CHEF-3228

[Sun, 01 Jul 2012 10:57:42 -0400] INFO: *** Chef 10.12.0 ***
[Sun, 01 Jul 2012 10:57:43 -0400] INFO: Client key
/etc/chef/client.pem is not present - registering
[Sun, 01 Jul 2012 10:57:43 -0400] ERROR: URI::InvalidURIError: bad
URI(is not URI?): 192.168.56.56:4000/clients
[Sun, 01 Jul 2012 10:57:43 -0400] FATAL: Stacktrace dumped to
/var/cache/chef/chef-stacktrace.out

Generated at Sun Jul 01 10:57:43 -0400 2012
URI::InvalidURIError: bad URI(is not URI?): 192.168.56.56:4000/clients
/usr/lib/ruby/1.8/uri/common.rb:436:in split' /usr/lib/ruby/1.8/uri/common.rb:485:inparse’
/usr/lib/ruby/vendor_ruby/chef/rest.rb:162:in create_url' /usr/lib/ruby/vendor_ruby/chef/rest.rb:141:inpost_rest’
/usr/lib/ruby/vendor_ruby/chef/api_client.rb:243:in `save’


anatoly t.