Chef infra Chef服务器安装问题

Chef infra Chef服务器安装问题,chef-infra,Chef Infra,我一直在尝试使用以下指南在CentOS 6.5机器上安装chef server(chef-server-core-12.1.0-1.el6.x86_64.rpm): 这是一个测试环境,因此我没有FQDN,但IP地址是可解析的。运行chef server ctl reconfigure后,我尝试使用以下命令创建用户: [root@xxx-xxx-xxx-xxx ~]# chef-server-ctl user-create myusername myfirstname mylastname mye

我一直在尝试使用以下指南在CentOS 6.5机器上安装chef server(chef-server-core-12.1.0-1.el6.x86_64.rpm): 这是一个测试环境,因此我没有FQDN,但IP地址是可解析的。运行chef server ctl reconfigure后,我尝试使用以下命令创建用户:

[root@xxx-xxx-xxx-xxx ~]# chef-server-ctl user-create myusername myfirstname mylastname myemail mypassword --filename /root/myfile.pem
我在上面的命令中填写了适当的详细信息,但我一直收到以下错误:

ERROR: Connection refused connecting to https://127.0.0.1/users/, retry 5/5
ERROR: Network Error: Connection refused - Connection refused connecting to        https://127.0.0.1/users/, giving up
Check your knife configuration and network settings
ngnix服务一直处于关闭状态,无法启动。浏览日志后:

 tail -f /var/log/opscode/nginx/current 
 2015-07-01_10:59:00.69218 nginx: [emerg] invalid number of arguments in "server_name" directive in /var/opt/opscode/nginx/etc/chef_https_lb.conf:3
文件chef_https_lb.conf如下所示:

server {
listen 443;
server_name ;

access_log /var/log/opscode/nginx/access.log opscode;

我不确定出了什么问题。有人能解释一下吗?

您必须禁用SELinux,以便Chef可以将其服务绑定到各种套接字/端口。您可能还必须禁用qpid

见:

特别是:

以防有人在寻找答案时无意中发现(就像我一样)。 问题是您需要设置本地主机以外的服务器的FQDN

Centos 6.6上的示例

在/etc/hosts文件中,读取(或类似于)的顶行

将localhost更改为您为服务器设置的主机名(
/etc/sysconfig/network

重新启动网络服务

$: service network restart
在服务器终端上运行以下命令时

$: hostname
$: hostname -f
它们都应该输出“servername.com”

运行
chef server ctl reconfigure
为chef服务器重建ssl证书


您应该能够添加管理员用户/ORG和opscode管理web界面

在我的例子中,是nginx无法绑定到端口80,因为apache2已经在使用它。因此,我的厨师服务器ctl tail nginx如下所示

# chef-server-ctl tail nginx                                                                                                                                                  
==> /var/log/opscode/nginx/internal-chef.access.log <==

==> /var/log/opscode/nginx/error.log <==
2016/07/20 12:22:29 [emerg] 28912#0: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2016/07/20 12:22:29 [emerg] 28912#0: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2016/07/20 12:22:29 [emerg] 28912#0: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2016/07/20 12:22:29 [emerg] 28912#0: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2016/07/20 12:22:29 [emerg] 28912#0: still could not bind()

你好,谢谢你的回复。我已将SElinux设置为许可模式,但我的CentOS上未安装qpidd。加班我检查厨师服务的状态:down:nginx:0s,正常向上,想要向上;run:log:(pid 4378)11394s nginx始终是,当我调用chef server tcl start时它会启动,但会再次下降。我不确定这是否是问题所在-nginx正在下降。为什么会宕机?因为另一个Web服务器已经在端口80/443/…上运行?#netstat-anp | grep:80给出:tcp 0 127.0.0.1:8000 0.0.0.0:*听着24166/beam.smp在443上没有运行任何东西。反向DNS断开不存在?注意:我通过添加将
$hostname
输出到
/etc/hosts
的顶行。谢谢你的回答!完美的谢谢:)
$: hostname
$: hostname -f
# chef-server-ctl tail nginx                                                                                                                                                  
==> /var/log/opscode/nginx/internal-chef.access.log <==

==> /var/log/opscode/nginx/error.log <==
2016/07/20 12:22:29 [emerg] 28912#0: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2016/07/20 12:22:29 [emerg] 28912#0: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2016/07/20 12:22:29 [emerg] 28912#0: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2016/07/20 12:22:29 [emerg] 28912#0: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2016/07/20 12:22:29 [emerg] 28912#0: still could not bind()
# vi /var/opt/opscode/nginx/etc/nginx.conf
 ...
    # We support three options: serve nothing on non_ssl_port (80),
    # redirect to https, or actually serve the API.
    #     server {
    #       listen 80;
    #       access_log /var/log/opscode/nginx/rewrite-port-80.log;
    #       return 301 https://$host$request_uri;
    #     }

# chef-server-ctl restart nginx
ok: run: nginx: (pid 32236) 0s
# chef-server-ctl user-create username fname sname username@example.com password --filename username.pem