【问题标题】:chef-server SocketError: getaddrinfo: nodename nor servname provided, or not knownchef-server SocketError: getaddrinfo: nodename or servname provided, or not known
【发布时间】:2015-05-27 20:30:38
【问题描述】:

运行后一直报错

➜  chef knife ssh 'name:beautifulprayer' -x ubuntu

WARNING: Failed to connect to beautifulprayer -- SocketError: getaddrinfo: nodename nor servname provided, or not known

不知道为什么。以下是有关节点的信息:

➜  chef knife node show beautifulprayer
Node Name:   beautifulprayer
Environment: _default
FQDN:        beautifulprayer
IP:          104.131.0.191
Run List:    recipe[sudo]
Roles:
Recipes:
Platform:    ubuntu 14.04
Tags:

【问题讨论】:

  • ping beautifulprayer 有效吗?我很确定不是,因为没有域可以要求此主机 IP,这就是您收到的错误消息。

标签: chef-infra


【解决方案1】:
 beautifulprayer

可能不是 FQDN 且不可解析。当你想解决这个问题时,你可以尝试:

knife ssh 'name:beautifulprayer' -a ipaddress -x ubuntu

在这种情况下,knife 将使用 ipaddress 属性而不是(损坏的)FQDN。

【讨论】:

  • 我最初是 knife bookstrap IPADDRESS,然后厨师将 IPADDRESS 服务器命名为服务器的名称(来自 DigitalOcean)
  • 当我引导一个还没有 DNS 记录的节点时,我可以使用knife bootstrap <IP> -N the.future.fqdn.of.this.server.com。您可能想检查我的 DigitalOcean 刀插件,默认情况下这样做:github.com/rmoriz/knife-digital_ocean#create-a-droplet
  • 我现在收到此错误:( 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.
  • 你是老板@Roland
猜你喜欢
  • 2016-01-24
  • 2020-01-23
  • 2012-11-15
  • 1970-01-01
  • 2017-02-20
  • 2013-06-13
  • 2019-12-18
  • 2016-03-20
  • 2016-01-20
相关资源
最近更新 更多