Post installation issues


#1

Hello,

I am encountering a few problems with my first installation of Chef. I have
installed Chef on a fresh install of Ubuntu 9.04, which uses universe
repositories (this is on a linode server, fyi).

After installation, I have run the following commands to get started with Chef:
aptitude update && aptitude safe-upgrade
aptitude install ubuntu-standard build-essential git-core
aptitude install ruby rubygems vim-ruby libreadline-ruby ruby1.8-dev
libopenssl-ruby1.8 rdoc ri irb wget ssl-cert vim

I have added /var/lib/gems/1.8/bin/ to my PATH.

Then I installed Chef:
gem sources -a http://gems.opscode.com && gem install ohai chef

I created ~/chef.json:
{ “chef”: { “server_fqdn”: “mylinode.server.com”}, “recipes”: “chef::server” }

And ~/solo.rb:
file_cache_path "/tmp/chef-solo"
cookbook_path “/tmp/chef-solo/cookbooks”

After that, I ran this as root:
chef-solo -c ~/solo.rb -j ~/chef.json -r
http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz

The installation went smoothly. The only things was that couchdb hanged after
starting. (See
https://cloud-support.engineyard.com/discussions/problems/284-deploy-hangs-on-running-custom-recipes-if-they-exist)
But, running “/etc/init.d/couchdb restart” in another terminal fixed that
issue, and Chef-server installation continued.

After installing Chef-server, I edited /etc/chef/server.rb to update
authorized_openid_providers and authorized_openid_identifiers. Then restarted
apache.

At that point, I can reach https://mylinode.server.com, I can log in using
openid, but when I am redirected back from my openid provider, I get a server
500 error.

The logs (/var/log/chef/server.log) contain this:
~ Started request handling: Thu Aug 06 11:47:37 +0000 2009
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/nodes”}
~ 404 “Object Not Found” - (Net::HTTPServerException)
/usr/lib/ruby/1.8/net/http.rb:2097:in error!' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:232:inrun_request’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:85:in get_rest' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/couchdb.rb:124:inlist’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/node.rb:351:in list' /var/lib/gems/1.8/gems/chef-server-slice-0.7.4/app/controllers/nodes.rb:31:inindex’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/abstract_controller.rb:315:in
send' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/abstract_controller.rb:315:in_call_action’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/abstract_controller.rb:289:in
_dispatch' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/merb_controller.rb:252:in_dispatch’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/dispatcher.rb:100:insynchronize’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/dispatcher.rb:74:inhandle’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/dispatcher.rb:36:in
handle' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/rack/application.rb:17:incall’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/request_handler.rb:91:in
process_request' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_request_handler.rb:206:inmain_loop’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/application_spawner.rb:118:in
run' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/application_spawner.rb:69:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/utils.rb:182:in
safe_fork' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/application_spawner.rb:62:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/application_spawner.rb:45:in
spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:158:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:286:in
handle_spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:insend
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in
main_loop' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:195:instart_synchronously’
/var/lib/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:61
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/nodes”}
~

Did I miss something during the installation process? Any hint is welcome.
Thank you very much in advance.

Adrien.


#2

Is mylinode.server.com the correct FQDN?

I tried to trick chef into using /etc/hosts but it failed spectacularly


$ echo “kpfmAdpoofdufevq/dp/vl” | perl -pe ‘s/(.)/chr(ord($1)-1)/ge’


#3

Hiya,

On 6/08/2009, at 11:52 PM, adrien@gn2.fr wrote:

Hello,

I am encountering a few problems with my first installation of Chef.
I have
installed Chef on a fresh install of Ubuntu 9.04, which uses universe
repositories (this is on a linode server, fyi).
[snip]

