popularity question answers views user  
1
chef-client Windows service

I feel like I’m missing something….but, I’m not seeing a “Windows Service” wrapper for chef-client anywhere…

Does this exist? How else can we force chef-client to check-in periodically on Windows?

more →
1 783  
1
Knife ssh not work when a node is not bootstrapped

I have a node which is registered to chef server when its first time run the chef-client, so I can see the node in the web interface.

But I can’t run knife ssh to it, return error

“Net::SSH::AuthenticationFailed”

So, in this case, what is the best way to copy the ssh key?

more →
1 487  
1
HTTPServerException: 403 "Forbidden" after succesful chef-client run

Hello,

I am trying to get a centos 6.3 server to register as chef client for my new hosted chef account. This is my installation script:

rpm -Uvh http://rbel.frameos.org/rbel6
yum install ruby ruby-devel ruby-ri ruby-rdoc ruby-shadow gcc gcc-c++ automake autoconf make curl dmidecode
gem install chef --no-ri --no-rdoc
mkdir -p /etc/chef
cp /path/to/client.rb /etc/chef
cp /path/to/MYORG-validator.pem /etc/chef/validation.pem
echo '{ "run_list": [ "role[esb]" ] }' > /etc/chef/attributes.json

then when I run

chef-client --json-attributes /etc/chef/attributes.json

All recipes run successfully then the following error is displayed:

<snip>
[2012-11-23T13:39:59+01:00] INFO: execute[start service] ran successfully
[2012-11-23T13:40:05+01:00] ERROR: Running exception handlers
[2012-11-23T13:40:05+01:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2012-11-23T13:40:05+01:00] ERROR: Exception handlers complete
[2012-11-23T13:40:05+01:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2012-11-23T13:40:05+01:00] FATAL: Net::HTTPServerException: 403 "Forbidden"

Can anyone help me resolve the error ‘Net::HTTPServerException: 403 “Forbidden”’?

more →
1 514  
0
chef-client gets 500 error "Failed to update groups in client creation"

I’m trying to create a node based on a new vagrant / virtual box vm, and every time I run chef-client, I get a 500 error “Failed to update groups in client creation” from the opscode server. The server authenticates me, the node shows up on the platform dashboard, and everything seems to be fine right up to where I get the error, Then the node disappears.

What can I do to fix this?

more →
1 741  
0
How to manage client configuration for multiple organizations

When using hosted chef with multiple organizations (where organization is the right way to differentiate projects as opposed to setting environments) what is the best approach for managing the client configuration files?

I have separate organizations, each with their own validation key, and generated knife.rb configuration. On my workstations I have separate chef repos and chef client configuration directories for each organization.

