How Do You Know if Your Logging is Truly in JSON Format or Not?

Problem scenario
You are not sure if you have valid JSON or not. You have converted raw logs of an application to be in JSON format. There is a flat file receiving what you believe to be valid JSON. How do you know for sure?

Solution
Put the JSON in here https://jsonformatter.curiousconcept.com/ and click “Process”.

The JSON should start with an opening brace { and end with a closing brace }.

How Do You Troubleshoot the Message ‘ERRO[0000] cannot setup namespace using newuidmap: exit status 1’?

Problem scenario
How do you resolve the Docker error ‘ERRO[0000] cannot setup namespace using newuidmap: exit status 1’?

Possible Solution #1
Reboot the Docker host.

Possible Solution #2
Good commands to help understand what might be going on are lsns, sudo lsns, and man nsenter

How Do You Change the Time Zone to the Eastern Time Zone of the U.S. With a CentOS 6.X Server?

Problem scenario
You run the date command on Linux and find that your server is not configured for the Eastern time zone and/or the ntp daemon is not running. What should you do?

Solution
Run these commands:

sudo /etc/rc.d/init.d/ntpd start
ls -l /etc/localtime
sudo cp /etc/localtime /root/old.timezone
sudo rm /etc/localtime
ln -s /usr/share/zoneinfo/American/Boston /etc/localtime
sudo ln -s /usr/share/zoneinfo/America/New_York /etc/localtime

This solution was adapted from this external posting.

How Do You Paste Text from a Windows Environment into a PuTTY Terminal?

Problem scenario
You want to paste text into a PuTTY terminal. But it is not working. What should you do?

Solution
Once in the vi session, use this command (in command mode): :set mouse=

Now when you enter insert mode (by press “i”), you will be able to paste text that you copied from another source.

If you want to permanently set it (so every vi session automatically will accept pasted text once you enter insert mode),

How Do You Troubleshoot This Error “502 Whoops, GitLab is taking too much time to respond.”?

Problem scenario
You try to log into GitLab for the first time, but you get this error:

“502 Whoops, GitLab is taking too much time to respond.”

What should you do?

Solution
Go to the back end of the server. Run the top command. Is the left most load average above 1 (e.g, 1.08)?

The top line of the results of the top command will look something like this:

load average: 1.08,

How Do You Get Linux to Use a Camera with No GUI Environment (e.g., a crontab execution)?

Problem scenario
You have a Python program that takes a picture with a USB-attached camera. But when the crontab runs the program, the program does not work. You want vlc or some camera application to launch and capture a photo when the Python program is run with a crontab execution. You want a solution to work if you are logged into a terminal with Putty with no desktop GUI logged in.

Where Can You Find a List of PowerShell Version 5 Commands?

Problem scenario
You want to see every PowerShell 5 command available. What should you do?

Solution
This may not show every PowerShell v. 5 command, but it will show many: Get-Command

Another was is to open Windows PowerShell then go to View -Show Command Add-On. The list will be different if you are running Windows in Google Cloud Platform or AWS.

How Do You Troubleshoot Messages about a markupsafe Fatal Error, C Extension Not Being Compiled, And/Or a Syntax Error with async when You Are Trying to Build a Docker Image?

Problem scenario
You wrote a Dockerfile. You are using it to try to create a Docker image. When you run the “docker build” command you get some error messages. The errors include one or more of the following:

1) A MarkupSafe fatal error related to Python.h.
2) A C extension not being compiled.
3) An invalid syntax error related to async (e.g., “Jinja2/jinja2/asyncfilters.py”).

You need to base the image off Ubuntu.