2016-10-18 133 views
0

我尝试了厨师,我试图从工作站引导一个节点,看起来像节点引导得很好,它显示在厨师服务器节点,但如果你看看下面的日志似乎像工作站似乎无法与厨师经理交谈,我也可以从工作站访问厨师经理。厨师引导未能与厨师经理交谈

[2016-10-18T15:43:42-07:00] ERROR: Error connecting to https://cent7/organizations/farazk/nodes/unode, retry 5/5 

这里是刀

[email protected]:~/chef-repo$ knife bootstrap 192.168.131.111 -x test1 -P BatmanRobin -N unode --sudo 
    Node unode exists, overwrite it? (Y/N) Y 
    Client unode exists, overwrite it? (Y/N) Y 
    Creating new client for unode 
    Creating new node for unode 
    Connecting to 192.168.131.111 
    192.168.131.111 knife sudo password: 
    Enter your password: 
    192.168.131.111 
    192.168.131.111 -----> Installing Chef Omnibus (-v 12) 
    192.168.131.111 downloading https://omnitruck-direct.chef.io/chef/install.sh 
    192.168.131.111 to file /tmp/install.sh.6624/install.sh 
    192.168.131.111 trying wget... 
    192.168.131.111 ubuntu 16.04 x86_64 
    192.168.131.111 Getting information for chef stable 12 for ubuntu... 
    192.168.131.111 downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=12&p=ubuntu&pv=16.04&m=x86_64 
    192.168.131.111 to file /tmp/install.sh.6628/metadata.txt 
    192.168.131.111 trying wget... 
    192.168.131.111 sha1 a2de7d933734d3a0c4b859576d0be472c5cd55f7 
    192.168.131.111 sha256 7073541beb4294c994d4035a49afcf06ab45b3b3933b98a65b8059b7591df6b8 
    192.168.131.111 url https://packages.chef.io/files/stable/chef/12.15.19/ubuntu/16.04/chef_12.15.19-1_amd64.deb 
    192.168.131.111 version 12.15.19 
    192.168.131.111 downloaded metadata file looks valid... 
    192.168.131.111 downloading https://packages.chef.io/files/stable/chef/12.15.19/ubuntu/16.04/chef_12.15.19-1_amd64.deb 
    192.168.131.111 to file /tmp/install.sh.6628/chef_12.15.19-1_amd64.deb 
    192.168.131.111 trying wget... 
    192.168.131.111 Comparing checksum with sha256sum... 
    192.168.131.111 Installing chef 12 
    192.168.131.111 installing with dpkg... 
    192.168.131.111 Selecting previously unselected package chef. 
    (Reading database ... 175392 files and directories currently installed.) 
    192.168.131.111 Preparing to unpack .../chef_12.15.19-1_amd64.deb ... 
    192.168.131.111 Unpacking chef (12.15.19-1) ... 
    192.168.131.111 Setting up chef (12.15.19-1) ... 
    192.168.131.111 Thank you for installing Chef! 
    192.168.131.111 Starting the first Chef Client run... 
    192.168.131.111 Starting Chef Client, version 12.15.19 
    192.168.131.111 [2016-10-18T15:43:22-07:00] ERROR: Error connecting to https://cent7/organizations/test1k/nodes/unode, retry 1/5 
    192.168.131.111 [2016-10-18T15:43:27-07:00] ERROR: Error connecting to https://cent7/organizations/test1k/nodes/unode, retry 2/5 
    192.168.131.111 [2016-10-18T15:43:32-07:00] ERROR: Error connecting to https://cent7/organizations/test1k/nodes/unode, retry 3/5 
    192.168.131.111 [2016-10-18T15:43:37-07:00] ERROR: Error connecting to https://cent7/organizations/test1k/nodes/unode, retry 4/5 
    192.168.131.111 [2016-10-18T15:43:42-07:00] ERROR: Error connecting to https://cent7/organizations/test1k/nodes/unode, retry 5/5 
    192.168.131.111 
    192.168.131.111 ================================================================================ 
    192.168.131.111 Chef encountered an error attempting to load the node data for "unode" 
    192.168.131.111 ================================================================================ 
    192.168.131.111 
    192.168.131.111 Networking Error: 
    192.168.131.111 ----------------- 
    192.168.131.111 Error connecting to https://cent7/organizations/test1k/nodes/unode - Failed to open TCP connection to cent7:443 (getaddrinfo: Name or service not known) 
    192.168.131.111 
    192.168.131.111 Your chef_server_url may be misconfigured, or the network could be down. 
    192.168.131.111 
    192.168.131.111 Relevant Config Settings: 
    192.168.131.111 ------------------------- 
    192.168.131.111 chef_server_url "https://cent7/organizations/test1k" 
    192.168.131.111 
    192.168.131.111 Platform: 
    192.168.131.111 --------- 
    192.168.131.111 x86_64-linux 
    192.168.131.111 
    192.168.131.111 
    192.168.131.111 Running handlers: 
    192.168.131.111 [2016-10-18T15:43:47-07:00] ERROR: Running exception handlers 
    192.168.131.111 Running handlers complete 
    192.168.131.111 [2016-10-18T15:43:47-07:00] ERROR: Exception handlers complete 
    192.168.131.111 Chef Client failed. 0 resources updated in 27 seconds 
    192.168.131.111 [2016-10-18T15:43:47-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out 
    192.168.131.111 [2016-10-18T15:43:47-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report 
    192.168.131.111 [2016-10-18T15:43:47-07:00] ERROR: Error connecting to https://cent7/organizations/test1k/nodes/unode - Failed to open TCP connection to cent7:443 (getaddrinfo: Name or service not known) 
    192.168.131.111 [2016-10-18T15:43:47-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) 

回答

1

的完整输出这是目标节点出现故障,而不是工作站。这意味着主机名称cent7可以在您的工作站上运行,但不能从您正在引导的服务器上运行。确保你没有将它添加到你的主机文件或正在使用一些解析器路径技巧。

+0

你的意思是它无法与cent7(Chef Server)交谈的节点?由于我没有域名设置,我在/ etc/hosts中添加了静态路由,这样我就可以通过主机名而不是IP访问服务器,我是否应该将相同的路由添加到Chef服务器的节点? – Fenomatik

+0

是的,或者只是在您的配置中使用IP地址,以便它适用于所有系统 – coderanger