The logs (/var/log/chef/server.log) contain this:
~ Started request handling: Thu Aug 06 11:47:37 +0000 2009
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/nodes”}
~ 404 “Object Not Found” - (Net::HTTPServerException)
/usr/lib/ruby/1.8/net/http.rb:2097:in error!' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:232:inrun_request’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:85:in get_rest' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/couchdb.rb:124:inlist’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/node.rb:351:in list' /var/lib/gems/1.8/gems/chef-server-slice-0.7.4/app/controllers/ nodes.rb:31:inindex’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:315:in
send' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ abstract_controller.rb:315:in_call_action’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:289:in
_dispatch' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ merb_controller.rb:252:in_dispatch’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:100:insynchronize’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:74:inhandle’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:36:in
handle' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/rack/ application.rb:17:incall’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
request_handler.rb:91:in
process_request' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_request_handler.rb:206:inmain_loop’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:118:in
run' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:69:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
utils.rb:182:in
safe_fork' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:62:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:45:in
spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ spawn_manager.rb:158:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
spawn_manager.rb:286:in
handle_spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:351:insend
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
abstract_server.rb:351:in
main_loop' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:195:instart_synchronously’
/var/lib/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:61
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/nodes”}
~

That’s a 404, and a normal part of the node registration process -
would you be able to show the correct 500 error? Also please crank up
the debug logging (-l debug / log_level :debug)

Did I miss something during the installation process? Any hint is
welcome.
Thank you very much in advance.

Adrien.


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


#4

Thank you for your answer.

I believe the FQDN is set properly, as “hostname -f” returns the same
hostname specified in my Chef configuration.

On 6 Aug 2009, at 13:01, Joel Merrick wrote:

Is mylinode.server.com the correct FQDN?

I tried to trick chef into using /etc/hosts but it failed
spectacularly


$ echo “kpfmAdpoofdufevq/dp/vl” | perl -pe ‘s/(.)/chr(ord($1)-1)/ge’


#5

Hello,

I have only pasted the 404 error, because there is not 500 error in
the log. Setting log_level to :debug in /etc/chef/server.rb does not
seem to produce more verbose logs. Should set that somewhere else? (I
have rebooted the whole server to make sure everything was restarted).
I am sorry not to be familiar with chef-server internal…

However, I have noticed this in the logs, when the chef-server starts:
~ Failed loading ChefServerSlice (Connection refused - Connection
refused connecting to stomp queue at localhost:61613, giving up)
~ Parent pid: 18068
~ Compiling routes…
~ Could not find resource model Node
~ Could not find resource model Role
~ Could not find resource model Search
~ Could not find resource model Cookbook
~ Could not find resource model Registration
~ Could not find resource model Registration
~ Could not find resource model Registration
~ Activating slice ‘ChefServerSlice’ …

Cheers,

Adrien

On 6 Aug 2009, at 13:20, Arjuna Christensen wrote:

Hiya,

On 6/08/2009, at 11:52 PM, adrien@gn2.fr wrote:

Hello,

I am encountering a few problems with my first installation of
Chef. I have
installed Chef on a fresh install of Ubuntu 9.04, which uses universe
repositories (this is on a linode server, fyi).
[snip]

The logs (/var/log/chef/server.log) contain this:
~ Started request handling: Thu Aug 06 11:47:37 +0000 2009
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/
nodes”}
~ 404 “Object Not Found” - (Net::HTTPServerException)
/usr/lib/ruby/1.8/net/http.rb:2097:in error!' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:232:inrun_request’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:85:in get_rest' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/couchdb.rb:124:inlist’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/node.rb:351:in list' /var/lib/gems/1.8/gems/chef-server-slice-0.7.4/app/controllers/ nodes.rb:31:inindex’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:315:in
send' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ abstract_controller.rb:315:in_call_action’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:289:in
_dispatch' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ merb_controller.rb:252:in_dispatch’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:100:insynchronize’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:74:inhandle’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:36:in
handle' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/rack/ application.rb:17:incall’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
request_handler.rb:91:in
process_request' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_request_handler.rb:206:inmain_loop’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:118:in
run' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:69:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
utils.rb:182:in
safe_fork' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:62:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:45:in
spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ spawn_manager.rb:158:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
spawn_manager.rb:286:in
handle_spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:351:insend
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
abstract_server.rb:351:in
main_loop' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:195:instart_synchronously’
/var/lib/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:61
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/
nodes”}
~

That’s a 404, and a normal part of the node registration process -
would you be able to show the correct 500 error? Also please crank
up the debug logging (-l debug / log_level :debug)

Did I miss something during the installation process? Any hint is
welcome.
Thank you very much in advance.

Adrien.


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


#6

On 7/08/2009, at 1:01 AM, Adrien wrote:

Hello,

