使用
成功引导后bundle exec knife zero bootstrap root@139.59.210.225
我正在尝试将我的食谱应用到远程使用
bundle exec knife zero converge "name:ily"
但是
WARNING: Failed to connect to ily.localdomain -- SocketError: getaddrinfo: Name or service not known
ERROR: NoMethodErrorundefined method `forward' for nil:NilClass
ERROR: /home/razor/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/knife-zero-1.16.0/lib/knife-zero/bootstrap_ssh.rb:32:in `block in ssh_command'
我的节点配置如下:
{
"name": "ily",
"normal": {
"knife_zero": {
"host": "139.59.210.225"
},
"tags": [
]
},
"automatic": {
"knife_zero": {
"host": "139.59.210.225"
},
"hostname": "ily",
"machinename": "ily",
"fqdn": "ily.localdomain",
"domain": "localdomain",
"current_user": "root",
... other attributes
}
}
我正在使用数字海洋实例并且没有真正的主机名,我猜,fqdn名称是在bootstrap期间生成的。如果我只有ip,我应该使用哪个域名?
答案 0 :(得分:0)
我有this issue,下面是解决方法:
使用以下代码行从厨师存储库更新您的knife.rb
文件:
# Use host IP address instead of FQDN to connect via SSH?
knife[:ssh_attribute] = 'knife_zero.host'
然后零刀将使用您节点的IP地址,而不是尝试解析其名称。