Initial knife setup

hello list,

Forgive my ignorance but I am new to chef.

I’m attempting to setup a knife client against a chef 10 (open source ).
But when I run the following commands I get the following errors:

root@chef:~] #knife configure --initial
Overwrite /root/.chef/knife.rb? (Y/N) Y
Please enter the chef server URL: [http://chef.jokefire.com:4000]
Please enter a name for the new user: [root] jf-admin
Please enter the existing admin name: [admin] chef-webui
Please enter the location of the existing admin’s private key:
[/etc/chef/admin.pem] /etc/chef/webui.pem
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem]
Please enter the path to a chef repository (or leave blank):
/root/chef/chef-repo
Creating initial API user…
Please enter a password for the new user:
ERROR: Server returned error for http://chef.jokefire.com:4000/users,
retrying 1/5 in 4s
ERROR: Server returned error for http://chef.jokefire.com:4000/users,
retrying 2/5 in 5s
ERROR: Server returned error for http://chef.jokefire.com:4000/users,
retrying 3/5 in 13s
ERROR: Server returned error for http://chef.jokefire.com:4000/users,
retrying 4/5 in 23s
ERROR: Server returned error for http://chef.jokefire.com:4000/users,
retrying 5/5 in 48s
ERROR: internal server error
Response: undefined method `name’ for nil:NilClass

Can someone point me in the right direction?

thanks
tim

GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

On Friday, August 30, 2013 at 11:26 AM, Tim Dunphy wrote:

hello list,

Forgive my ignorance but I am new to chef.

I'm attempting to setup a knife client against a chef 10 (open source ). But when I run the following commands I get the following errors:

root@chef:~] #knife configure --initial
Overwrite /root/.chef/knife.rb? (Y/N) Y
Please enter the chef server URL: [http://chef.jokefire.com:4000]
Please enter a name for the new user: [root] jf-admin
Please enter the existing admin name: [admin] chef-webui
Please enter the location of the existing admin's private key: [/etc/chef/admin.pem] /etc/chef/webui.pem
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem]
Please enter the path to a chef repository (or leave blank): /root/chef/chef-repo
Creating initial API user...
Please enter a password for the new user:
ERROR: Server returned error for http://chef.jokefire.com:4000/users, retrying 1/5 in 4s
ERROR: Server returned error for http://chef.jokefire.com:4000/users, retrying 2/5 in 5s
ERROR: Server returned error for http://chef.jokefire.com:4000/users, retrying 3/5 in 13s
ERROR: Server returned error for http://chef.jokefire.com:4000/users, retrying 4/5 in 23s
ERROR: Server returned error for http://chef.jokefire.com:4000/users, retrying 5/5 in 48s
ERROR: internal server error
Response: undefined method `name' for nil:NilClass

Can someone point me in the right direction?

thanks
tim

--
GPG me!!

gpg --keyserver pool.sks-keyservers.net (http://pool.sks-keyservers.net) --recv-keys F186197B

While all of the operations you need to do day-to-day will work when using knife from Chef 11.x against a 10.x server, this initial setup wizard assumes you're on the same major version.

Is there a particular reason you're using Chef 10.x server?

In any case if starting over with (or migrating to) Chef 11 on the server isn't an option for you, you can either downgrade knife to Chef 10.26, or manually create a "client"[1] by running knife client create YOURNAME and giving the flags:

-k /path/to/admin/key.pem (for Chef 10, use the webui.pem key)
-u chef-webui (name of the existing admin client)
-a (makes the new client an admin)
-f /path/to/new/key.pem (write out your new client key to a file)

You might also have to pass in the server URL (-s option).

--
Daniel DeLeo

  1. "client" here means a database entry representing a person or machine who/that is authorized to access the chef server. In Chef 10, a "user" is a database entry representing a person who can access the webui, but API access is only for clients. In Chef 11, a "user" has both a password and an API key, so you use the same "user" identity for both API and webui access.