Knife ssh fails with Server returned error


#1

Hi,

Am able to add,delete recipies on my node using knife commands,but when i
try use knife ssh to run chef-client on my node i get error:

command:

knife ssh name:chef-node.blr.novell.com -x root -P pass “sudo chef-client”
-a 172.18.4.19

Error:
ERROR: Server returned error for
http://localhost:4000/search/node?q=name:chef-node.blr.novell.com&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000,
retrying 1/5 in 3s

Kindly suggest.


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


#2

Also Knife search doesn’t give me any results

knife search node NAME:*
ERROR: Server returned error for
http://localhost:4000/search/node?q=NAME%3A*&sort=&start=0&rows=1000,
retrying 1/5 in 3s

Though i can list my nodes with Knife node list and also i can see my nodes
in the UI http://ip:4040

On Tue, Jun 19, 2012 at 3:20 PM, meenakshi agrawal minmini17@gmail.comwrote:

Hi,

Am able to add,delete recipies on my node using knife commands,but when i
try use knife ssh to run chef-client on my node i get error:

command:

knife ssh name:chef-node.blr.novell.com -x root -P pass “sudo
chef-client” -a 172.18.4.19

Error:
ERROR: Server returned error for
http://localhost:4000/search/node?q=name:chef-node.blr.novell.com&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000,
retrying 1/5 in 3s

Kindly suggest.


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


#3

Hi,

just a quick guess: Your solr instance isn’t running or it’s misconfigured.

You can check by yourself via:
ps aux|grep [s]olr /etc/init.d/chef-solr status
$ tail /var/log/chef/solr.log

On Jun 19, 2012, at 11:54 AM, meenakshi agrawal wrote:

Also Knife search doesn’t give me any results

knife search node NAME:*
ERROR: Server returned error for http://localhost:4000/search/node?q=NAME%3A*&sort=&start=0&rows=1000, retrying 1/5 in 3s

Though i can list my nodes with Knife node list and also i can see my nodes in the UI http://ip:4040

On Tue, Jun 19, 2012 at 3:20 PM, meenakshi agrawal minmini17@gmail.com wrote:
Hi,

Am able to add,delete recipies on my node using knife commands,but when i try use knife ssh to run chef-client on my node i get error:

command:

knife ssh name:chef-node.blr.novell.com -x root -P pass “sudo chef-client” -a 172.18.4.19

Error:
ERROR: Server returned error for http://localhost:4000/search/node?q=name:chef-node.blr.novell.com&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 1/5 in 3s

Kindly suggest.


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in the mind

Regards,
Mike


Mike Adolphs
Stitenstrasse 24
23554 Luebeck

  • Germany -

Mail. mike@fooforge.com
Web. http://fooforge.com/
Github. https://github.com/fooforge/
XING. http://www.xing.com/profile/Mike_Adolphs


#4

$ knife search node name:* -a name

‘name’, not ‘NAME’ - the case of the attribute is important.

And I suspect the problem with your knife ssh command was that the node name would just be ‘chef-node’ (i.e. they don’t usually include the domain, just the host part.)

-ash

On 19 Jun 2012, at 10:54, meenakshi agrawal wrote:

Also Knife search doesn’t give me any results

knife search node NAME:*
ERROR: Server returned error for http://localhost:4000/search/node?q=NAME%3A*&sort=&start=0&rows=1000, retrying 1/5 in 3s

Though i can list my nodes with Knife node list and also i can see my nodes in the UI http://ip:4040

On Tue, Jun 19, 2012 at 3:20 PM, meenakshi agrawal minmini17@gmail.com wrote:
Hi,

Am able to add,delete recipies on my node using knife commands,but when i try use knife ssh to run chef-client on my node i get error:

command:

knife ssh name:chef-node.blr.novell.com -x root -P pass “sudo chef-client” -a 172.18.4.19

Error:
ERROR: Server returned error for http://localhost:4000/search/node?q=name:chef-node.blr.novell.com&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 1/5 in 3s

Kindly suggest.


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in the mind


#5

This is a common misconception about how knife ssh works. The “-a"
option is asking for the attribute to pull from the nodes returned
from the search result, not the IP address you want to use. So if
"name:chef-node.blr.novell.com” matches 1 machine, you’ll want to pass
"-a ipaddress" to pull the node’s ipaddress and pass it to the ssh
command. I believe the options also go after the command, so try this:

knife ssh name:chef-node.blr.novell.com “sudo chef-client” -x root -P
pass -a ipaddress

If you’re running in the cloud, you might use

knife ssh name:chef-node.blr.novell.com “sudo chef-client” -x root -P
pass -a cloud.public_hostname

Thanks,
Matt Ray
Senior Technical Evangelist | Opscode Inc.
matt@opscode.com | (512) 731-2218
Twitter, IRC, GitHub: mattray

On Tue, Jun 19, 2012 at 4:50 AM, meenakshi agrawal minmini17@gmail.com wrote:

knife ssh name:chef-node.blr.novell.com -x root -P pass “sudo chef-client”
-a 172.18.4.19


#6

Thanks all!!

My knife search works now,though it returns one node not three for knife
search node name :*

I tried running knife shh by removing the domain but still i get the same
error

FATAL: No nodes returned from search!

On Tue, Jun 19, 2012 at 3:33 PM, Ash Berlin ash_opscode@firemirror.comwrote:

$ knife search node name:* -a name

‘name’, not ‘NAME’ - the case of the attribute is important.

