Knife problems

Im hoping someone can help me with knife. I have tried to configure it every way possible but i still get the 401 error. I am trying to run it on the server. I’ve also encountered the same issue with trying to install cookbooks - i assume this is because knife is used to configure the changes on the server.

I used ‘knife configure’ on the server and created a ‘client’ as myself. Then copied the private key from the admin console along with the validation.pem from /etc/chef. Still no luck. I must be overlooking something very simple perhaps?

thanks
Ryan

not sure if this is any help

User creation:

adminuser@srv-101-03:~$ sudo knife configure --initial
Your chef server URL? http://srv-101-03.mydomain.com:4000
Your client user name?
Your validation client user name? chef-validator
Path to a chef repository (or leave blank)?
WARN: Creating initial API user...
INFO: Created (or updated) client[adminuser]
WARN: Configuration file written to /home/adminuser/.chef/knife.rb

Verify user:

adminuser@srv-101-03:~$ knife node list
[
"srv-101-03.mydomain.com"
]
adminuser@srv-101-03:~$

Also I had some really odd issues with the validator pem and had to destroy the validation user and recreate which I found at: Reseting the Opscode Chef Server Validation key/pem - Cognizant Transmutation

On Apr 19, 2010, at 2:13 AM, Ryan Richards wrote:

Im hoping someone can help me with knife. I have tried to configure it every way possible but i still get the 401 error. I am trying to run it on the server. I've also encountered the same issue with trying to install cookbooks - i assume this is because knife is used to configure the changes on the server.

I used 'knife configure' on the server and created a 'client' as myself. Then copied the private key from the admin console along with the validation.pem from /etc/chef. Still no luck. I must be overlooking something very simple perhaps?

thanks
Ryan

Joshua,

On 19 April 2010 11:31, Joshua Miller jassinpain@gmail.com wrote:

Also I had some really odd issues with the validator pem and had to destroy the validation user and recreate which I found at: Reseting the Opscode Chef Server Validation key/pem - Cognizant Transmutation

I took the liberty to add a link to this blog article to the
Troubleshooting section at the bottom of the Knife wiki page:
http://wiki.opscode.com/display/chef/Knife

Ringo

Thanks Joshua:

I actually follow the same procedure as you listed except I have not recreated the validation resources. I already have several clients connected the chef server.

I only recently discovered i couldn't actually do anything on the chef server because of the knife configuration 401 error. Im thinking now i should clean out the gems and try the beta packages for ubuntu. Not sure this would do anything however.

One thing that is really strange is that doing --initial with the knife configuration does NOT generate a client pem file for me. I thought it was supposed to do this?

thanks again
Ryan
On Apr 19, 2010, at 4:31 AM, Joshua Miller wrote:

not sure if this is any help

User creation:

adminuser@srv-101-03:~$ sudo knife configure --initial
Your chef server URL? http://srv-101-03.mydomain.com:4000
Your client user name?
Your validation client user name? chef-validator
Path to a chef repository (or leave blank)?
WARN: Creating initial API user...
INFO: Created (or updated) client[adminuser]
WARN: Configuration file written to /home/adminuser/.chef/knife.rb

Verify user:

adminuser@srv-101-03:~$ knife node list
[
"srv-101-03.mydomain.com"
]
adminuser@srv-101-03:~$

Also I had some really odd issues with the validator pem and had to destroy the validation user and recreate which I found at: Reseting the Opscode Chef Server Validation key/pem - Cognizant Transmutation

On Apr 19, 2010, at 2:13 AM, Ryan Richards wrote:

Im hoping someone can help me with knife. I have tried to configure it every way possible but i still get the 401 error. I am trying to run it on the server. I've also encountered the same issue with trying to install cookbooks - i assume this is because knife is used to configure the changes on the server.

I used 'knife configure' on the server and created a 'client' as myself. Then copied the private key from the admin console along with the validation.pem from /etc/chef. Still no luck. I must be overlooking something very simple perhaps?

thanks
Ryan