I have only pasted the 404 error, because there is not 500 error in
the log. Setting log_level to :debug in /etc/chef/server.rb does not
seem to produce more verbose logs. Should set that somewhere else?
(I have rebooted the whole server to make sure everything was
restarted). I am sorry not to be familiar with chef-server internal…

However, I have noticed this in the logs, when the chef-server starts:
~ Failed loading ChefServerSlice (Connection refused - Connection
refused connecting to stomp queue at localhost:61613, giving up)

This error is indicating that your stompserver queue is down, you’ll
need to make sure it is running (as well as the chef-indexer) before
running the server.

~ Parent pid: 18068
~ Compiling routes…
~ Could not find resource model Node
~ Could not find resource model Role
~ Could not find resource model Search
~ Could not find resource model Cookbook
~ Could not find resource model Registration
~ Could not find resource model Registration
~ Could not find resource model Registration
~ Activating slice ‘ChefServerSlice’ …

Cheers,

Adrien

On 6 Aug 2009, at 13:20, Arjuna Christensen wrote:

Hiya,

On 6/08/2009, at 11:52 PM, adrien@gn2.fr wrote:

Hello,

I am encountering a few problems with my first installation of
Chef. I have
installed Chef on a fresh install of Ubuntu 9.04, which uses
universe
repositories (this is on a linode server, fyi).
[snip]

The logs (/var/log/chef/server.log) contain this:
~ Started request handling: Thu Aug 06 11:47:37 +0000 2009
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/
nodes”}
~ 404 “Object Not Found” - (Net::HTTPServerException)
/usr/lib/ruby/1.8/net/http.rb:2097:in error!' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:232:inrun_request’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:85:in get_rest' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/couchdb.rb:124:inlist’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/node.rb:351:in list' /var/lib/gems/1.8/gems/chef-server-slice-0.7.4/app/controllers/ nodes.rb:31:inindex’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:315:in
send' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ abstract_controller.rb:315:in_call_action’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:289:in
_dispatch' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ merb_controller.rb:252:in_dispatch’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:100:insynchronize’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:74:inhandle’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:36:in
handle' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/rack/ application.rb:17:incall’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
request_handler.rb:91:in
process_request' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_request_handler.rb:206:inmain_loop’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:118:in
run' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:69:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
utils.rb:182:in
safe_fork' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:62:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:45:in
spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ spawn_manager.rb:158:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
spawn_manager.rb:286:in
handle_spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:351:insend
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
abstract_server.rb:351:in
main_loop' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:195:instart_synchronously’
/var/lib/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:61
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/
nodes”}
~

That’s a 404, and a normal part of the node registration process -
would you be able to show the correct 500 error? Also please crank
up the debug logging (-l debug / log_level :debug)

Did I miss something during the installation process? Any hint is
welcome.
Thank you very much in advance.

Adrien.


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


#7

Thanks for pointing that out.

It seems that I have a problem with runit not being able to start
services properly.

ps aux | grep runsv

root 11683 0.0 0.0 120 28 ? Ss 12:44 0:00
runsvdir -P /etc/service log: …
root 12132 0.0 0.0 108 32 ? Ss 12:45 0:00 runsv
stompserver
root 15118 0.0 0.0 108 32 ? Ss 12:46 0:00 runsv
chef-client
root 15489 0.0 0.0 108 32 ? Ss 12:47 0:00 runsv
chef-indexer

sv restart stompserver

timeout: down: stompserver: 0s, normally up, want up

When I start stompserver and chef-indexer manually, chef-server works
fine.

On 6 Aug 2009, at 14:23, Arjuna Christensen wrote:

On 7/08/2009, at 1:01 AM, Adrien wrote:

Hello,

I have only pasted the 404 error, because there is not 500 error in
the log. Setting log_level to :debug in /etc/chef/server.rb does
not seem to produce more verbose logs. Should set that somewhere
else? (I have rebooted the whole server to make sure everything was
restarted). I am sorry not to be familiar with chef-server
internal…

However, I have noticed this in the logs, when the chef-server
starts:
~ Failed loading ChefServerSlice (Connection refused - Connection
refused connecting to stomp queue at localhost:61613, giving up)

This error is indicating that your stompserver queue is down, you’ll
need to make sure it is running (as well as the chef-indexer) before
running the server.