And I suspect the problem with your knife ssh command was that the node
name would just be ‘chef-node’ (i.e. they don’t usually include the domain,
just the host part.)

-ash

On 19 Jun 2012, at 10:54, meenakshi agrawal wrote:

Also Knife search doesn’t give me any results

knife search node NAME:*
ERROR: Server returned error for
http://localhost:4000/search/node?q=NAME%3A*&sort=&start=0&rows=1000,
retrying 1/5 in 3s

Though i can list my nodes with Knife node list and also i can see my
nodes in the UI http://ip:4040

On Tue, Jun 19, 2012 at 3:20 PM, meenakshi agrawal minmini17@gmail.comwrote:

Hi,

Am able to add,delete recipies on my node using knife commands,but when
i try use knife ssh to run chef-client on my node i get error:

command:

knife ssh name:chef-node.blr.novell.com -x root -P pass “sudo
chef-client” -a 172.18.4.19

Error:
ERROR: Server returned error for
http://localhost:4000/search/node?q=name:chef-node.blr.novell.com&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000,
retrying 1/5 in 3s

Kindly suggest.


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


#7

Try using ‘name:[* TO *]’, Solr tends to get confused by leading wildcard.

– M

On 19 Jun 2012, at 16:15, meenakshi agrawal minmini17@gmail.com wrote:

Thanks all!!

My knife search works now,though it returns one node not three for knife search node name :*

I tried running knife shh by removing the domain but still i get the same error

FATAL: No nodes returned from search!

On Tue, Jun 19, 2012 at 3:33 PM, Ash Berlin ash_opscode@firemirror.com wrote:

$ knife search node name:* -a name

‘name’, not ‘NAME’ - the case of the attribute is important.

And I suspect the problem with your knife ssh command was that the node name would just be ‘chef-node’ (i.e. they don’t usually include the domain, just the host part.)

-ash

On 19 Jun 2012, at 10:54, meenakshi agrawal wrote:

Also Knife search doesn’t give me any results

knife search node NAME:*
ERROR: Server returned error for http://localhost:4000/search/node?q=NAME%3A*&sort=&start=0&rows=1000, retrying 1/5 in 3s

Though i can list my nodes with Knife node list and also i can see my nodes in the UI http://ip:4040

On Tue, Jun 19, 2012 at 3:20 PM, meenakshi agrawal minmini17@gmail.com wrote:
Hi,

Am able to add,delete recipies on my node using knife commands,but when i try use knife ssh to run chef-client on my node i get error:

command:

knife ssh name:chef-node.blr.novell.com -x root -P pass “sudo chef-client” -a 172.18.4.19

Error:
ERROR: Server returned error for http://localhost:4000/search/node?q=name:chef-node.blr.novell.com&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000, retrying 1/5 in 3s

Kindly suggest.


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in the mind


#8

Hi All,

My knife ssh command works now using -i ipaddress.

Thanks much!!

On Tue, Jun 19, 2012 at 8:20 PM, Maciej Pasternacki
maciej@pasternacki.netwrote:

Try using ‘name:[* TO *]’, Solr tends to get confused by leading wildcard.

– M

On 19 Jun 2012, at 16:15, meenakshi agrawal minmini17@gmail.com wrote:

Thanks all!!

My knife search works now,though it returns one node not three for knife
search node name :*

I tried running knife shh by removing the domain but still i get the same
error

FATAL: No nodes returned from search!

On Tue, Jun 19, 2012 at 3:33 PM, Ash Berlin ash_opscode@firemirror.comwrote:

$ knife search node name:* -a name

‘name’, not ‘NAME’ - the case of the attribute is important.

And I suspect the problem with your knife ssh command was that the node
name would just be ‘chef-node’ (i.e. they don’t usually include the domain,
just the host part.)

-ash

On 19 Jun 2012, at 10:54, meenakshi agrawal wrote:

Also Knife search doesn’t give me any results

knife search node NAME:*
ERROR: Server returned error for
http://localhost:4000/search/node?q=NAME%3A*&sort=&start=0&rows=1000,
retrying 1/5 in 3s

Though i can list my nodes with Knife node list and also i can see my
nodes in the UI http://ip:4040

On Tue, Jun 19, 2012 at 3:20 PM, meenakshi agrawal minmini17@gmail.comwrote:

Hi,

Am able to add,delete recipies on my node using knife commands,but when
i try use knife ssh to run chef-client on my node i get error:

command:

knife ssh name:chef-node.blr.novell.com -x root -P pass “sudo
chef-client” -a 172.18.4.19

Error:
ERROR: Server returned error for
http://localhost:4000/search/node?q=name:chef-node.blr.novell.com&sort=X_CHEF_id_CHEF_X%20asc&start=0&rows=1000,
retrying 1/5 in 3s

Kindly suggest.


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome
in the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


Thanks
Meenakshi Agrawal
The secret of achievement is to hold a picture of a successful outcome in
the mind


#9

On Tuesday, June 19, 2012 at 7:50 AM, Maciej Pasternacki wrote:

Try using ‘name:[* TO *]’, Solr tends to get confused by leading wildcard.

– M
With the new Solr data format in Chef 0.10+, the key-value pairs are stored together as text in Solr, so a query like name:* should work fine.

Seth Falcon wrote up some technical details of this on our blog: http://www.opscode.com/blog/2012/01/20/post-hoc-index-design-from-regex-to-peg/

And I detailed the user-facing changes in the Chef 0.10.0 announcement: http://www.opscode.com/blog/2011/05/02/chef-0-10-0-released/


Dan DeLeo