Author: Josh

  • Find Windows Server Version from the Command Line

    Here is a useful command that will show which Windows Version is installed: systeminfo | findstr /B /C:”OS Name” /C:”OS Version”

  • ElasticSearch Put-Mapping Conflict

    If you experience very high Master CPU usage, and low index throughput, you may be seeing the effects of a put-mapping conflict. This can best be confirmed through querying the pending_tasks API: Further information from the hot_threads API can confirm by looking for a clusterService#updateTask hot thread that consumes significant CPU on the master node. […]

  • AWS CLI v2 on OSX – Upgrade to latest

    I was working on a project with a client where I wasn’t able to initialize a terragrunt deployment when using SSO: The version of the AWS CLI that I was using was 2.0.56. Upgrading to the latest version solved the issue (2.1.32). Be sure to login again after upgrading. Verify by running the following command: […]

  • Proxy requests to ElasticSearch and Kibana using nginx

    Proxy requests to AWS ElasticSearch and Kibana using nginx. I use the following nginx configuration, deployed via puppet template. The nginx proxy is an EC2 instance within an AutoScaling Group behind an ELB, with SSL termination. This configuration allow access to both kibana and elasticsearch, through this proxy endpoint.

  • OKTA MFA with the AWS CLI using aws_okta_keyman

    I recently started using the aws_okta_keyman utility created by nathan-v to authenticate using Okta MFA when using the AWS CLI on some AWS accounts. This is a very handy tool that will authenticate, handle the push notification, and configure credentials for CLI use. One major problem with this utility is that it will over-write your […]

  • Managing terraform versions

    With the large number of individuals and teams using terraform, it can be difficult to work with the many versions of terraform in a large company, or with multiple clients. There are two methods I use to manage this:1. Using docker2. Using tfenv The benefit to using docker is that you don’t have to install […]

  • Add port to firewalld for external access

    The following command will list the current firewall rules: To add a new rule, issue the following command: Next, reload firewalld: List the rules again to confirm: RE: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/sec-viewing_current_status_and_settings_of_firewalld

  • Unknown variable; There is no variable named…

    I was building an AWS Code Pipeline recently with terraform to deploy a new rails application on an ECS cluster and encountered the following error: The problem in the buildspec.yml was the following line: All of these build arguments were taken from System Manager’s Parameter store, so I know they were there. The problem was […]

  • Tableau 2020.2.4: This job failed due to unexpected error: ‘ServiceOperationTimeoutException’

    I was recently working on a problem with Tableau Server where restore operations were failing due to a ServiceOperationTimeoutException. The restore was failing to a new server, that was maintained as a hot stand-by, or passive node. Upon further examination, when trying to stop the service, via the browser control or from the command line […]

  • Running powershell scripts as administrator

    Even though a user is in the Administrators group, when opening a powershell console, or running a scheduled task, even with “highest privileges”, the powershell script does not run with administrator privileges. This usually results in the following error: One way to solve this problem is to refactor the powershell script to check for administrator […]