How Do You Troubleshoot a Docker Container Supporting a Web Service That Web Browsers Cannot Seem to Reach?

Problem scenario
You have configured a Docker container with a web service (e.g., Apache web server or Nginx).  You configured the listening, external port to be 80 or a different port number.  You find the web server (either Apache or Nginx) is not working from a web browser.  How do you find what is wrong?

Solution
#1  Use nmap to test the port and IP address. 

Why Cannot You Ping a Server when Nmap Commands to The Server Work?

Problem scenario
You cannot ping a server, but your nmap results show that port 22 on the server is open. You can reach the server with nmap, but not with ping. What is wrong?

Possible solution
Is the server in the AWS Security Group that you think it is? Go to the AWS console and verify the security group for the server is what you think is correct.

How Do You Quickly Add a New Event to the Windows Logs Using PowerShell?

Problem scenario
You like adding logging messages manually in Linux/Unix. You do it from the command prompt with “# write a cool message here”. You review the messages with a “history” command. You also append messages to log files in /var/log/foorbar.d with ‘echo “note this” ‘. How do you introduce your own messages into Windows event log?

Solution
Run a command like this but change “Application” to “Security” or whichever log category you want:

Write-EventLog -LogName Application -EventId 3 -Message “Continual Integration helps!” -Source “Windows Error Reporting”

# Note that “Windows Error Reporting” is just one of several valid sources. …

How Do You Get Apache Web Server Configuration File Changes To Take Effect without Interrupting the Service?

Problem scenario
You want to change the main configuration file for Apache web server (e.g., httpd.conf). But you do not want to drop current web surfers viewing the website. How do you change a security module or listening port for an Apache web server and have the changes take effect without interrupting the service by doing a regular restart?

Solution
Use the “graceful” directive.

How Do You Troubleshoot the Installation of Apache Accumulo on Linux?

Problem scenario
You are trying to install open source Accumulo on Linux. You have two GB of swap space. You have installed Java, Hadoop, and Zookeeper. You have run the bootstrap_config.sh script for Accumulo 1.9.2.

You run this (and expected it to work): /bin/accumulo-1.9.2/bin/accumulo init

But you get this error:

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, …

How Do You Set Up a Multi-Node Cluster of Zookeeper?

Problem scenario
You want to set up Zookeeper with three nodes in AWS. What do you do?

Solution
1. Install Zookeeper on each of the servers. If you need assistance with this, see this posting.

2. Modify the zoo.cfg file on each of the servers. Add stanzas like these but substitute foobarX.amazonaws.com with the Public DNS name of each server:

server.1=foobar1.amazonaws.com:2888:3888
server.2=foobar2.amazonaws.com:2888:3888
server.3=foobar3.amazonaws.com:2888:3888
initLimit=5
syncLimit=5

3.

What Is The Difference between an A Record and a PTR Record in DNS?

Problem scenario
You have heard of A records and PTR records. But you do not know the difference. What is the difference?

Solution
The short answer is that they are opposites of each other in the context of DNS.

An A record maps a domain name to an IP address (pg 858 of A Practical Guide to Fedora and Red Hat Enterprise Linux).

How Do You Do Variable Expansion with an Ansible Playbook without Introducing Punctuation?

Problem scenario
You use a variable in an Ansible playbook. The value of the variable is surrounded by quotes and brackets. You may refer to it as punctuation [“”]. You want to assign the variable without the new symbols such as ‘[“”]’. How do you get just the value and no punctuation?

Solution
Do not use quotes or square brackets “[]” around the variable.