Chef node not registering with server

巧了我就是萌 提交于 2019-12-23 03:59:14

问题


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)

回答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.




回答2:


Make sure knife commands from your workstation are working first. knife client list is a basic one you can use to test your server installation. It sounds like Chef Server is not installed correctly or was unable to start some components.



来源:https://stackoverflow.com/questions/27689327/chef-node-not-registering-with-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!