How Do You Access the SonarQube Web UI When It Is Only Listening on the 127.0.0.1 IP Address?

Problem scenario
SonarQube is listening on the loopback IP address on port 9000.  SonarQube is not listening on the external IP address.   You want to access the web UI for SonarQube. What should you do?

Solution
Install a web server and configure it to connect to port 9000.  Here are the details for using Apache web server on a Red Hat derivative (e.g., CentOS/RHEL/Fedora).

1. 

How Do You Create a .ppk File from a .pem File?

Problem Scenario
You want to use a key kair to log into AWS instances. You created an AWS EC-2 instance (aka a virtual machine or server) running Linux.  You want to connect to this Linux server (a VM).  You created a key pair when you created this VM.  You downloaded the .pem file.  You need a .ppk file to log in.  What should you do?

Solution
1. 

How Do You Troubleshoot “permission denied” when Trying to Clone a Git Repository That You Should Have Access to?

Problem scenario
You configured the source repository (in GitHub, GitLab, in BitBucket or elsewhere) to allow your user to have permissions to read the repository.  You run git clone but you get a “permission denied” error.  What should you do?  

Possible solutions
The Linux server you are on may not give your Linux user permissions to write to the destination directory.  Can you clone the repository to the /tmp/ directory? 

What Do You Do when an Ansible Playbook Is Not Removing a File or Directory or Unmounting a Directory when There Are No Errors?

Problem scenario
You run a playbook, and there are no errors.  But the playbook’s simple logic is not working.  The file or directory is not being eliminated.  Or the unmount of the directory is not working via the mount module.  What should you do about a silently failing playbook?

Solution
1.  Verify there are no [trailing] spaces in the directory path.  If you accidentally quote a space after the last subdirectory or file,

Why Is a GitLab Webhook That Integrates with Jenkins Failing with a “500 …instance_identity.InstanceIdentity.get …” error?

Problem scenario
A GitLab webhook (aka integration) fails.  It used to work as an integration mechanism with Jenkins.  The GitLab error message says:

“500 <!DOCTYPE html> … at org.jenkinsci.main.modules.instance_identity.InstanceIdentity.get(InstanceIdentity.java:133)”

Solution
Go to the Jenkins server and reinstall the GitLab plugins.

How Do You Troubleshoot the Ansible Playbook Error “fatal: FAILED! => {“msg”: “The conditional check “?

Problem scenario
You run an Ansible playbook that uses a variable, but you get the message “fatal: FAILED! ={“msg”: “The conditional check …The error was: error while evaluating conditional (ansible_hostname == ):”.  What should you do?

Solution
When testing a variable’s value to another fixed string, put quotes around the string.  

Here is an incorrect example of a playbook using such a comparison:

     

How Do You Troubleshoot the Git Error Fatal Foobar.Git Does Not Appear to Be a Git Repository?

Problem scenario
You run a git command and you get an error like this:

“fatal: ‘root/contint.git’ does not appear to be a git repository
fatal: Could not read from remote repository.”

The git command works on the server with the git repository.  But from another server you get the error above.  What should you do?

Solution
Find the full path to the git repo file. 

How Do You Use Amazon DynamoDB?

Problem scenario
You want to use a NoSQL solution from a public cloud provider. How do you deploy Amazon DynamoDB to try it out?

Solution
1.  Log into AWS.
2.  In the web browser, go to https://console.aws.amazon.com/dynamodb/home
3.  Click “Create table”
4.  Enter the fields as you find appropriate.  It should be self-explanatory.  Click “Create”.
5.  You can now create items in the table,

How Do You Troubleshoot SonarQube Not Working when the Logs Have a Comment about Not Being Able to Connect to the Database?

Problem scenario
In the SonarQube logs you get an error “java.lang.IllegalStateException: Can not connect to database.  Please check connectivity and settings (see the properties prefixed by ‘sonar.jdbc’)”

How do you troubleshoot this error?

Solution
1.  Verify you can ping the hostname.  

2.  Test the port with nmap (e.g., “nmap -p 1521 <databaseFQDN>” where <databaseFQDN> is the hostname of the database and 1521 is the port you configured in the stanza with “sonar.jdbc”).