Chef节点未向服务器注册 [英] Chef node not registering with server

查看:153
本文介绍了Chef节点未向服务器注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将我的客户端注册到服务器,但在运行以下命令时会出现以下错误:



@vm〜]#chef-client -S https://chef-server.example.com -K /etc/chef/chef-validator.pem

  {:config_missing => true} 
[2014-12-29T18:20:00 + 05:30] **************************************
[2014-12-29T18:20 :00 + 05:30]警告:没有找到配置文件:/etc/chef/client.rb,使用命令行选项。
[2014-12-29T18:20:00 + 05:30]警告:*************************** ************
Starting Chef Client,版本12.0.3
使用验证器键为vm.example.com创建新的客户端标识。
[2014-12-29T18:20:01 + 05:30]警告:无法注册新客户端,剩下4次尝试
[2014-12-29T18:20:01 + 05:30] :响应:HTTP 503 - 503服务不可用
[2014-12-29T18:20:01 + 05:30]警告:注册新客户端失败,剩余3次
[2014-12- 29T18:20:01 + 05:30]警告:响应:HTTP 503 - 503服务不可用
[2014-12-29T18:20:01 + 05:30]警告:注册新客户端失败尝试剩余
[2014-12-29T18:20:01 + 05:30]警告:响应:HTTP 503 - 503服务不可用
[2014-12-29T18:20:01 + 05: 30]警告:注册新客户端失败,剩余1次
[2014-12-29T18:20:01 + 05:30]警告:响应:HTTP 503 - 503服务不可用
[2014 -12-29T18:20:01 + 05:30]警告:无法注册新客户端,剩余0次尝试
[2014-12-29T18:20:01 + 05:30]警告:响应:HTTP 503 - 503服务不可用
[2014-12-29T18:20:01 + 05:30] FATAL:Stacktrace转储到/var/chef/cache/chef-stacktrace.out
Chef客户机失败。 0资源更新于1.180742976秒
[2014-12-29T18:20:01 + 05:30]错误:未定义方法`closed?'为nil:NilClass
[2014-12-29T18: 01 + 05:30]致命:Chef :: Exceptions :: ChildConvergeError:Chef运行过程退出失败(退出代码1)


解决方案

我遇到了同样的问题,经过一段时间后,我发现这是一个代理问题。



我在公司代理后面,我得到的错误503:Service Unavailable不是来自Chef Server,而是来自代理服务器。 / p>

无论如何,使用no_proxy选项并添加Chef Server的fqdn解决了这个问题。


I am trying to register my client to the server, but it gives following error on running below command:

[root@vm ~]# chef-client -S https://chef-server.example.com -K /etc/chef/chef-validator.pem

{:config_missing=>true}
[2014-12-29T18:20:00+05:30] WARN: *****************************************
[2014-12-29T18:20:00+05:30] WARN: Did not find config file: /etc/chef/client.rb, using command line options.
[2014-12-29T18:20:00+05:30] WARN: *****************************************
Starting Chef Client, version 12.0.3
Creating a new client identity for vm.example.com using the validator key.
[2014-12-29T18:20:01+05:30] WARN: Failed to register new client, 4 tries remaining
[2014-12-29T18:20:01+05:30] WARN: Response: HTTP 503 - 503 "Service Unavailable"
[2014-12-29T18:20:01+05:30] WARN: Failed to register new client, 3 tries remaining
[2014-12-29T18:20:01+05:30] WARN: Response: HTTP 503 - 503 "Service Unavailable"
[2014-12-29T18:20:01+05:30] WARN: Failed to register new client, 2 tries remaining
[2014-12-29T18:20:01+05:30] WARN: Response: HTTP 503 - 503 "Service Unavailable"
[2014-12-29T18:20:01+05:30] WARN: Failed to register new client, 1 tries remaining
[2014-12-29T18:20:01+05:30] WARN: Response: HTTP 503 - 503 "Service Unavailable"
[2014-12-29T18:20:01+05:30] WARN: Failed to register new client, 0 tries remaining
[2014-12-29T18:20:01+05:30] WARN: Response: HTTP 503 - 503 "Service Unavailable"
[2014-12-29T18:20:01+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 1.180742976 seconds
[2014-12-29T18:20:01+05:30] ERROR: undefined method `closed?' for nil:NilClass
[2014-12-29T18:20:01+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

解决方案

I exactly encountered same issue and after struggling some time, I found out that it is a proxy problem.

I am behind a corporate proxy and the error I got "503: Service Unavailable" is not something coming from Chef Server, rather it is coming from the proxy server.

Anyway, using "no_proxy" option and adding Chef Server's fqdn solved the issue.

这篇关于Chef节点未向服务器注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