Trouobleshooting chef-server and chef
- had an error: Net::HTTPServerException: 403 "Forbidden"
- Solutions
- long running recipes cause Forbidden errors. So, increase timeout value
- create a file /etc/chef-server/chef-server.rb that contains "erchef['s3_url_ttl'] = 3600"
chef-server-ctl reconfigure - On "Private Chef" the variable to change turns out to be slightly different:
opscode_erchef['s3_url_ttl'] = 3600 - http://stackoverflow.com/questions/11870336/chef-client-connection-errors-after-executing-knife-bootstrap
- lost private keys
- Lost of admin.pem file
- Visit webui
- Edit account >> Edit >> Regnerate private key
- Lost chef-validator private key
- cleanse chef-server and start from scratch
- sudo chef-server-ctl cleanse
- ERROR: TypeError: can't convert nil into String
- Most probably argument error. I get this while executing following cookbook command:
$ knife cookbook create apache - Reason it give me this error was my knife.rb file was incomplete. I didn't specify cookbook_path variable. This mean i've to explicitly specify cookbook path while executing knife commands.
- I solved this by adding "cookbook_path" variable in my knife.rb file
OR - giving -o argument to specify cookbook directory
$ knife cookbook create MYCOOKBOOK -o /path/to/my/cookbook_dir - Not able to communicate with chef-server
- /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:763:in `initialize': Connection re
- used - connect(2) (Errno::ECONNREFUSED)
- Most probably chef-server is not configured with right parameters like server name
- Visit chef-server and cd /etc/chef-server or wherever your chef-server is installed
- make chef-server.rb file and enter following parametersserver_name = "192.168.56.11"api_fqdn server_namenginx['url'] = "https://#{server_name}"nginx['server_name'] = server_namelb['fqdn'] = server_namebookshelf['vip'] = server_name
- verify chef-server configuration :
$ sudo chef-server-ctl show-config - More info here: http://stackoverflow.com/questions/19586040/install-chef-server-11-on-ec2-instance
- Old recipes are getting run on node
- Most probably you forget to commit your changes and upload on chef-server
- $ knife cookbook upload cookbook_02
- Path to chef_repo is incorrect in knife.rb file. Please update it to point to current chef_repo
- Unable to set environment on a node during bootstrap
- Somehow knife is not setting environment if environment command line parameter is in the middle or the last option.
using "knife bootstrap <hostname|IP> -E environment ... " work fine - environment option is first in the list.
eg .
knife bootstrap IP -E 'Development
Reference:
- https://wiki.opscode.com/display/chef/Common+Errors
- http://stackoverflow.com/questions/11870336/chef-client-connection-errors-after-executing-knife-bootstrap
- https://tickets.opscode.com/browse/CHEF-2614
No comments:
Post a Comment