Why Does a User Not Have Access to a VPC when The Configuration Appears to Allow For Connectivity?

Problem scenario
A user has no access to a VPC from her workstation. What are three ways a user can be given access to resources in a VPC?

Four Possible, Independent Solutions

  1. Network Access Control lists. These are IP address firewalls for the VPCs themselves. Based on the IP address of the user's workstation, Network Access Control lists can allow or disallow traffic to the VPC.
  2. Security Groups. These are two-way firewalls that have inbound and outbound rules for EC-2 instances and other AWS components. Based on the IP address of the user's workstation, the Security Group and can allow traffic to the VPC.
  3. AWS Active Directory Services. If your enterprise has Windows desktops, you can use AWS Active Directory Services. The centralized authentication can allow or disallow the user from gaining access to a VPC. To learn more, see this link https://aws.amazon.com/directoryservice/
  4. On-premise routers and firewalls that do not allow connectivity to the internet or to AWS VPCs.

How Do You Solve Jira’s Web UI Problem of Refreshing Rapidly?

Problem scenario
Jira refreshes rapidly and indefinitely when you log in or go to a specific link. Jira's web UI is unusable. What should you do?

Solution
Root cause: A full URL may not be browsable directly yet.

Procedures
Browse to a dashboard of home page. There may be a "Welcome" guide that was skipped.

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. This condition is false -- at least that is what the Ansible engine thinks. Check the logic of the "when" statement that pertains to the section of the playbook not running.

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.

n.b. The error message, as of early 2020, is not very helpful. We hope Amazon will provide a better error message in the future.

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. This should not be done with uncleansed data (e.g., user input). Use the shell=True argument (if you know it will be acceptable from a security perspective):

import subprocess
…
proc = subprocess.Popen(['ls', '-lh'], shell=True, stdout=subprocess.PIPE)

# Some people caution against the stdout=subprocess.PIPE.  The biggest potential security flaw is the shell=True however.  Use with care.

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).

Possible Solution #2
Try again. For some reason you may need to add the record twice for one to work.

Possible Solution #3
Avoid using the MMC and use PowerShell and a flat .txt file instead. To see how, click here.

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');
            $this->getResponse()->redirect($url);
            $this->end();
        }

or "Invalid Configuration"

What should you do?

Solution
In the directory in the URL that you get this message, try adding this: "index.php?p=admin/install "

The URL should be something like this (but repalce "FQDNofCraftCMSServer" with the appropriate DNS server): http://FQDNofCraftCMSserver/craft/web/index.php?p=admin/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. (The root cause of this problem in all likelihood is syntax.)