How Do You Troubleshoot the GCP BigQuery Error ‘Table name “foobar” missing dataset while no default dataset is set in the request’?

Problem scenario
You run a BigQuery query. But you get a pop-up message that says ‘Table name “mockdata” missing dataset while no default dataset is set in the request.’

What should you do?

Solution
Did you specify a dataset (or database name) before foobar?

For example, if your dataset is called “cool”, your BigQuery query should refer to “foobar” as “cool.foobar”.

How Do You Troubleshoot ‘Exception in thread “main” java.lang.NullPointerException org.apache.hadoop.mapreduce.tools.CLI.displayJobList’?

Problem scenario
When you run hadoop commands, you get an error like this:

Exception in thread “main” java.lang.NullPointerException
at org.apache.hadoop.mapreduce.tools.CLI.displayJobList(CLI.java:784)
at org.apache.hadoop.mapreduce.tools.CLI.displayJobList(CLI.java:769)
at org.apache.hadoop.mapreduce.tools.CLI.listAllJobs(CLI.java:697)
at org.apache.hadoop.mapreduce.tools.CLI.run(CLI.java:428)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
at org.apache.hadoop.mapred.JobClient.main(JobClient.java:1277)

What should you do?

Solution
Find the mapred-site.xml file. Make sure it has these stanzas (within the configuration and /configuration tags):

<property> …

What Does AI Stand For in addrinfo?

Problem scenario
You see several variables that start with “ai_”. What does the “a” and “i” stand for?

Solution
The “a” stands for “address” and the “i” stands for “info”.

The man page for getaddrinfo says “The getaddrinfo() function is defined for protocol-independent nodename-to-address translation.” taken from http://www.nsc.ru/cgi-bin/www/unix_help/unix-man?getaddrinfo.

Therefore ai_flags, ai_family, ai_scoktype, ai_protocol, ai_addrlen, ai_canonname, ai_addr,

Why Is There an Apparent Difference Between “docker run” and the Series of Two Commands “docker create” And “docker start”?

Problem scenario
When you run “docker run“, the container has a port that is exposed and the web application works properly.  When you use “docker create” then “docker start“, the service is not exposed properly. You believe that “docker run” the same as a series of two steps, first “docker create” then “docker start“.

Is It OK to Delete /lib64/libk5crypto.so.3 from a Linux Server?

Problem scenario
You want to rebuild libk5crypto.so.3. Can you delete this file?

Solution
No. Once you delete it, sudo commands will stop working. You will not be able to log into the server via SSH either if the file is moved from the /lib64/ directory.

To learn more about the file and an rpm package that provides it, go here: https://centos.pkgs.org/8/centos-baseos-x86_64/krb5-libs-1.17-18.el8.i686.rpm.html

How Do You Run a Bolt Command from a Linux Server to a Windows Server?

Problem scenario
You want to run a PowerShell script or run an interactive command on a Windows server. You have Puppet Bolt installed on a Linux server. You do not need to use SSL. What do you do?

Solution
Run a command like this (but substitute x.x.x.x with the IP address of the Windows server, jdoe with the username and coolpassword with jdoe’s password):

bolt command run “Get-Process” –Targets winrm://x.x.x.x –no-ssl –user jdoe –password coolpassword

To run a script called “cool.ps1”,

How Do You Troubleshoot Kubernetes when the Pods Are Not Working Correctly?

Problem scenario
You deployment Kubernetes. You used “kubectl create” to deploy some pods. Pods are not getting IP addresses and the status is Pending. What do you do?

Solution

  1. Run a command like this (but replace “foobar” with the namespace of the Kubernetes pods you are trying to troubleshoot):

kubectl get all -n foobar

  1. The above command should list relevant deployment names or pod names.

How Do You Get a footer.php File to Have a Change Apply in WordPress?

Problem scenario
You clicked “Update file” after you made changes to a .php file in WordPress (via the Theme Editor). You have refreshed the web page, but the changes have not taken effect. What should you do?

Possible Solution #1
Can you update the theme? If the theme has an update waiting, getting it updated can fix this problem.

Possible Solution #2
Clear the history of your web browser.

How Do You Write a Palindrome Tester Function in Python?

Problem scenario
You want to write a palindrome tester function in Python without the :: operator in the code (that reverses the order of the list). What do you do?

Solution

def palindrome_tester(s):
s = s.lower()
x = len(s) // 2
for i in range(x):
if s[i] == s[-(i+1)]:
pass
else:
return False
return True

var_string = “mmnMM”

if (palindrome_tester(var_string)):
print(var_string + ” is a palindrome!”)
else:
print(var_string + ” is NOT a palindrome!”) …