厨师安装错误 – 在资源上执行操作“运行”时出错

我正尝试在Ubuntu 12.04.5 64位上安装厨师(chef-server_11.0.4-1.ubuntu.12.04)。

安装后,当我运行“chef-server-ctl reconfigure”得到下面的错误。

让我知道如何安装它。

[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 

重新启动Rabbitmq服务器后更新错误

 > [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 

Ubuntu上的厨师安装有一个已知的问题。 在重新configuration期间,它尝试启动并连接到rabbitmq,但是rabbitmq服务器已经在运行,所以启动失败。

另一件可能发生的事情是你的/ etc / hosts文件中没有localhost条目。

最有可能的是已经运行的rabbitmq,在这种情况下试试这个:

 /etc/init.d/rabbitmq-server stop && chef-server-ctl reconfigure 

如果这不起作用,请检查以确保/ etc / hosts中存在以下内容:

 127.0.0.1 localhost 

nginx可能没有启动。 这些输出是什么:

chef-server-ctl status lsof -i:8000 chef-server-ctl tail

我不记得Ubuntu是否带有lsof,所以你可能需要安装apt-get install lsof -y

我为这个问题尝试了很多。 我做了很多谷歌search。 最后我得到了一个解决scheme

RabbitMQ服务在5672端口上运行。 但是这个端口被其他一些服务所使用。 所以我运行检查是使用以下命令在5672端口上运行的任何服务:

 netstat -nltp | grep 5672 

我使用以下命令杀死了具有端口5672的服务:

 sudo kill `sudo lsof -t -i:5672` 

然后我再次运行sudo chef-server-ctl reconfigure ,它按预期工作。