How Do Build and Release Engineers Target Specific Servers With Jenkins Builds?

Problem scenario:  Using a configuration management tool, you can modify the selections of servers for your configurations to exclude specific servers.  With Puppet Master you can create classes of nodes (that exclude various Puppet Agent servers) and have manifests apply to the class.  In Puppet you can also write manifests that specify individual servers.  Chef recipes can target certain Chef clients and exclude others.  SaltStack allows the Salt Master server to “call a highstate” (or run an action) on specific Salt Minion servers to push down files or execute commands while ignoring multiple Salt Minions. 

Troubleshooting Jenkins (Two Different Problems)

Problem scenario:  You are in the Jenkins master web UI and are trying to configure a Jenkins node (previously known as a slave) instance.  You entered the correct hostname, username and password.  You get this error:

“ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
java.lang.IllegalStateException: Connection is not established!”

Solution:  Instead of using the hostname of the Jenkins node (previously known as a slave) server,

How Do You Install libyaml on a Red Hat Derivative of Linux?

Problem scenario
You are using a RedHat derivative of Linux.  You get an error about libyaml not being installed (e.g., when a dependency of Suricata is unmet).  You tried to install libyaml-devel, but it did not work.  What should you do?

Solution for RHEL
If you are using RedHat run these two commands:

sudo yum-config-manager –enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
sudo yum -y install libyaml-devel

Solution for CentOS/Fedora
If you are using CentOS or Fedora, go here to get the package you need.

[Sassy_Social_Share]

Troubleshooting and an FYI Regarding OpenSSH

Problem scenario #1
You try to SSH to a Windows server with OpenSSH.  You get “Permission Denied.”
Solution
Go to the Windows server.  Go to Server Manager -Tools -Computer Management -Users and Groups.  Double click on the user you are trying with.  Uncheck “User must change password at next log on.”  This setting will not allow an SSH connection to happen.

Problem scenario #2
ssh-agent service is running on a Windows server with OpenSSH. 

How Do You Create an RSA Private/Public Key Pair with OpenSSH in Windows?

Problem scenario
You have OpenSSH installed on a Windows machine.  You are in a PowerShell prompt as Administrator in the directory where the ssh-keygen.exe file is.  You run this:  .\ssh-keygen.exe -t rsa
You get “Generating public/private rsa key pair.”  No new prompt appears.  It hangs (or stalls) for a long time.  You wait, and find that it is essentially frozen.  You control-c to interrupt it and move on.

You are in a PowerShell prompt as Administrator in the directory where the ssh-keygen.exe file is. 

Two Error Messages when Installing Gems On Linux

Problem scenario:  You are trying to use gem install, but you get an error like this:
“usr/bin/ruby extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/ruby.h”

Solution:  Install ruby-devel.  For RedHat deriviatives, you can find the rpm here.

=====================================================================================

Problem scenario:  You are running gem install *.gem, and you get ‘ERROR: While executing gem …

Using a rubyntlm script (http.rb), you get “connection refused.”

Problem scenario:  You modify this script to have a hostname, username, and password of a Windows server with IIS installed.  You add a “puts line” stanza on line 32 for debugging.  You try to run the script with ruby http.rb, but you get “connection refused.”  

Possible solutions:  If you changed the port stanza in the http.rb file from 80, make sure there is no firewall blocking the port in the path to the Windows server. 

Rubyntlm: Communication from a Linux Server to a Windows Server

Problem scenario:  You modify this script to have a hostname, username, and password of a Windows server on your network.  You add a “puts line” stanza on line 32.

You run the script but you get a message like this: “HTTP/1.1 404 Not Found error. “

Solution:  Make sure that the Windows server has IIS installed, make sure the server name you entered was correct,

This Command “gem install contint.gem” Hangs Forever

Problem scenario:  You are running gem install *.gem and it hangs.  This stalling appears to be a freeze.  You wait several minutes and nothing happens.  You are waiting for a message or a new prompt.

Solution:  Control-C to get out of it.  Try it again with the “-V” flag like this:

gem install contInt.gem -V

# This time be patient. 

Unexpected PowerShell Closures and Controlling the Flow of PowerShell Scripts

Problem scenario:  You PowerShell or PowerCLI window keeps exiting automatically when you run a script.  You find that RAM and CPU are not constrained.  
Root cause: Human error.
Solution:  Look for the “exit” or the “Exit-Pssession” commands.  These can close PowerShell’s ISE or PowerCLI.  You may need to eliminate these commands or use a different keyword.

———————————————————————————————————————————————————————–
Problem scenario: