Chef exit codes

Chef uses the standard RFC 062 exit codes. In your .kitchen.yml file, you can supply an array of exit codes in the “retry_on_exit_code” option to retry the operation in case the Chef script execution is interrupted. The usual values are retry_on_exit_code: # An array of exit codes that can indicate that kitchen should retry the converge …

FATAL: Chef::Exceptions::Reboot: Rebooting server at a recipe’s request.

When your Chef recipe requests a reboot using the “reboot” Chef resource, the output window shows an error message: Chef Client finished, …/… resources updated in … seconds […] WARN: Rebooting server at a recipe’s request. Details: {:delay_mins=>1, :reason=>”…”, :timestamp=>…, :requested_by=>”…”} Running handlers: […] ERROR: Running exception handlers Running handlers complete […] ERROR: Exception handlers complete Chef …

Unable to satisfy constraints on package

When you make a change to the version restrictions in the metadata.rb file and execute berks install in your Chef cookbook directory, you may get the error message: Unable to satisfy constraints on package … due to solution constraint (…). Solution constraints that may result in a constraint on …: [(…)], [(…) -> (…)] Demand that …

amazon-ebs: Error waiting for SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

When you launch a Linux AWS EC2 instance with Terraform or create a Linux AWS image with Packer, one of the following errors are displayed: amazon-ebs: Error waiting for SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain aws_instance.default: 1 error(s) occurred: * ssh: handshake failed: ssh: unable to …

delimited by end-of-file (wanted `EOF’)

When you create a file in a script and use an end of file delimiter, if … cat <<EOF> $chef_dir/attrib.json $json EOF fi and you indent the word EOF to look nicer, you will get the error message warning: here-document at line … delimited by end-of-file (wanted `EOF’) STDERR> …: line …: syntax error: unexpected end of file …

could not find filename for attribute .DS_Store in cookbook

The Macintosh workstation saves application states in .DS_Store files. When you edit your Chef cookbooks the MacOS leaves these files in many folders. When the Chef cookbook is executed, the Chef Client reads all files in the attributes folder and tries to extract values from them. If the .DS_Store file is uploaded with the rest of …

TeamCity Agent Unmet Requirements

When a TeamCity configuration is created there are requirements the TeamCity Agent has to meet. The creator of the build configuration can specify Explicit Requirements on the Agent Requirements page of the Build Configuration Settings. When the build configuration is created, TeamCity automatically adds Build Step Requirements. The bottom of the same page shows the list …

Create a Splunk index

Splunk stores the events in separate databases based on index names. It is faster to search for events if the event types are separated into multiple indexes. To create an index for the event type you want to send to Splunk In the Settings menu select Indexes Click the New Index button Enter the name of the …

Enable the HTTP Event Collector in Splunk

To send events to Splunk via HTTP posts, enable the HTTP Event Collector functionality on the Splunk Enterprise server. If you operate your own Splunk server Log into the Splunk web interface as an administrator In the Settings menu select Data inputs Select the HTTP Event Collector link In the upper right corner click the …

How to send an event to the Splunk HTTP Event Collector

The Splunk HTTP Event Collector is the preferred way to send events to Splunk. The Splunk HTTP Event Collector closes the connection if you don’t use HTTPS when you are sending a POST message. Recv failure: Connection reset by peer To send the event from the Macintosh Bash terminal curl -k https://MY_SPLUNK_SERVER_IP:8088/services/collector -H ‘Authorization: Splunk MY_TOKEN’ …