How Do You Connect over Port 5986 on a Windows Server?

Problem scenario
Port 5986 is blocked from your Linux server to your Windows server. You have used the nmap command and see that it is filtered. You believe there are no intermediate firewalls or OS firewalls blocking this port. What should you do?

Solution
This assumes you have no firewall blocking port 5986 for incoming connections to the Windows server. nmap will report 5986 is filtered despite there being nothing blocking this port if wsman's listener has not been properly configured.*

  1. Run this script on the Windows server:
$hostName = $env:COMPUTERNAME
$serverCert = New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName $hostName
Export-Certificate -Cert $serverCert -FilePath c:\vagrant\PsRemoting-Cert1.cer
Get-ChildItem c:\vagrant\PsRemoting-Cert1.cer
Enable-PSRemoting -Force
New-Item -Path WSMan:\localhost\Listener\ -Transport HTTPS -Address * -CertificateThumbPrint $serverCert.Thumbprint -Force
  1. That is it. SSL termination will not be done unless you configure it. You may need to bypass ssl-verification. But connectivity over port 5986 is not achievable.

* When winrm over HTTPS is not configured, port 5986 can show as filtered in the nmap results. This is contrary to the definition of filtered on the nmap page: "Filtered means that a firewall, filter, or other network obstacle is blocking the port so that Nmap cannot tell whether it is open or closed."

How Do You Install Incubed (in3) for Bash?

Problem scenario
You want to do Blockchain development with Ethereum using Bash. How do you install Incubed (in3) for Bash on a Debian distribution of Linux (such as Ubuntu or Linux Mint)?

Solution
Run these commands:

sudo apt -y update
sudo apt-get -y install software-properties-common
sudo add-apt-repository ppa:devops-slock-it/in3
sudo apt -y install jq in3 in3-dev

If you want to receive free cryptocurrency by just learning more, try Coinbase. For Europeans, the platform/company Iconomi.com can allow you to buy crypto or learn more.

How Do You Troubleshoot the AWS Error “Subnets specified must be in at least two different AZs”?

Problem scenario
You run an AWS CLI command, but you get this error message:
"An error occurred (InvalidParameterException) when calling the CreateCluster operation: Subnets specified must be in at least two different AZs"
How do you find subnets in different availability zones?

Solution
Run commands such as these (but replace the "us-west-x" and "us-east-x" with the availability zones that you use):

aws ec2 describe-subnets --query 'Subnets[?AvailabilityZone==us-west-1a]'
aws ec2 describe-subnets --query 'Subnets[?AvailabilityZone==us-west-1b]'
aws ec2 describe-subnets --query 'Subnets[?AvailabilityZone==us-west-1c]'
aws ec2 describe-subnets --query 'Subnets[?AvailabilityZone==us-east-2a]'
aws ec2 describe-subnets --query 'Subnets[?AvailabilityZone==us-east-2b]'
aws ec2 describe-subnets --query 'Subnets[?AvailabilityZone==us-east-2c]'

Now you will see more subnet IDs for your original command. You can supply that original command accordingly and re-run it successfully.

How Can a Base Branch Not Be a Master Branch in Git?

Problem scenario
You have seen the term "base branch" in Git documentation. How can it not be the main branch?

Solution
In the context of a Pull Request, where one branch's changes will update the same files (if any exist) and any new files will be copied into another branch, the branch receiving the changes and/or files is the base branch. The term "base" is used in GitHub's GUI and Atlassian BitBucket.

For more information, see https://github.community/t/relationship-of-base-and-master/1715 or https://confluence.atlassian.com/bitbucketserver/using-branches-in-bitbucket-server-776639968.html

How Do You Get Your AquaSana Under Sink Water Filter to Not Make Noise?

Problem scenario
Your AquaSana drinking water filtration system (that does reverse osmosis) is making a loud noise. It makes a moaning or honking sound that is quite loud as the tank fills up. It did not used to do this. What should you do?

Possible solution
You need a new RO flow restrictor. AquaSana can refer to this as item #130 or material #100236736. If the skinny white/transparent tube is missing from the black plastic piece of this RO restrictor, there can be a loud noise to the RO device.

You can browse AquaSana products here.

How Do You Repurpose Disk Space from a Windows Install (e.g., /dev/sdbc) to Be Used by Your Linux Server?

Problem scenario
Your Linux server was installed over an old Windows server. You want to repurpose sections of the hard disk (e.g., sda1 and sda3). Linux has been installed, but some sections of the disk are not usable by Linux. What do you do?

