0
votes

when we run the below command from Knife workstation,

knife search data_bag_name id:data_bag_item_id its returning 0 items,even though items are present in Chef server. If we do knife data bag show data_bag_name data_bag_item_id its showing the data bag item.

This is not working in recipe as well. What could be the issue?

1
Hi, I've checked the command " knife search data_bag_name 'id:data_bag_item_id' " and it works for me. Are you sure that you type the correct data_bag_name and the correct data_bag_item_id? - user2250152
Try launching chef-server-ctl reindexon your server, sometimes the solr index crash. - Tensibai
This problem got resolved after running chef-server-ctl reindex on chef server. Thanks @Tensibai - ReshmaA

1 Answers

0
votes

Run chef-server-ctl reindex in Chef server solves the issue.