# Error due to run the chef-client in multiple nodes at a single time Using roles

**URL:** <https://discourse.chef.io/t/error-due-to-run-the-chef-client-in-multiple-nodes-at-a-single-time-using-roles/3650>\
**Category:** Chef Infra (archive)\
**Created:** [February 20, 2013, 11:45am UTC](https://discourse.chef.io/t/error-due-to-run-the-chef-client-in-multiple-nodes-at-a-single-time-using-roles/3650 "2013-02-20T11:45:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesan\_A](https://avatars.discourse-cdn.com/v4/letter/g/f07891/32.png) [@Ganesan\_A](https://discourse.chef.io/u/Ganesan_A)\
**Post date:** [February 20, 2013, 11:45am UTC](https://discourse.chef.io/t/error-due-to-run-the-chef-client-in-multiple-nodes-at-a-single-time-using-roles/3650/1 "2013-02-20T11:45:38Z")

</div>

hi,

i tried to run the chef-client in multiple nodes at a single time using roles  
from workstation for two nodes like

root@chefserver:~# knife ssh “role:webserver” “sudo chef-client”

but it shows error like on each attempt

WARNING: Failed to connect to – SocketError: getaddrinfo: Temporary failure  
in name resolution

WARNING: Failed to connect to – Net::SSH::AuthenticationFailed: root@ubuntu

FATAL: 2 nodes found, but does not have the required attribute to establish the  
connection. Try setting another attribute to open the connection using  
–attribute.

ERROR: Connection refused connecting to 61.16.162.229:4000 for /search/node,  
retry 1/5  
ERROR: Connection refused connecting to 61.16.162.229:4000 for /search/node,  
retry 2/5  
ERROR: Connection refused connecting to 61.16.162.229:4000 for /search/node,  
retry 3/5  
ERROR: Connection refused connecting to 61.16.162.229:4000 for /search/node,  
retry 4/5  
ERROR: Connection refused connecting to 61.16.162.229:4000 for /search/node,  
retry 5/5  
WARNING: Failed to connect to – Net::SSH::AuthenticationFailed: root@ubuntu

how to rectify this…the above same error i faced when i am run the  
chef-client in single node from workstation like

knife ssh name:XXXXX -x ubuntu -P XXXXXXXX “sudo chef-client”

what i want to do to rectify this…what i want to check…what i want to  
change Please send any solution for this as soon as possible

Thanks and Regards,  
Ganesan.A

---

<div class="post-metadata">

**Author:** ![Gourav\_Shah](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/gourav_shah/32/386_2.png) [@Gourav\_Shah](https://discourse.chef.io/u/Gourav_Shah)\
**Post date:** [February 20, 2013, 11:53am UTC](https://discourse.chef.io/t/error-due-to-run-the-chef-client-in-multiple-nodes-at-a-single-time-using-roles/3650/2 "2013-02-20T11:53:40Z")

</div>

If you look at the logs, you will see the following,

WARNING: Failed to connect to -- Net::SSH::AuthenticationFailed:  
root@ubuntu

This is where the problem is. Can you make sure you have the correct key  
set and provide it with knife ssh.

Thanks  
Gourav

On Wed, Feb 20, 2013 at 5:15 PM, [ganesan15785@gmail.com](mailto:ganesan15785@gmail.com) wrote:

> hi,
> 
> i tried to run the chef-client in multiple nodes at a single time using  
> roles  
> from workstation for two nodes like
> 
> root@chefserver:~# knife ssh "role:webserver" "sudo chef-client"
> 
> but it shows error like on each attempt
> 
> WARNING: Failed to connect to -- SocketError: getaddrinfo: Temporary  
> failure  
> in name resolution
> 
> WARNING: Failed to connect to -- Net::SSH::AuthenticationFailed:  
> root@ubuntu
> 
> FATAL: 2 nodes found, but does not have the required attribute to  
> establish the  
> connection. Try setting another attribute to open the connection using  
> --attribute.
> 
> ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> /search/node,  
> retry 1/5  
> ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> /search/node,  
> retry 2/5  
> ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> /search/node,  
> retry 3/5  
> ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> /search/node,  
> retry 4/5  
> ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> /search/node,  
> retry 5/5  
> WARNING: Failed to connect to -- Net::SSH::AuthenticationFailed:  
> root@ubuntu
> 
> how to rectify this.......the above same error i faced when i am run the  
> chef-client in single node from workstation like
> 
> knife ssh name:XXXXX -x ubuntu -P XXXXXXXX "sudo chef-client"
> 
> what i want to do to rectify this..what i want to check...what i want to  
> change Please send any solution for this as soon as possible
> 
> Thanks and Regards,  
> Ganesan.A

---

<div class="post-metadata">

**Author:** ![Jesse\_Campbell](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jesse_campbell/32/251_2.png) [@Jesse\_Campbell](https://discourse.chef.io/u/Jesse_Campbell)\
**Post date:** [February 20, 2013, 1:27pm UTC](https://discourse.chef.io/t/error-due-to-run-the-chef-client-in-multiple-nodes-at-a-single-time-using-roles/3650/3 "2013-02-20T13:27:38Z")

</div>

when i run knife ssh, i use a couple more options.  
here's an example:  
knife ssh -a ipaddress -x root -P password "role:sam\_app" "uptime && date"

the -a options says to use the node's ip address instead of the node's name  
or fqdn. -P passes in the root password, so i don't need to maintain ssh  
keys

On Wed, Feb 20, 2013 at 6:53 AM, Gourav Shah [gs@initcron.org](mailto:gs@initcron.org) wrote:

> If you look at the logs, you will see the following,
> 
> WARNING: Failed to connect to -- Net::SSH::AuthenticationFailed:  
> root@ubuntu
> 
> This is where the problem is. Can you make sure you have the correct key  
> set and provide it with knife ssh.
> 
> Thanks  
> Gourav
> 
> On Wed, Feb 20, 2013 at 5:15 PM, [ganesan15785@gmail.com](mailto:ganesan15785@gmail.com) wrote:
> 
> > hi,
> > 
> > i tried to run the chef-client in multiple nodes at a single time using  
> > roles  
> > from workstation for two nodes like
> > 
> > root@chefserver:~# knife ssh "role:webserver" "sudo chef-client"
> > 
> > but it shows error like on each attempt
> > 
> > WARNING: Failed to connect to -- SocketError: getaddrinfo: Temporary  
> > failure  
> > in name resolution
> > 
> > WARNING: Failed to connect to -- Net::SSH::AuthenticationFailed:  
> > root@ubuntu
> > 
> > FATAL: 2 nodes found, but does not have the required attribute to  
> > establish the  
> > connection. Try setting another attribute to open the connection using  
> > --attribute.
> > 
> > ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> > /search/node,  
> > retry 1/5  
> > ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> > /search/node,  
> > retry 2/5  
> > ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> > /search/node,  
> > retry 3/5  
> > ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> > /search/node,  
> > retry 4/5  
> > ERROR: Connection refused connecting to 61.16.162.229:4000 for  
> > /search/node,  
> > retry 5/5  
> > WARNING: Failed to connect to -- Net::SSH::AuthenticationFailed:  
> > root@ubuntu
> > 
> > how to rectify this.......the above same error i faced when i am run the  
> > chef-client in single node from workstation like
> > 
> > knife ssh name:XXXXX -x ubuntu -P XXXXXXXX "sudo chef-client"
> > 
> > what i want to do to rectify this..what i want to check...what i want to  
> > change Please send any solution for this as soon as possible
> > 
> > Thanks and Regards,  
> > Ganesan.A
