I am trying install chef (chef-server_11.0.4-1.ubuntu.12.04) on ubuntu 12.04.5 64 bit.
After the installation, when I run "chef-server-ctl reconfigure" getting following error.
let me know how to install it.
[2014-12-20T14:16:10+05:30] ERROR: Running exception handlers
[2014-12-20T14:16:10+05:30] ERROR: Exception handlers complete
Chef Client failed. 2 resources updated
[2014-12-20T14:16:10+05:30] FATAL: Stacktrace dumped to /opt/chef-server/embedded/cookbooks/cache/chef-stacktrace.out
[2014-12-20T14:16:10+05:30] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[/opt/chef-server/embedded/bin/chpst -u chef_server -U chef_server /opt/chef-server/embedded/bin/rabbitmqctl wait /var/opt/chef-server/rabbitmq/db/[email protected]] (chef-server::rabbitmq line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of /opt/chef-server/embedded/bin/chpst -u chef_server -U chef_server /opt/chef-server/embedded/bin/rabbitmqctl wait /var/opt/chef-server/rabbitmq/db/[email protected] ----
STDOUT: Waiting for rabbit@localhost ...
pid is 6031 ...
STDERR: Error: process_not_running
---- End output of /opt/chef-server/embedded/bin/chpst -u chef_server -U chef_server /opt/chef-server/embedded/bin/rabbitmqctl wait /var/opt/chef-server/rabbitmq/db/[email protected] ----
Ran /opt/chef-server/embedded/bin/chpst -u chef_server -U chef_server /opt/chef-server/embedded/bin/rabbitmqctl wait /var/opt/chef-server/rabbitmq/db/[email protected] returned 2
Updated error after restarting Rabbitmq Server
> [2014-12-23T09:55:15+05:30] ERROR: Running exception handlers
> [2014-12-23T09:55:15+05:30] ERROR: Exception handlers complete Chef
> Client failed. 8 resources updated [2014-12-23T09:55:15+05:30] FATAL:
> Stacktrace dumped to
> /opt/chef-server/embedded/cookbooks/cache/chef-stacktrace.out
> [2014-12-23T09:55:15+05:30] FATAL:
> Mixlib::ShellOut::ShellCommandFailed: execute[verify-system-status]
> (chef-server::bootstrap line 21) had an error:
> Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with
> [0], but received '7'
> ---- Begin output of curl -sf http://localhost:8000/_status ---- STDOUT: STDERR:
> ---- End output of curl -sf http://localhost:8000/_status ---- Ran curl -sf http://localhost:8000/_status returned 7
There's a known issue with the chef installation on Ubuntu. During the reconfigure it attempts to launch and connect to rabbitmq however the rabbitmq server is already running so the start fails.
The other thing that can potentially happen is not having a localhost entry in your /etc/hosts file.
The most likely thing is the already running rabbitmq, in which case give this a try:
If that doesn't work check to make sure the following exists in /etc/hosts:
nginx is probably not started. What's the output of these:
chef-server-ctl status lsof -i:8000 chef-server-ctl tail
I can't remember if Ubuntu comes with lsof or not, so you may need to install it with
apt-get install lsof -y
I tried a lot for this issue. I did lot of google search. Finally I got 1 solution.
RabbitMQ service runs on
5672
port. But this port is used by some other service. So I run to check is any services running on5672
port using following command:I killed service having port 5672 using following command :
Then I run the
sudo chef-server-ctl reconfigure
again and it worked as expected.