Solution
Warning: This could permanently delete data. If you make a mistake you may need to reformat your Linux server. Proceed only if you know what you are doing or can delete everything on the server.

  1. Run this: sudo cfdisk
  2. Find the device you want to recycle. Highlight it. Choose "Delete".
  3. Choose "Write". You will get an option to change the size. If you want to repurpose all the capacity, just press the Enter key.
  4. The device "/dev/sdax" should now be free space. It should be highlighted too. Choose "New".
  5. The device "/dev/sdax" should have reappeared (or the next sda followed by an integer) should have appeared. The "Type" should be "Linux."
  6. Choose "Write" to exit this program. You will be prompted "Are you sure you want to write the partition table to disk?" Type "yes" with no quotes and press the Enter key.
  7. Go to "Quit". You will be prompted to enter a size of the partition. You normally would just press the Enter key.
  8. Reboot the server
  9. Start with step #5 of these directions (but replace sdc with the device's name):
    https://www.continualintegration.com/miscellaneous-articles/how-to-add-a-disk-to-a-rhelcentosfedora-server/

How Do You Troubleshoot the Vagrant Message “/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require’: cannot load such file — winrm (LoadError)”?

Problem scenario
You are running Vagrant, but you get this error: "/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- winrm (LoadError)"

You run "gem list" (or "sudo gem list") and see winrm is installed.

What should you do?

Possible Solution #1 (recommended)

  1. Run this command:
gem list | grep libvirt

2. Verify that libvirt's version is at least 0.6 or higher. If it is, go to step #3. If it is lower than that, use the following two commands:

# gem uninstall fog-libvirt
# gem install fog-libvirt

3. Run these two commands:

vagrant plugin install winrm
vagrant plugin install winrm-elevated

4. Now try the vagrant command again.

Possible Solution #2 (not recommended)
Install the Ruby development package. For a CentOS/RHEL/Fedora server, use this: sudo yum -y install ruby-devel

Run both of these commands (despite the one with "sudo" not being recommended):

gem install winrm
# the command below is not recommened
sudo gem install winrm

Now try the original command again.

Possible Solution #3 (not recommended)
Run the "vagrant" command with "sudo".

How Do You Fix a memcached.so Error when Running PHP Too?

Problem scenario
You get an error about memcache and you are running PHP. Or you get an error "Unable to load dynamic library "memcached.so"? You run "php --version" and you see an error about memcache or memcached (e.g., a missing memcached.so file). What should you do?

Possible Solution #1
Get a memcached.so file from a working Linux server and place it in the directory that the error message showed in the php --version command. If the OS is the exact same as a working server, you could try the location mentioned in the error message. Alternatively you could run this to find it: sudo find / -name memcached.so

Possible Solution #2
You could run this (where "/path/to/pecl" is the result of this command "which pecl"):

sudo /path/to/pecl install memcached

Possible Solution #3
Check the permissions of the memcached.so file if it exists. The file may have incorrect permissions that keep it from being usable.

Possible Solution #4
Is the memcached.so file corrupt or too small? There may be a problem with it. You may need to recreate it. You may want to back it up before you recreate it just to be sure.

Possible Solution #5
If you are using brew, see this posting: https://stackoverflow.com/questions/7860404/how-to-enable-the-memcached-php-extension-after-installing-with-homebrew

For future reference:
To find the version of memcached installed, try these commands:

rpm -qi libmemcached
yum list installed | grep memcache
which memcached
memcached -h

Technical Books by Category

If you resolve to learn more about technologies, you may want to buy technical books.  Here are lists of books on many different I.T. subjects:

Apache Spark
Apache Tomcat
Apache Web Server
AWS
Azure
Bitcoin
Bioinformatics
C#
CFengine
Chef
Docker
E-Discovery
Elastic Stack
Flask
Forensics (Computer Forensics)
Git
Hadoop
Kubernetes
Informatica
Message Queueing Technologies (excluding RabbitMQ)
RabbitMQ
Redis
REST API
Security
Site Reliability Engineering
PowerShell
Puppet
Python
SalesForce
SAP
Squid
SSL and TLS
Terraform
VMware
vSphere
Windows

Where Can You Find the build_rust.sh Script?

Problem scenario
You want to use Rust and Incubed (the Blockchains in3 crate). You search for "build_rust.sh", but you find irrelevant build-rust.sh files. How do you find the one with the underscore (or underbar) and not the hyphen/dash?

Solution
Here is the content:

#!/bin/sh
cd ..
mkdir -p rust/in3-sys/in3-core
mkdir -p rust/in3-sys/in3-core/c
cp -r c/CMakeLists.txt c/macro.cmake c/compiler.cmake c/docs c/src c/include rust/in3-sys/in3-core/c/
cp CMakeLists.txt rust/in3-sys/in3-core/
export UPDATE_IN3_BINDINGS=1
cd rust && cargo clean && cargo build
cd ../scripts

If you want to receive free cryptocurrency by just learning more, try Coinbase.