1

I try to run a command on all my nodes but get the following error. The chef docs say it should work like this.

me$ sudo knife ssh "name:*" "uptime" -x myuser
WARNING: Failed to connect to  -- Errno::ECONNREFUSED: Connection refused - connect(2)
WARNING: Failed to connect to  -- SocketError: getaddrinfo: nodename nor servname provided, or not known
j7nn7k
  • 131
  • 2
  • 9

2 Answers2

0

The knife-ssh plugin uses the ipaddress attribute on each node. You might like to check the value of this attribute on your nodes. If it's incorrect, nonexistent, or unreachable from where you are running knife, you will get connection errors like the above.

Tim Potter
  • 1,764
  • 15
  • 15
0

You need to pass cloud public ip address attribute e.g

sudo knife ssh "name:*" "uptime" -x myuser -a cloud.public_ipv4
HBruijn
  • 77,029
  • 24
  • 135
  • 201