~ Parent pid: 18068
~ Compiling routes…
~ Could not find resource model Node
~ Could not find resource model Role
~ Could not find resource model Search
~ Could not find resource model Cookbook
~ Could not find resource model Registration
~ Could not find resource model Registration
~ Could not find resource model Registration
~ Activating slice ‘ChefServerSlice’ …

Cheers,

Adrien

On 6 Aug 2009, at 13:20, Arjuna Christensen wrote:

Hiya,

On 6/08/2009, at 11:52 PM, adrien@gn2.fr wrote:

Hello,

I am encountering a few problems with my first installation of
Chef. I have
installed Chef on a fresh install of Ubuntu 9.04, which uses
universe
repositories (this is on a linode server, fyi).
[snip]

The logs (/var/log/chef/server.log) contain this:
~ Started request handling: Thu Aug 06 11:47:37 +0000 2009
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/
nodes”}
~ 404 “Object Not Found” - (Net::HTTPServerException)
/usr/lib/ruby/1.8/net/http.rb:2097:in error!' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:232:inrun_request’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:85:in get_rest' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/couchdb.rb:124:inlist’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/node.rb:351:in list' /var/lib/gems/1.8/gems/chef-server-slice-0.7.4/app/controllers/ nodes.rb:31:inindex’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:315:in
send' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ abstract_controller.rb:315:in_call_action’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:289:in
_dispatch' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ merb_controller.rb:252:in_dispatch’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:100:insynchronize’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:74:inhandle’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:36:in
handle' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/rack/ application.rb:17:incall’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
request_handler.rb:91:in
process_request' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_request_handler.rb:206:inmain_loop’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:118:in
run' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:69:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
utils.rb:182:in
safe_fork' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:62:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:45:in
spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ spawn_manager.rb:158:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
spawn_manager.rb:286:in
handle_spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:351:insend
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
abstract_server.rb:351:in
main_loop' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:195:instart_synchronously’
/var/lib/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:
61
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/
nodes”}
~

That’s a 404, and a normal part of the node registration process -
would you be able to show the correct 500 error? Also please crank
up the debug logging (-l debug / log_level :debug)

Did I miss something during the installation process? Any hint is
welcome.
Thank you very much in advance.

Adrien.


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


#8

Ok, I have found the cause of this problem.

I installed rubygems using apt, therefore the path to gem binaries
was /var/lib/gems/1.8/bin/. Although I added this to the PATH variable
in /etc/profile, runit does not know about it (as /etc/profile is for
login shells). Thus, stompserver, chef-index, etc could not be started
by runit and Chef-server sent this error.

I have found two solutions:

  • Add something like PATH=$PATH:/var/lib/gems/1.8/bin/ in each run
    file if runit services. (/etc/sv/<service_name>/run)
  • Install rubygems from source, which by default puts binaries in /
    usr/bin

Hope it helps someone else.

Thank you Arjuna and Joel for your help,

Adrien.

On 6 Aug 2009, at 14:23, Arjuna Christensen wrote:

On 7/08/2009, at 1:01 AM, Adrien wrote:

Hello,

I have only pasted the 404 error, because there is not 500 error in
the log. Setting log_level to :debug in /etc/chef/server.rb does
not seem to produce more verbose logs. Should set that somewhere
else? (I have rebooted the whole server to make sure everything was
restarted). I am sorry not to be familiar with chef-server
internal…

However, I have noticed this in the logs, when the chef-server
starts:
~ Failed loading ChefServerSlice (Connection refused - Connection
refused connecting to stomp queue at localhost:61613, giving up)

This error is indicating that your stompserver queue is down, you’ll
need to make sure it is running (as well as the chef-indexer) before
running the server.

~ Parent pid: 18068
~ Compiling routes…
~ Could not find resource model Node
~ Could not find resource model Role
~ Could not find resource model Search
~ Could not find resource model Cookbook
~ Could not find resource model Registration
~ Could not find resource model Registration
~ Could not find resource model Registration
~ Activating slice ‘ChefServerSlice’ …

Cheers,

Adrien

On 6 Aug 2009, at 13:20, Arjuna Christensen wrote:

Hiya,

On 6/08/2009, at 11:52 PM, adrien@gn2.fr wrote:

