How Do You Know if Hadoop is Installed (and the version if it is installed) on Linux SUSE?

Problem scenario
You are administering Linux SUSE machines. You want to see if Hadoop is installed on them. The command hadoop version does not work.

Solution
Run this command:

sudo find / -name hadoop -type f

From the results above, you can probably find the file and path of the executable. It will likely not be in /var/ or /tmp/.

How Do You Troubleshoot the GitLab Installation Error “dpkg: error processing package gitlab-ee…post-installation script returned error exit status 1”?

Problem scenario
You are trying to install GitLab, but you get this error:

“dpkg: error processing package gitlab-ee (–configure):
subprocess installed post-installation script returned error exit status 1″

What do you do?

Possible solution #1
Is Jenkins running on the server? Is a service running on port 8080? Can you stop any process running on port 8080 and try again?

How Do You Troubleshoot “Errno::ENOMEM: Cannot allocate memory -” or Some Other “out of memory” Error in Linux?

Problem scenario
You go to /var/log/ for the program or application that is not working properly. You look for the word “error.” You see HeapDumpOnOutofMemoryError or “OnOutOfMemoryError=kill -9” messages.

Or you get this error on the terminal that says “Errno::ENOMEM: Cannot allocate memory.” How might you troubleshoot out of memory errors on Linux?

Solution

Possible solution #1
Add more memory,

What Are The Different Statuses of Individual Docker Containers?

Question
In Docker what are possible status values of containers?

Answer
Possible statuses include the following:

created, restarting, running, removing, paused, up, exited, or dead

Sources: 1) https://docs.docker.com/engine/reference/commandline/ps/ (for every one except “up”)
2) https://www.thegeekdiary.com/how-to-list-start-stop-delete-docker-containers/ (for “up”)

The docker create command when used with a Docker image ID will produce a new container in the “Created” state.

How Do You Troubleshoot the Golang Error “missing function body”?

Problem scenario
You run a Golang program with a function that uses a map. You get this error:

./foobar.go:33:6: missing function body
./foobar.go:33:44: syntax error: unexpected {, expecting comma or )

What should you do?

Solution
Omit the “{}” in passing map data types to the function. The syntax for declaring a map will include {}.

Here is an example of how to properly define a map:

goodmap := map[string][5]string{}

But when you are defining a function that will accept a map as a parameter,

How Do You Troubleshoot “no context directory specified, and no dockerfile specified”?

Problem scenario
You run a command like this: docker build -t “ricepaper:contint”

But you receive a message such as this:

Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
no context directory specified, and no dockerfile specified

How do you resolve this problem?

Solution
Use a space and a period at the end of the command.

What is ChatOps?

Question
What is ChatOps?

Answer
ChatOps is the integration of a chatroom (e.g., Slack, HipChat, etc.) with the controls of an API (e.g., a REST API) to invoke DevOps or systems administration tasks. ChatOps chatrooms allow for text communication in real-time. In a ChatOps chatroom there is a syntax for messages to reboot a server or deploy code. Issuing such commands allows for centralized logging and close communication with many people.

How Do You Know if You Have Helm Installed and what Version You Are Using?

Problem scenario
You want to use Helm to manage Kubernetes applications. Helm helps you with packages for changes to Kubernetes (in ways that are similar to yum or apt). Helm uses what are call Charts (.yaml files) that enable you to do more with Kubernetes with less trouble. Helm consists of these two things: a CLI tool and a server component that runs as a pod in a Kubernetes cluster (page 531 of Kubernetes in Action by Luksa).

What Are the Recommended Practices of Logging?

Problem scenario
The primary purposes of logging include troubleshooting (root cause analysis of poor performance, debugging unintended behavior, or resolving catastrophic failures). In some cases logging is used for monitoring of resource utilization and planning of changes. What patterns or characteristics of a good logging system (consistent with what some may phrase as “best practices”)?

Solution
Here are 13 traits of good logging.