【问题标题】:Chef bootstrap failing to talk to chef manager厨师引导程序未能与厨师经理交谈
【发布时间】:2016-10-18 22:51:53
【问题描述】:

我正在尝试 Chef,我正在尝试从工作站引导节点,似乎该节点已引导正常并且它显示在 Chef Server 节点中,但如果您查看下面的日志,似乎是工作站似乎无法与主厨经理交谈,我也可以从工作站访问主厨经理。

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

这是刀的完整输出

   test1@ubuntudesk:~/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)

【问题讨论】:

    标签: chef-infra bootstrapping


    【解决方案1】:

    那是目标节点失败,而不是工作站。这意味着主机名cent7 在您的工作站上工作,而不是在您正在引导的服务器上工作。确保您没有将其添加到您的主机文件或使用一些解析器路径技巧。

    【讨论】:

    • 你的意思是它无法与cent7(Chef Server)对话的节点?由于我没有域设置,我在 /etc/hosts 中添加了静态路由,以便我可以通过主机名而不是 IP 访问服务器,我是否应该将相同的路由添加到 Chef 服务器的节点?
    • 是的,或者只是在您的配置中使用 IP 地址,以便它适用于所有系统
    猜你喜欢
    • 2015-04-14
    • 1970-01-01
    • 2013-05-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-03
    • 1970-01-01
    相关资源
    最近更新 更多