Exceptions when installing chef server


#1

I am trying to install chef server by two ways but met different problems
respectively, please help share experience of success:

(1) Installing Chef Server on Debian or Ubuntu using Packages
Exception met:
get iniative error when execute "apt-get install chef chef-server-api ", no
chef-client gem found.

before this installing, I have installed RubyGem and workstation env
successfully.

(2) Installing Chef Server on Debian or Ubuntu using chef-solo
Finished each step shown on this page. Found no webui.pem under /etc/chef/ and
no Chef Server WebUI get up.

I did not config apache proxy for ssl, is it necessary?

Thanks.


#2

On Friday, December 16, 2011 at 5:05 PM, xinhui wrote:

I am trying to install chef server by two ways but met different problems
respectively, please help share experience of success:

(1) Installing Chef Server on Debian or Ubuntu using Packages
Exception met:
get iniative error when execute "apt-get install chef chef-server-api ", no
chef-client gem found.

Is this from apt.opscode.com?

before this installing, I have installed RubyGem and workstation env
successfully.

(2) Installing Chef Server on Debian or Ubuntu using chef-solo
Finished each step shown on this page. Found no webui.pem under /etc/chef/ and
no Chef Server WebUI get up.

Is this on the same box as before? You can end up with some partial config that’s wrong/broken.

Most likely, rabbitmq isn’t getting configured correctly. Depending on what version you’re trying to install, this can happen when your machine’s hostname doesn’t resolve correctly. Make sure your hostname and fqdn are configured.

If you can post some of chef-server’s logs, or run it in the foreground and capture the output, that would help us track down your issue.

Try setting your log level to debug and output to STDOUT in your server.rb file:

log_level :debug
log_location STDOUT

Then run chef-server and see what it says.

I did not config apache proxy for ssl, is it necessary?
It’s a good idea before you put your server in production, but not necessary.

Thanks.


Dan DeLeo


#3

On Fri, Dec 16, 2011 at 8:05 PM, xinhui lxinhui@vmware.com wrote:

I am trying to install chef server by two ways but met different problems
respectively, please help share experience of success:

(1) Installing Chef Server on Debian or Ubuntu using Packages
Exception met:
get iniative error when execute "apt-get install chef chef-server-api ", no
chef-client gem found.

Can you provide the full error message? It is hard to tell what is
happening without the context of what is happening before and after
the error.

(2) Installing Chef Server on Debian or Ubuntu using chef-solo
Finished each step shown on this page. Found no webui.pem under /etc/chef/ and
no Chef Server WebUI get up.

What does your chef.json from this installation look like? The
instructions provide two examples, one that includes the Webui and one
that does not.

http://wiki.opscode.com/display/chef/Installing+Chef+Server+using+Chef+Solo#InstallingChefServerusingChefSolo-ConfigureChefsolo

I did not config apache proxy for ssl, is it necessary?

No. The WebUI will run on port 4040 by default on its own, regardless
of a proxy pointing to it.

On Mon, Dec 19, 2011 at 1:44 AM, lxinhui@vmware.com wrote:

Message shown followed by chef-server
/usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:14: uninitialized constant Gem::UserInteraction (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:4
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:31
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef/providers.rb:59
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef.rb:25
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/sbin/chef-server:39

Is this on the system installed from apt or gem?

What version of Rubygems is installed?

Run “gem -v” and “gem list chef*” and “dpkg -l rubygems”

Bryan


#4

----- Original Message -----

From: “Bryan McLellan” btm@loftninjas.org
To: “xinhui” lxinhui@vmware.com
Cc: chef-dev@lists.opscode.com
Sent: Tuesday, December 20, 2011 8:41:50 AM
Subject: Re: [chef-dev] exceptions when installing chef server
On Fri, Dec 16, 2011 at 8:05 PM, xinhui lxinhui@vmware.com wrote:

I am trying to install chef server by two ways but met different problems
respectively, please help share experience of success:

(1) Installing Chef Server on Debian or Ubuntu using Packages
Exception met:
get iniative error when execute "apt-get install chef chef-server-api ", no
chef-client gem found.
Can you provide the full error message? It is hard to tell what ishappening without the context of what is happening before and after
the error.

I just deployed again in a new box from client solo and go t the attached error log with execution of " chef-solo -c /etc/chef/solo.rb -j ~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz "

(2) Installing Chef Server on Debian or Ubuntu using chef-solo
Finished each step shown on this page. Found no webui.pem under /etc/chef/ and
no Chef Server WebUI get up.
What does your chef.json from this installation look like? The
instructions provide two examples, one that includes the Webui and one
that does not.
http://wiki.opscode.com/display/chef/Installing+Chef+Server+using+Chef+Solo#InstallingChefServerusingChefSolo-ConfigureChefsolo

I use the second one with WebUI.

I did not config apache proxy for ssl, is it necessary?
No. The WebUI will run on port 4040 by default on its own, regardless of a proxy pointing to it.

On Mon, Dec 19, 2011 at 1:44 AM, lxinhui@vmware.com wrote: Message shown followed by chef-server
/usr/lib/ruby/1.8/rubygems/remote_fetcher.rb:14: uninitialized constant Gem::UserInteraction (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/rubygems/spec_fetcher.rb:4
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef/provider/package/rubygems.rb:31
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef/providers.rb:59
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/lib/ruby/1.8/chef.rb:25
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
from /usr/sbin/chef-server:39
Is this on the system installed from apt or gem?
From apt.

What version of Rubygems is installed?
Run “gem -v” and “gem list chef*” and “dpkg -l rubygems”

I got below output:
root@lixh:~# gem -v
1.8.10
root@lixh:~# dpkg -l rubygems
Desired=Unknown/Install/Remove/Purge/Hold
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
++±==============-==============-============================================
un rubygems (no description available)
Bryan