Chef: command not found error


#1

Hi All,

I am using Chef to create a server in AWS Amazon Environment using knife ec2 plugin.I have created the EC2 Server using the following command:

knife ec2 server create --image ami-7c807d14 --flavor t1.micro --region us-east-1 --security-group-ids sg-ID --ebs-size 10 --ebs-no-delete-on-term --tags Name=Test_Server --server-connect-attribute private_ip_address --subnet subnet-ID --ssh-user ec2-user --identity-file ~/.ssh/key.pem --environment Testing --node-name Redhat-Server

When I login to the newly created server and run chef client -v it gives me the version of chef client running on the newly created EC2 VM.
But when I logon to the EC2 server and executes the command sudo chef client ,it gives me an error :

sudo: chef: command not found.
I have checked on the chef server that the status of the node is fine.
Please help me resolve this issue.

Thanks & Regards,
Jyoti Bhanot


#2

The command that should be used is:

sudo chef-client

The issue is resolved now.

Thanks.

From: Bhanot, Jyoti [mailto:Jyoti.Bhanot@netapp.com]
Sent: 24 June 2014 12:44
To: 'chef@lists.opscode.com’
Subject: [chef] Chef: command not found error

Hi All,

I am using Chef to create a server in AWS Amazon Environment using knife ec2 plugin.I have created the EC2 Server using the following command:

knife ec2 server create --image ami-7c807d14 --flavor t1.micro --region us-east-1 --security-group-ids sg-ID --ebs-size 10 --ebs-no-delete-on-term --tags Name=Test_Server --server-connect-attribute private_ip_address --subnet subnet-ID --ssh-user ec2-user --identity-file ~/.ssh/key.pem --environment Testing --node-name Redhat-Server

When I login to the newly created server and run chef client -v it gives me the version of chef client running on the newly created EC2 VM.
But when I logon to the EC2 server and executes the command sudo chef client ,it gives me an error :

sudo: chef: command not found.

I have checked on the chef server that the status of the node is fine.
Please help me resolve this issue.

Thanks & Regards,
Jyoti Bhanot