How Do You Troubleshoot the Message “jq: error…Cannot iterate over null”?

Problem scenario
You are running a jq command (e.g., piping output to jq). You receive message “jq: error…Cannot iterate over null.” What should you do?

Solution
Change the word “Parameters” to “Parameter”. By omitting an “s” from “Parameters”, the error may go away.

Verify there is output. Try running the command without the “jq” utility if possible. This error can happen if there is no output to parse.

How Do You Get an Ansible Playbook to Not Skip a Section?

Problem scenario
You are running a playbook. A section is being skipped. When you use “-vvvv” to enhance the verbosity of the output messages, you see “Condition result was false”. How do you get the playbook section that is being skipped to execute?

Solution
The most likely cause is that you have a “when” statement that governs the clause of the playbook that is being skipped.

How Do You Troubleshoot the AWS CLI Error “Invalid Document Name”?

Problem scenario
You run an AWS SSM command. You receive “An error occurred (ValidationException) when calling the CreateDocument operation: Invalid document Amazon…” What do you do to get the command to work?

Solution
Document names cannot begin with three strings (regardless of capitalization): “aws”, “amazon”, or “amzn”.

Change the document name to not have a string such as one of the above.

Using Python How Do You Run Bash Commands That Include More Than One Word?

Problem scenario
You are trying to have Python run Bash commands. As soon as the command includes a flag or a second argument, there is no value being assigned in Python. Two or more words in the Bash command cause no value to be assigned. What can you do?

Solution
This only works if you have complete control of the Bash command arguments.

How Do You Troubleshoot the Error “DNS: A new record cannot be created. Refused.”?

Problem scenario
Using Windows Server and Active Directory, you try to add a PTR record to a Reverse Lookup Zone. You get “DNS: A new record cannot be created. Refused.” What do you do?

Possible Solution #1
Click “Ok” to the pop up. Continue where you were interrupted. The error message should be ignorable (other than the fact that you have to click “Ok” to the pop-up itself and the window to create a New Resource Record).

How Do You Get to the Nice HTML Presented Installation Web Page for Craft CMS?

Problem scenario
You are trying to install Craft CMS, but when you go to the web browser, you see this:

HTTP 503 – Service Unavailable – craft\web\ServiceUnavailableHttpException
in /var/www/html/craft/vendor/craftcms/cms/src/web/Application.php
537538539540541542543544545546547548549550551552553554555
$actionSegs = $request-getActionSegments();
if (isset($actionSegs[0]) && $actionSegs[0] === ‘install’) {
return $this-_processActionRequest($request);
}
}

// Should they be accessing the installer?
if (!$isInstalled) {
if (!$isCpRequest) {
throw new ServiceUnavailableHttpException();
}

// Redirect to the installer if Dev Mode is enabled
if (YII_DEBUG) {
$url = UrlHelper::url(‘install’); …

How Do You Solve the AWS CLI Problem where You Get “aws: error: argument –name is required”?

Problem scenario
You run an “aws” command but receive “aws: error: argument –name is required”
What do you do to troubleshoot this?

You have the “–name” flag in the command, or you know the command should work as it is written.

Solution
Are you using the word “get” instead of the word “send”? Analyze your command closely. There may be a syntax error.

How Do You Troubleshoot the Ansible Message “ERROR! the field hosts is required but was not set”?

Problem scenario
You run an ansible-playbook command, but you get “ERROR! the field hosts is required but was not set”. What should you do?

Solution
Find the hyphens beneath the top “- name” stanza. Eliminate them. For example, if your playbook looks like this:

– name: Foobar
hosts: localhost
– vars:
goodone: “blahblah”
-tasks:

Make it look like this:

– name: Foobar
hosts: localhost
vars:
goodone: “blahblah”
tasks:

Now re-run it.