But, how do I best manage /etc/chef/*?

I was thinking that I could create separate /etc/chef_ORGANIZATION directories to hold the appropriate configuration and validations, then just symlink /etc/chef to the org I’m working with.

Anyone have other suggestions on how to work with multiple orgs?

more →
0 381  
0
FATAL: Net::HTTPServerException: remote_file had an error: Net::HTTPServerException: 404 "Not Found"

I am facing this issue with CentOS 6.2 server (as a chef client) after adding the recipe yum::ius or yum::epel.

The same recipe is wworking fine with CentOS 5 Servers.

/usr/lib64/ruby/gems/1.8/gems/chef-0.10.10/bin/../lib/chef/application.rb:70:in run' /usr/lib64/ruby/gems/1.8/gems/chef-0.10.10/bin/chef-client:26 /usr/bin/chef-client:19:inload' /usr/bin/chef-client:19 [Wed, 06 Jun 2012 11:24:18 +0000] ERROR: Running exception handlers [Wed, 06 Jun 2012 11:24:18 +0000] FATAL: Saving node information to /var/chef/cache/failed-run-data.json [Wed, 06 Jun 2012 11:24:18 +0000] ERROR: Exception handlers complete [Wed, 06 Jun 2012 11:24:18 +0000] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

[Wed, 06 Jun 2012 11:24:18 +0000] FATAL: Net::HTTPServerException: remote_file[/var/chef/cache/epel-release-6-5.noarch.rpm] (yum::epel line 26) had an error: Net::HTTPServerException: 404 “Not Found”

I would appreciate if someone could please let me know what it means and how to resolve it.

more →
2 820  
0
cookbook upgrade to chef-client 1.2 breaks chef runs

I was running chef-client cookbook 1.1.2 on all of our instances (Ubuntu 10, 12). Just downloaded the latest chef-client 1.2 cookbook, modified appropriate attributes, then ran chef-client to upgrade to the new cookbook. Now I have problems with “Error Syncing Cookbooks” and “DEBUG: Re-raising exception: Net::HTTPServerException – 404 "Not Found”"

Any reason why the new cookbook would fail? This is very reproducible – happened on 30 instances already, so I had to revert to the old chef-client cookbook.

more →
0 148  
0
First run attributes on chef-client 11 for windows

Hi,

I have some troubles importing attributes at first run with chef-clietn 11 for windows. I have a json file “c:/chef/first-boot.json” with similar content

{“company”:{“company_name”:“My Company”},“run_list”:[“role[server_role]”]}

I start the client with this line

chef-client -c c:/chef/client.rb -j c:/chef/first-boot.json

I have a role, which is applied correctly and all recipes for that role are started to compile and run. However, if I want to use the “company” attribute at the first run, the attribute is missing (for example node[:company][:company_name] gives me “NoMethodError”, because node[:company] do not exist). If I do not use this attribute (i.e. all recipes pass trough the first run), the attribute node[:company] appears in the chef server and I can use it on the next run.

This method for first run attributes works well on linux chef-client. There I’m able to use the node[:company] attribute on the first run without any problems.

Am I doing something wrong or there is some limitation for chef-client for windows?

Here is my log from the console

chef-client -c c:/chef/client.rb -j c:/chef/first-boot.json -E dev INFO: Chef 11.4.0 INFO: Client key c:/chef/client.pem is not present – registering INFO: Setting the run_list to [“role[server_role]”] from JSON INFO: Run List is [role[server_role]] INFO: Run List expands to [testbook::compnay_set] INFO: Starting Chef Run for node01 INFO: Running start handlers INFO: Start handlers complete. INFO: Loading cookbooks [testbook] Synchronizing Cookbooks: – sag_base – testbook Compiling Cookbooks… ================================================================================ Recipe Compile Error in c:/chef/cache/cookbooks/testbook/recipes/compnay_set.rb ================================================================================ NoMethodError


undefined method `[]‘ for nil:NilClass

Cookbook Trace:


c:/chef/cache/cookbooks/testbook/recipes/install_dbc.rb:8:in `from_file'

Relevant File Content:


c:/chef/cache/cookbooks/testbook/recipes/install_dbc.rb: … 7: 8>> name = node[:company][:company_name] 9: …

ERROR: Running exception handlers FATAL: Saving node information to c:/chef/cache/failed-run-data.json ERROR: Exception handlers complete Chef Client failed. 0 resources updated FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out FATAL: NoMethodError: undefined method `[]‘ for nil:NilClass

more →
0 125  
0
chef client in 64bit for windows?

Is there a chef-client package for windows for 64bit systems?
Especially with ruby in 64bit? The 32bit implementation causes problems, e.g. ist starts processes from Syswow64 and then everything is written do syswow section of registry too.

more →
2 43
tho
 
0
Timeout with knife bootstrap windows winrm

I am receiving an error with my ‘knife bootstrap windows winrm FQDN’ command. It keeps timing out, and I’m not sure what I can do.

 C:\Users\USER>knife bootstrap windows winrm myserver.net
Bootstrapping Chef on myserver.net
Enter your password:
ERROR: Network Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) (http://myserver.net:5985)
Check your knife configuration and network settings
more →
0 23