Chef infra chef服务器为引导节点显示错误的IP地址

Chef infra chef服务器为引导节点显示错误的IP地址,chef-infra,configuration-management,Chef Infra,Configuration Management,我最近开始学习chef并尝试使用3个节点。我成功地在ubuntu上设置了我的工作站(不明显),现在已经启动了2个节点。但在下图中,他们的IP地址设置为127.0.0.1 我使用以下方法增强了它们: $knife bootstrap xxxx.xxxx.com -x root -P xxxxxxxx -N xxxxxxxx 这看起来很好,它出现在chef服务器上,但当我执行以下操作以强制在其上运行chef客户端时,它会抛出一些错误,如下所示 $ knife ssh "name:logsmana

我最近开始学习chef并尝试使用3个节点。我成功地在ubuntu上设置了我的工作站(不明显),现在已经启动了2个节点。但在下图中,他们的IP地址设置为127.0.0.1

我使用以下方法增强了它们:

$knife bootstrap xxxx.xxxx.com -x root -P xxxxxxxx -N xxxxxxxx
这看起来很好,它出现在chef服务器上,但当我执行以下操作以强制在其上运行chef客户端时,它会抛出一些错误,如下所示

$ knife ssh "name:logsmanager" "chef-client" -x root -a xxxx.xxxx.com
FATAL: 1 node found, but does not have the required attribute to establish the connection. Try setting another attribute to open the connection using --attribute.
此外,我知道客户端节点默认每30分钟签入一次,但在我的chef server nodes选项卡上,它显示上次签入是在6天前和13小时之前

这是否意味着客户端节点不检查chef服务器,或者类似于源版本控制签入、签出术语

如果有人能帮我点亮这盏灯,我将不胜感激。多谢各位

编辑:

运行上述命令后,我遇到了另一个问题:

$ knife ssh "name:logsmanager" "chef-client" -x root -a fqdn
WARNING: Failed to connect to my.domain.com -- Net::SSH::AuthenticationFailed: Authentication failed for user root@my.domain.com@my.domain.com .Seems to understant root@my.domain.com as username for my.domain.com fqdn.

-ssh
-a
参数应该是“点路径”语法中的节点属性,因此类似于
fqdn
cloud.public\u ipv4
。默认情况下,ssh将使用节点的FQDN连接到


刀子将运行您提供的搜索查询,然后使用给定属性查找要传递给
Net::SSH的名称。默认情况下,chef客户端未检查chef服务器上的更改。这是手工完成的

要使节点定期运行,请选中此选项:

-i SECONDS, --interval SECONDS
The frequency (in seconds) at which the chef-client runs. When the chef-client is run at intervals, --splay and --interval values are applied before the chef-client run. Default value: 1800.
有关chef client的其他选项的更多信息,请参见

关于提供属性,必须提供要用于SSH的属性,而不是实际值。这意味着:

$ knife ssh "role:web" "uptime" -x ubuntu -a public_hostname

public_hostname-表示名为
public_hostname

的节点属性您好,谢谢您的评论。恐怕我不明白。我确实在-a属性之后提供了一个
fqdn
。我的意思是字面上的
-a fqdn
(这已经是默认值)。您正在指定要使用的属性,而不是值。我编辑了文章,它似乎没有连接。另外,我不明白为什么IP将是一个本地环回检查,以确保FQDN的实际设置正确。正如我所说,
-fqdn
已经是默认值,所以我不希望它改变任何东西。试试
-可能是IP地址?