Hello,

I am encountering a few problems with my first installation of
Chef. I have
installed Chef on a fresh install of Ubuntu 9.04, which uses
universe
repositories (this is on a linode server, fyi).
[snip]

The logs (/var/log/chef/server.log) contain this:
~ Started request handling: Thu Aug 06 11:47:37 +0000 2009
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/
nodes”}
~ 404 “Object Not Found” - (Net::HTTPServerException)
/usr/lib/ruby/1.8/net/http.rb:2097:in error!' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:232:inrun_request’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/rest.rb:85:in get_rest' /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/couchdb.rb:124:inlist’
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/node.rb:351:in list' /var/lib/gems/1.8/gems/chef-server-slice-0.7.4/app/controllers/ nodes.rb:31:inindex’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:315:in
send' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ abstract_controller.rb:315:in_call_action’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/
abstract_controller.rb:289:in
_dispatch' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/controller/ merb_controller.rb:252:in_dispatch’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:100:insynchronize’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:100:in
dispatch_action' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/ dispatcher.rb:74:inhandle’
/var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/dispatch/
dispatcher.rb:36:in
handle' /var/lib/gems/1.8/gems/merb-core-1.0.12/lib/merb-core/rack/ application.rb:17:incall’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
request_handler.rb:91:in
process_request' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_request_handler.rb:206:inmain_loop’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:118:in
run' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:69:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
utils.rb:182:in
safe_fork' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/ application_spawner.rb:62:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/rack/
application_spawner.rb:45:in
spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ spawn_manager.rb:158:inspawn_application’
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
spawn_manager.rb:286:in
handle_spawn_application' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:351:insend
/var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/
abstract_server.rb:351:in
main_loop' /var/lib/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/ abstract_server.rb:195:instart_synchronously’
/var/lib/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:
61
~ Params: {“action”=>“index”, “controller”=>“chef_server_slice/
nodes”}
~

That’s a 404, and a normal part of the node registration process -
would you be able to show the correct 500 error? Also please crank
up the debug logging (-l debug / log_level :debug)

Did I miss something during the installation process? Any hint is
welcome.
Thank you very much in advance.

Adrien.


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


#9

On Thu, Aug 6, 2009 at 4:53 PM, Adrienadrien@gn2.fr wrote:

  • Install rubygems from source, which by default puts binaries in /usr/bin

100% - I’d stick well clear of using dpkg gems. They range from broken
to erm, broken. :slight_smile:

Joel


$ echo “kpfmAdpoofdufevq/dp/vl” | perl -pe ‘s/(.)/chr(ord($1)-1)/ge’


#10

On Thu, Aug 6, 2009 at 8:53 AM, Adrienadrien@gn2.fr wrote:

Ok, I have found the cause of this problem.
I installed rubygems using apt, therefore the path to gem binaries
I have found two solutions:

  • Add something like PATH=$PATH:/var/lib/gems/1.8/bin/ in each run file if
    runit services. (/etc/sv/<service_name>/run)
  • Install rubygems from source, which by default puts binaries in /usr/bin
    Hope it helps someone else.
    Thank you Arjuna and Joel for your help,
    Adrien.

Due to the tireless work of Joshua Timberman, AJ, Bryan McLellan and
Thom May, we should have a repository with proper debian packages for
Chef soon, which will make this much easier. :slight_smile:

Yay!

Adam


Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E: adam@opscode.com


#11

Hi,

On 6 Aug 2009, at 20:16, Adam Jacob wrote:

Due to the tireless work of Joshua Timberman, AJ, Bryan McLellan and
Thom May, we should have a repository with proper debian packages for
Chef soon, which will make this much easier. :slight_smile:

That’s awesome. :slight_smile: I don’t suppose this will include a "proper"
Debian package of Ruby Enterprise Edition for, say, Ubuntu 9.04? I’m
currently trying to coerce some local Debian developers into doing one
for me, but I don’t want to duplicate effort. :slight_smile:

(When I say “proper”, I mean one that completely “Provides” and
"Replaces" the stock Ruby so it coexists with the rest of the Debian
system, and provides a /etc/alternatives mechanism for choosing which
Ruby to use. Not sticking it in /opt/local.)

G


#12

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 7, 2009, at 2:59 AM, Graeme Mathieson wrote:

