Happy Constitution Day!

Today is Constitution Day.  It was the final day of what was then called The Grand Convention or The Federal Convention.  We now know that almost three month convention in Philadelphia as the Constitutional Convention.  The meeting place was then called the State House.  This building still stands, and is now called Independence Hall.  We recommend people make a trip to Independence Hall and the nearby The National Constitution Center in Philadelphia to learn more about how the Constitution was drafted,

How Do You Install the Zabbix Client on a RHEL 7.x Server in AWS?

Problem scenario
You have set up Zabbix server (i.e., using these directions).  How do you configure another RedHat Linux server in AWS to be configured with the client so the Zabbix will monitor it?

Solution

Section 1
1.  Make sure your AWS Security group (that governs this AWS instance that will be a client) allows for inbound connections from the internal IP address of the Zabbix server on any TCP port. 

Why Does PHP Return “Resource Id #2” Or “Resource Id #3”?

Problem scenario
In a LAPP stack deployment, a PHP variable is displaying a value “Resource id #2” or “Resource id #3.”  You are expecting a different value.  The PHP variable having the problem is the result of a SQL command ran against a PostgreSQL database.  What should you do?

Solution
Assuming that $var1 is displaying the undesirable “Resource id #2” or “Resource id #3”,

How Do You Troubleshoot “docker attach” Commands That Hang?

Problem scenario
You are using RedHat Linux in AWS.  You have installed Docker and have a running container.  You notice that “docker attach <docker ID>” commands are hanging.  What do you to get inside the container?

Solution
Use “docker ps -a” to find the Docker container’s name.  Then use a modified version of this draft of a command:

docker exec -it docker-name bash

#Replace “docker-name” above with the name of the Docker container as found from a “docker ps -a“command.

How Do You Edit Text inside a Docker Container?

Problem scenario
The server you have is a RHEL (RedHat Enterprise Linux) or Ubuntu instance.  You are in a Docker container that you pulled from the internet for Nginx.  Inside this Docker container you cannot use vi because it is not a recognized command.  What do you do to install a text editor in the Docker container?

Solution for non-SUSE Linux
#1  Inside the Docker container,

How Do You Get Nginx in a Docker Container to Log Web Server Activity to a Regular File inside the Container?

Problem scenario
Normally the Nginx web service logs operations (e.g., a user going to a website with a web browser).  By default Nginx Docker containers do not have good logging for web server usage.  You want regular Nginx logging inside the Docker container.  What do you do?

Solution
1.  Go inside the Docker container (e.g., docker exec -it <containerName> bash).  Go to /etc/nginx/

2. 

“No Day Shall Erase You From the Memory of Time”

While this quote from Virgil’s Aeneid is controversial in its 9/11 Museum usage, it is an interesting idea that people may be remembered no matter what happens in the future.

On Patriot Day, also known as the National Day of Service and Rememberance, we have the opportunity to reflect on Americans who have given the full measure of devotion to our country.  

How Do You Find the IP Address Assigned to a Docker Container When It Was Created?

Problem scenario
You have inherited several Docker containers to manage.  They were assigned IP addresses and assigned user-defined networks when they were created.  You do not know what IP addresses that they were given.  You want to know the IP addresses so you can add them to a load balancer.  The external IP address of the Docker host combined with identifying port numbers of the containers can create sockets that are unique. 

How Do You Troubleshoot the Docker Error “User specified IP address is supported only when connecting to networks with user configured subnets.”?

Problem scenario
You are trying to create a Docker image and assign it an IP address with the –ip flag. But you get this error: “/usr/bin/docker-current: Error response from daemon: User specified IP address is supported only when connecting to networks with user configured subnets.”  How do you get your Docker command to work and resolve this problem?

Solution
#1  From the Linux server,

How to Do You Install Apache Tomcat on Ubuntu Linux?

Problem scenario
You want to install Apache Tomcat on Ubuntu Linux.  How do you do this?

Solution
There are three separate ways of doing this.
Possible solution #1: Run this command: sudo apt-get -y install tomcat8
Possible solution #2: See this posting.
Possible solution #3:  Use these directions with one modification:  Step #3 has a URL that needs to be replaced with this URL:  http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v8.5.58/bin/apache-tomcat-8.5.58.tar.gz