Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

METRON-1578 - EC2 10 Node Deployment - Reverting to using control_path with %C for Mac #1032

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions metron-deployment/amazon-ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
```
9 changes: 5 additions & 4 deletions metron-deployment/amazon-ec2/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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