That’s awesome. :slight_smile: I don’t suppose this will include a "proper"
Debian package of Ruby Enterprise Edition for, say, Ubuntu 9.04? I’m
currently trying to coerce some local Debian developers into doing
one for me, but I don’t want to duplicate effort. :slight_smile:

No, we’re not attempting to package REE for Debian, just Chef and
Chef’s requirements. The best source of information on that would be
the debian-ruby mailing list and #debian-ruby IRC channel (on
irc.oftc.net).


Opscode, Inc
Joshua Timberman, Senior Solutions Engineer
C: 720.878.4322 E: joshua@opscode.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkp8cQMACgkQO97WSdVpzT3JfACfQSBhA/OVU8D1k0h+OKuOCTLt
BDgAnjimvvqjeAL6dD5GTGU3el1JOzfk
=LuEd
-----END PGP SIGNATURE-----


#13

On Fri, Aug 7, 2009 at 11:22 AM, Joshua Timbermanjoshua@opscode.com wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 7, 2009, at 2:59 AM, Graeme Mathieson wrote:

That’s awesome. :slight_smile: I don’t suppose this will include a “proper” Debian
package of Ruby Enterprise Edition for, say, Ubuntu 9.04? I’m currently
trying to coerce some local Debian developers into doing one for me, but I
don’t want to duplicate effort. :slight_smile:

No, we’re not attempting to package REE for Debian, just Chef and Chef’s
requirements. The best source of information on that would be the
debian-ruby mailing list and #debian-ruby IRC channel (on irc.oftc.net).

It would be awesome if all the chef requirements could be packaged up
in the chef package (maybe call it chef-deps). Not sure how much
extra work that would be though.


Joe Van Dyk
http://fixieconsulting.com


#14

What deps? The gem dependencies? Those have all been individually
packaged as debian packages so that other packages may use them as
well. Installing the chef package will install the dependencies as
debs instead of gems.

On 8/7/09, Joe Van Dyk joe@fixieconsulting.com wrote:

On Fri, Aug 7, 2009 at 11:22 AM, Joshua Timbermanjoshua@opscode.com wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 7, 2009, at 2:59 AM, Graeme Mathieson wrote:

That’s awesome. :slight_smile: I don’t suppose this will include a “proper” Debian
package of Ruby Enterprise Edition for, say, Ubuntu 9.04? I’m currently
trying to coerce some local Debian developers into doing one for me, but
I
don’t want to duplicate effort. :slight_smile:

No, we’re not attempting to package REE for Debian, just Chef and Chef’s
requirements. The best source of information on that would be the
debian-ruby mailing list and #debian-ruby IRC channel (on irc.oftc.net).

It would be awesome if all the chef requirements could be packaged up
in the chef package (maybe call it chef-deps). Not sure how much
extra work that would be though.


Joe Van Dyk
http://fixieconsulting.com


Sent from my mobile device


#15

ruby, couchdb, ohai, json, etc.

Joe

On Fri, Aug 7, 2009 at 12:54 PM, Bryan McLellanbtm@loftninjas.org wrote:

What deps? The gem dependencies? Those have all been individually
packaged as debian packages so that other packages may use them as
well. Installing the chef package will install the dependencies as
debs instead of gems.

On 8/7/09, Joe Van Dyk joe@fixieconsulting.com wrote:

On Fri, Aug 7, 2009 at 11:22 AM, Joshua Timbermanjoshua@opscode.com wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 7, 2009, at 2:59 AM, Graeme Mathieson wrote:

That’s awesome. :slight_smile: I don’t suppose this will include a “proper” Debian
package of Ruby Enterprise Edition for, say, Ubuntu 9.04? I’m currently
trying to coerce some local Debian developers into doing one for me, but
I
don’t want to duplicate effort. :slight_smile:

No, we’re not attempting to package REE for Debian, just Chef and Chef’s
requirements. The best source of information on that would be the
debian-ruby mailing list and #debian-ruby IRC channel (on irc.oftc.net).

It would be awesome if all the chef requirements could be packaged up
in the chef package (maybe call it chef-deps). Not sure how much
extra work that would be though.


Joe Van Dyk
http://fixieconsulting.com


Sent from my mobile device


