How Do You Troubleshoot the Terraform Error “Unable to evaluate directory symlink: lstat”?

Updated on 6/4/22 to include possible solutions 2 through 4.

Problem scenario
You are running a terraform command, but you receive this error:

Initializing modules…
– website_contint_bucket in
Error: Unreadable module directory
Unable to evaluate directory symlink: lstat foobar: no such file or directory
Error: Failed to read module directory
Module directory does not exist or cannot be read.

How Do You Install the docker.service File on RHEL 8.x?

One of the following problems occurs:

Problem scenario #1
You run some systemctl commands to start the Docker service, but you get this error: “Failed to enable unit: Unit file docker.service does not exist.”
Or you run some other command and see this:
“Unit docker.service not found.”
What should you do to get the docker.service file on a RHEL 8.x server?

Problem scenario #2
You are running a kubeadm command on RHEL 8,

How Do You Get Python to Parse Web Pages to Find a String?

Problem scenario
You know a string is buried in a series of web pages. How do you get Python to read the web pages and find the string?

Solution
Change the URLs as you desire. Change the “searchterm” variable assignment to the word of your choice. Then run this Python 3 program:

import re
import requests
listofurls = [‘https://www.continualintegration.com/’, ‘https://www.continualintegration.com/miscellaneous-articles/page/1/’, …

What is Envoy in Kubernetes?

Question
What is Envoy in Kubernetes?

Answer
“Originally built at Lyft, Envoy is a high performance C++ distributed proxy designed for single services and applications, as well as a communication bus and “universal data plane” designed for large microservice “service mesh” architectures. Built on the learnings of solutions such as NGINX, HAProxy, hardware load balancers, and cloud load balancers, Envoy runs alongside every application and abstracts the network by providing common features in a platform-agnostic manner.

How Do You Know the Entrenchments in the U.S. Constitution Exist?

Problem scenario
You read that there were two entrenchments in the U.S. Constitution. How do you know that they exist?

Answer
An entrenchment is the placement of something in a trench (according to Merriam-Webster’s Dictionary). This connotes a defensible and protected area (e.g., for warfare). For a document constituting a government, an entrenchment is theoretically unmodifiable whereas the rest of the document is subject to being changed.

How Do You Troubleshoot the Error “java.lang.IllegalArgumentException: query.max-memory-per-node set to 1GB, but only 80530637B of useable heap available”?

Problem scenario
You try to start Apache Presto. But you get an error like this:

2020-09-29T19:28:25.866Z WARN main io.airlift.jmx.JmxAgent Cannot determine if JMX agent is already running (not an Oracle JVM?). Will try to start it manually.
2020-09-29T19:28:25.916Z INFO main io.airlift.jmx.JmxAgent JMX agent started and listening on ip-172-31-103-99.us-east-2.compute.internal:44377
2020-09-29T19:28:26.030Z ERROR Discovery-0 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (collector/general): Lookup of collector failed for http://localhost:8080/v1/service/collector/general
2020-09-29T19:28:26.066Z ERROR Discovery-2 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (presto/general): Lookup of presto failed for http://localhost:8080/v1/service/presto/general
2020-09-29T19:28:27.161Z WARN http-client-shared-29 com.facebook.presto.metadata.RemoteNodeState Error fetching node state from http://172.31.103.99:8080/v1/info/state: Server refused connection: http://172.31.103.99:8080/v1/info/state
2020-09-29T19:28:28.227Z ERROR main com.facebook.presto.server.PrestoServer Unable to create injector,

How Do You Troubleshoot Presto Errors Like “java.lang.RuntimeException: java.net.BindException: Address already in use”?

Problem scenario
You are getting errors when you run Apache Presto like these:

2020-09-29T19:54:59.630Z ERROR Discovery-0 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (collector/general): Lookup of collector failed for http://localhost:8888/v1/service/collector/general
2020-09-29T19:54:59.828Z ERROR Discovery-0 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (presto/general): Lookup of presto failed for http://localhost:8888/v1/service/presto/general
2020-09-29T19:55:02.734Z INFO Discovery-0 io.airlift.discovery.client.CachingServiceSelector Discovery server connect succeeded for refresh (collector/general)
2020-09-29T19:55:02.756Z INFO Discovery-1 io.airlift.discovery.client.CachingServiceSelector Discovery server connect succeeded for refresh (presto/general)
2020-09-29T19:55:05.303Z INFO main org.eclipse.jetty.server.Server jetty-9.3.9.M1
2020-09-29T19:55:05.359Z WARN main org.eclipse.jetty.server.handler.AbstractHandler No Server set for org.eclipse.jetty.server.handler.ErrorHandler@68b366e2
2020-09-29T19:55:07.050Z INFO main org.eclipse.jetty.server.handler.ContextHandler Started o.e.j.s.ServletContextHandler@3513c84c{/,null,AVAILABLE,@http}
2020-09-29T19:55:07.303Z INFO main org.eclipse.jetty.server.Server jetty-9.3.9.M1
2020-09-29T19:55:07.330Z WARN main org.eclipse.jetty.server.handler.AbstractHandler No Server set for org.eclipse.jetty.server.handler.ErrorHandler@61da0413
2020-09-29T19:55:07.688Z INFO main org.eclipse.jetty.server.handler.ContextHandler Started o.e.j.s.ServletContextHandler@336f49a1{/,null,AVAILABLE,@http}
2020-09-29T19:55:07.975Z ERROR main com.facebook.presto.server.PrestoServer Unable to create injector,

How Can a Linux Have a Load above 5 with a High Percentage of CPU Being Idle?

Problem scenario
You are using Linux, and you run top, and you see this:

top – 21:38:04 up 14 days, 12:12, 1 user, load average: 5.30, 5.10, 4.90
Tasks: 54 total, 15 running, 39 sleeping, 0 stopped, 0 zombie
%Cpu(s): 11.7 us, 13.7 sy, 0.0 ni, 74.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st

How can the load average be so high with so much CPU being idle?

How Do You Find Out what kubectl Commands Correspond with Revision Numbers in the “rollout history”?

Problem scenario
When you run a kubectl rollout history deployment foobar command, the “CHANGE-CAUSE” is empty for certain rows (revision numbers). What can you do to keep this column with useful descriptions (or relevant commands)?

Possible Solution #1
Going forward, use the –record flag when running kubectl create [deployment] or kubectl set image deployment … commands.

Possible Solution #2
Manually edit the manifest of the resource in the deployment.