How Do You Get hdfs or Yarn to Start When You Get an Error Such As “Permission denied (publickey,gssapi-keyex,gssapi-with-mic)”?

Problem scenario
You try to use start-dfs.sh or start-yarn.sh.  You received this message:  Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

What do you do?

Solution
You need to be able to ssh into the node without any Hadoop components.  To help you troubleshoot, consider the following items on the server that is causing the problem (e.g., the DataNode server, but it could be the NameNode server itself):

1. 

How Do You Add a Linux User to the sudoers Users?

Problem scenario
You want a given Linux user to be added to the sudoers group.  You want the user to be able to use the “sudo ” command before running other commands.  How do you give the sudo privilege to a given user?

Solution
If you are using Debian or Ubuntu Linux, do this (but replace “cooluser” with the username of your choice):
sudo adduser cooluser sudo

If you are using CentOS/RHEL/Fedora,

How Do You Use “sudo npm” or “sudo node” Commands?

Problem scenario
You run “sudo npm” or “sudo node” and you get “command not found” error messages.  What should you do?

Solution
Modify the /etc/sudoers file.  Find the stanza with secure_path.  Append “:/usr/local/bin” (with no quotes) to the line.

Here is an example of how the stanza should look (it is often on line 80 of /etc/sudoers):

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin

Once the /etc/sudoers file has been saved,

After Installing Jira on a RHEL Server, How Do You Access the Web UI for Jira?

Problem scenario
You installed Jira 7.x on RHEL 7.x in AWS.  You try to go to the URL to finish installing and configuring it, but the web UI does not load.  On the back-end you see that there is a service listening on port 8080 (with a sudo netstat -anlp | grep 8080 command).  You know that now AWS Security Group is blocking port 8080 from the external IP address of the server.

How Do You Install OSSEC on Any Type of Linux?

Problem scenario
You have Debian/Ubuntu, RedHat (including CentOS and Fedora), and SUSE distributions of Linux.  You want to install OSSEC on each server (to protect them with host-based intrusion detection systems, IDSes).  You want to use the same script to install OSSEC on each server. How do you do this?

Solution
1.  Create a script such as this /tmp/ossec.sh.

#!/bin/bash
# Written by www.continualintegration.com

ossecversion=3.1.0 

How Do You SSH into a Raspberry Pi 3 from a Windows Computer That Is on the Same Network?

Problem scenario
You want to use Putty from a Windows 7 or Windows 10 workstation to connect to a Raspberry Pi 3 on the network. You want to connect via a command prompt (not with a GUI).  What do you do?

Solution
On the Raspberry Pi do these three steps:
1.  Change password for the pi user or create a new user.

How Do You Deal with An “hwloc library not found” Error?

Problem scenario
You are trying to install Snort on Ubuntu.  You have installed hwloc (because you know the command hwloc-info works).  But when you try to run a configure script (e.g., configure_cmake.sh), you get this error:

“– Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
CMake Error at cmake/FindHWLOC.cmake:6 (message):

        ERROR! hwloc library not found.

        Get it from https://www.open-mpi.org/projects/hwloc/

Call Stack (most recent call first):
 

How Do You Tell if There is a Firewall on Linux?

Problem scenario
You want to see if there is an operating system, software or host-based firewall on your Linux machine.  What do you do?

Solution
Run the following six commands for clues:

sudo ps -ef | grep firewalld
sudo systemctl status firewalld
sudo ps -ef | grep ufw
sudo ufw status
sudo iptables -L #*
sudo nmap -P0 127.0.0.1

If you are running the server in a public cloud,

How Do You Get Jenkins 2.x Running on Linux to Do Code Deployments to Windows Servers?

Problem scenario
You are trying to set up a CI/CD pipeline in your heterogeneous enterprise server network.  You want to push down files (integrate code) from your Jenkins 2.x server running on Linux to your Windows 2016 Servers.  How do you get builds to be controlled by Jenkins on Linux to be deployed to other Windows servers?

Prerequisites
This solution assumes that Jenkins is running on Linux. 

How Do You SSH to a Windows Server or How Do You Install Cygwin on a Windows 2016 Server?

Problem scenario
You want to install Cygwin to allow for SSH connections (from Linux servers) to your Windows server.  How do you do this?

Solution
1.  If the server is new, skip step #1.

  a)  Log in and go to Control Panel -> System and Security -> System.  Click on “Advanced system settings” on the left.

  b)  Go to the Advanced tab and click on “Environment Variables…”