From 03271a99ee3644e8f539bcdd955ba7c4d5568120 Mon Sep 17 00:00:00 2001 From: as22323 Date: Fri, 25 May 2018 03:11:35 -0400 Subject: [PATCH 1/2] ec2 readme - included desc. for error with %C --- metron-deployment/amazon-ec2/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/metron-deployment/amazon-ec2/README.md b/metron-deployment/amazon-ec2/README.md index b2efc9e490..1a77d2d695 100644 --- a/metron-deployment/amazon-ec2/README.md +++ b/metron-deployment/amazon-ec2/README.md @@ -190,6 +190,7 @@ key_file: ~/.ssh/metron-private-key.pub Common Errors ------------- + ### Error: [unsupported_operation_exception] custom format isn't supported This error might be seen within Metron's default dashboard in Kibana 4. This occurs when the index templates do not exist for the Snort, Bro or YAF indices in Elasticsearch. @@ -320,3 +321,15 @@ fatal: [ec2-52-26-113-221.us-west-2.compute.amazonaws.com]: UNREACHABLE! => { #### Solution This most often indicates that Ansible cannot connect to the host with the SSH key that it has access to. This could occur if hosts are provisioned with one SSH key, but the playbook is executed subsequently with a different SSH key. The issue can be addressed by either altering the `key_file` variable to point to the key that was used to provision the hosts or by simply terminating all hosts and re-running the playbook. + + +### Error: 'Failed to connect to the host via ssh: percent_expand: unknown key %C\r' + +'%C' in the control_path of ansible.cfg might not be recognizable in certain distributions of Linux. The control_path is used for SSH connectivity between the host and the nodes being deployed to EC2. + +#### Solution +Update the control_path in /amazon-ec2/ansible.cfg to the following: +``` +[ssh_connection] +control_path = ~/.ssh/ansible-ssh-%%h-%%r +``` From a6cf8a8c74389f9fc731474a6afb8dc6c9ddadee Mon Sep 17 00:00:00 2001 From: as22323 Date: Fri, 25 May 2018 03:13:12 -0400 Subject: [PATCH 2/2] commented *-%%h-%%r, uncommented *-ssh-%%C --- metron-deployment/amazon-ec2/ansible.cfg | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/metron-deployment/amazon-ec2/ansible.cfg b/metron-deployment/amazon-ec2/ansible.cfg index 0fe3343ace..c28fc5a166 100644 --- a/metron-deployment/amazon-ec2/ansible.cfg +++ b/metron-deployment/amazon-ec2/ansible.cfg @@ -24,8 +24,9 @@ forks = 20 log_path = ./ansible.log # fix for "ssh throws 'unix domain socket too long' " problem -#[ssh_connection] -#control_path = ~/.ssh/ansible-ssh-%%C - [ssh_connection] -control_path = ~/.ssh/ansbile-ssh-%%h-%%r +control_path = ~/.ssh/ansible-ssh-%%C + +# fix for "Failed to connect to the host via ssh: percent_expand: unknown key %C" problem +#[ssh_connection] +#control_path = ~/.ssh/ansbile-ssh-%%h-%%r