Joe Van Dyk
http://fixieconsulting.com


#16

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

We’re tracking all the Debian and Ubuntu packaging efforts in CHEF-63:

https://tickets.opscode.com/browse/CHEF-63

In the Chef packages, we require ruby1.8 as changes for 1.9 aren’t
quite in yet. CouchDB has packages in Debian 5 and Ubuntu 8.10+. Ohai
is packaged by Bryan and is currently version 0.3.0, with 0.3.2 on
deck. JSON is packaged by Debian as libjson-ruby. See the ticket for
progress details on other requirements of Chef and Chef Server.

On Aug 7, 2009, at 2:11 PM, Joe Van Dyk wrote:

ruby, couchdb, ohai, json, etc.

Joe

On Fri, Aug 7, 2009 at 12:54 PM, Bryan McLellanbtm@loftninjas.org
wrote:

What deps? The gem dependencies? Those have all been individually
packaged as debian packages so that other packages may use them as
well. Installing the chef package will install the dependencies as
debs instead of gems.

On 8/7/09, Joe Van Dyk joe@fixieconsulting.com wrote:

On Fri, Aug 7, 2009 at 11:22 AM, Joshua
Timbermanjoshua@opscode.com wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 7, 2009, at 2:59 AM, Graeme Mathieson wrote:

That’s awesome. :slight_smile: I don’t suppose this will include a "proper"
Debian
package of Ruby Enterprise Edition for, say, Ubuntu 9.04? I’m
currently
trying to coerce some local Debian developers into doing one for
me, but
I
don’t want to duplicate effort. :slight_smile:

No, we’re not attempting to package REE for Debian, just Chef and
Chef’s
requirements. The best source of information on that would be the
debian-ruby mailing list and #debian-ruby IRC channel (on
irc.oftc.net).

It would be awesome if all the chef requirements could be packaged
up
in the chef package (maybe call it chef-deps). Not sure how much
extra work that would be though.


Joe Van Dyk
http://fixieconsulting.com


Sent from my mobile device


Joe Van Dyk
http://fixieconsulting.com


Opscode, Inc
Joshua Timberman, Senior Solutions Engineer
C: 720.878.4322 E: joshua@opscode.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkp8jsUACgkQO97WSdVpzT2ocgCeOC144eNemQDGJq3nJUaO4qAu
bPwAn3IAzhWC2c2fs+ygARnDZKD3R3K5
=ZPKx
-----END PGP SIGNATURE-----


#17

‘apt-get install chef’ will install all the magic. native packaging 4TW! :smiley:

On 8/7/09, Joe Van Dyk joe@fixieconsulting.com wrote:

ruby, couchdb, ohai, json, etc.

Joe

On Fri, Aug 7, 2009 at 12:54 PM, Bryan McLellanbtm@loftninjas.org wrote:

What deps? The gem dependencies? Those have all been individually
packaged as debian packages so that other packages may use them as
well. Installing the chef package will install the dependencies as
debs instead of gems.

On 8/7/09, Joe Van Dyk joe@fixieconsulting.com wrote:

On Fri, Aug 7, 2009 at 11:22 AM, Joshua Timbermanjoshua@opscode.com
wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Aug 7, 2009, at 2:59 AM, Graeme Mathieson wrote:

That’s awesome. :slight_smile: I don’t suppose this will include a “proper” Debian
package of Ruby Enterprise Edition for, say, Ubuntu 9.04? I’m currently
trying to coerce some local Debian developers into doing one for me,
but
I
don’t want to duplicate effort. :slight_smile:

No, we’re not attempting to package REE for Debian, just Chef and Chef’s
requirements. The best source of information on that would be the
debian-ruby mailing list and #debian-ruby IRC channel (on irc.oftc.net).

It would be awesome if all the chef requirements could be packaged up
in the chef package (maybe call it chef-deps). Not sure how much
extra work that would be though.


Joe Van Dyk
http://fixieconsulting.com


Sent from my mobile device


Joe Van Dyk
http://fixieconsulting.com


Sent from my mobile device


#18

On 7 Aug 2009, at 20:22, Joshua Timberman wrote:

No, we’re not attempting to package REE for Debian, just Chef and
Chef’s requirements.

Cool, I shall continue to coerce Mark then. :slight_smile:

G