Skip to main content

Chef InSpec Troubleshooting

Exit code 5

You tried to execute a function with a signed profile, but the signature is either bad or InSpec couldn’t find the validation key. For more information, see the profile signing documentation.

Exit code 6

You enabled mandatory profile signing and tried to execute a function with an unsigned profile. For more information, see the profile signing documentation.

Exit code 174

Exit code 174 comes from running Chef InSpec 6 or greater without setting a Chef License key. See the InSpec install documentation for setting a Chef License key. See the Chef License documentation for more information about Chef licensing.

Undefined Local Variable or Method Error for Cloud Resource

This error is a result of invoking a resource from one of the cloud resource packs without initializing an InSpec profile with that resource pack (AWS, Azure, or GCP) as a dependency.

Chef InSpec profiles that use any cloud resource must have the resource pack defined as a dependency.

See the relevant resource pack readme for instructions:

License is not entitled to use InSpec

The license key set with Chef InSpec is not entitled to use Chef InSpec. Each license key is entitled to one or more Chef products. To view the products that your key is entitled to, run the inspec license list command, which will list your license entitlements.

To resolve this issue, set a license key that is entitled to Chef InSpec.

See the Chef Licensing documentation for more information.

Unable to connect to the licensing server. InSpec requires server communication to operate

Chef InSpec cannot connect to Chef’s licensing service or a user-deployed Chef Local License Service. This service is responsible for validating the Chef license key set with Chef InSpec.

Check the following possible causes of this issue:

  • Network Connectivity

    Ensure that the machine running Chef InSpec has proper network connectivity. It should be able to connect to Chef’s licensing service or a user-deployed Chef Local License Service. This includes checking firewall settings and network configuration.

  • Service Availability

    If you’re using a user-deployed Chef Local License Service, verify that it’s correctly configured and operational. Any misconfigurations or issues with the Chef Local License Service could lead to connection problems.

  • URL Configuration

    If you’re using a Chef Local License Service to manage Chef licenses, verify that the URL to the server is correct.

    If you configured the URL using an environment variable, check the value for environment variable CHEF_LICENSE_SERVER to confirm the configured URL.

    If you configured the URL using the --chef-license-server InSpec CLI option, reset the URL using the same InSpec CLI option.

  • Logs and Debugging

    Check the logs generated by Chef InSpec by using --log-level debug for more detailed error messages. Pay close attention to the URL that Chef InSpec is attempting to connect to.

If the issue persists, please reach out to Chef’s Customer Success managers or Support Team.

Invalid File Format Version

Chef licensing data is stored on the $HOME/.chef/licenses.yaml file.

The file format version used in the licenses.yaml file is unsupported or invalid. The licenses.yaml file must have the latest supported file format version.

Restore the file to the original state to resolve this issue.

License file contents are corrupted

Chef licensing data is stored on the $HOME/.chef/licenses.yaml file.

The licenses.yaml file is malformed and corrupt.

Restore the file content to its original state to resolve this issue.

Edit this page on GitHub

Thank you for your feedback!

×











Search Results