How Do You Troubleshoot “550 5.1.1 johndoe@example.com: Recipient address rejected: User unknown in local recipient table”?

Problem scenario
You are using Postfix. You are trying to send emails directly from the Postfix server. After you use telnet and helo commands, you enter a recipient like this:

rcpt to: johndoe@example.com

But you get this error:

“550 5.1.1 johndoe@example.com: Recipient address rejected: User unknown in local recipient table”

What should you do?

Root cause
If you change the /etc/postfix/main.cf file to have emails use a “reply-to” of example.com,

In Python How Do You Print Three Integers Separated by a Space on the Same Line?

Problem scenario
You want to print three integers. You do not want to convert them to be part of a string. You want a space to separate each integer. How do you do this in Python?

Solution
Assuming your variables are x, y, and z, and they are integers, use a line like this:

print(x, y, z)

Here is a complete program that proves it works:

x = 5
y = 3
z = 100
print(x, …

How Do You Write a Python Program to Download the Images of a Website?

Problem scenario
You want to download pictures (e.g., .png, .jpeg etc.) from websites. How do you use Python to download such files?

Solution
Use this program with a subdirectory in the directory that this program resides to receive the picture files.

“””
dwldimages.py
Downloads all the images on the supplied URL, and saves them to the
specified output file (“/test/” by default)

Usage:
python dwldimages.py http://example.com/ /tmp/test/ # where /tmp/test/ is the directory you want to save the image files to. …

How Do You Assign a Variable in Groovy to Be an Integer Value?

Problem scenario
A Groovy program is returning an incorrect value for an integer variable. What is wrong?

Possible solution #1
Check the logic of your program. Use the println command to see the earliest point when this variable is assigned an incorrect value. This helps you pinpoint the problem.

Possible solution #2
Is the variable being assigned a number in quotes like this?

Why Cannot You Ping an IP Address of an AWS Server when the Security Group Should Allow for Pinging?

Problem scenario
In AWS you manually added a Security Group rule for the source of a given IP address. This IP address is either the internal or external IP address. You can ping one of them (either the internal or external IP address). Why cannot you ping each IP address?

Solution
Check to see if a firewall is running on the Linux server.

How Do You Run an Ansible Playbook?

Problem scenario
You want to run an Ansible playbook to push configuration changes down (e.g., transfer files to managed nodes). How do you do this?

Solution
Prerequisites
This assumes that you have set up Ansible. If you need directions for deploying an Ansible control server, see this posting. If you need directions for deploying a managed node after the central Ansible server has been set up,

How Do You Solve the Linux Error “hostname: Name or service not known”?

Problem scenario
You run hostname -f and you get this error: “hostname: Name or service not known”

How do you solve this problem?

Solution
Do these things in this order:

  1. Verify you have the hostname in the /etc/hostname file.
  2. Verify the name above matches what is in /etc/hosts for the local IP address.
  3. Try rebooting the server.

What Should You Do when the Apache Mesos Web UI Keeps Refreshing and Sending a Pop-up “Failed to connect to …:5050”?

Problem scenario
You deployed Apache Mesos. The web UI is having problems. You see the error “Failed to connect to x.x.x.x:5050.” What should you do?

Solution

  1. Go to the back-end of the Apache Mesos server. Run this command: sudo systemctl stop mesos-master
  2. sudo find / -name mesos-master.sh
  3. Change directory into the parent of the “bin” directory that houses the mesos-master.sh as found above.

How Do You Write a Java Program to Read in Letters and Numbers?

Problem scenario
You want to create a basic Java program that can read alphanumeric input interactively. How do you write such a program?

Solution
1. Verify the “javac” command works. Run “man javac” to see the man page. If you do not get a man page, install the Java development tools. On a RedHat derivative, run this: sudo yum -y install java-devel

2.